Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try resolve before removing manifest when instantiating fails #3071

Closed
aplavin opened this issue Oct 23, 2024 · 4 comments
Closed

Try resolve before removing manifest when instantiating fails #3071

aplavin opened this issue Oct 23, 2024 · 4 comments
Labels
bug Something isn't working package manager Pluto's built-in package manager

Comments

@aplavin
Copy link
Contributor

aplavin commented Oct 23, 2024

Whenever Pluto cannot instantiate the env, it removes the manifest completely:

Operation failed. Updating registries and trying again...
  exception = 
    Unsatisfiable requirements detected for package Statistics [10745b16]:
     Statistics [10745b16] log:
     ├─possible versions are: 1.11.0 - 1.11.1 or uninstalled
     └─restricted to versions 1.10.0 by an explicit requirement — no versions left
    Updating registry at `~/.julia/registries/General.toml`
Warning: Operation failed. Removing Manifest and trying again...
  exception = 
    Unsatisfiable requirements detected for package Statistics [10745b16]:
     Statistics [10745b16] log:
     ├─possible versions are: 1.11.0 - 1.11.1 or uninstalled
     └─restricted to versions 1.10.0 by an explicit requirement — no versions left

I believe the most common scenario when it happens is a Julia version update (like in this example).

This automatic behavior is much more destructive compared to the Julia REPL suggestion of running ]resolve. Removing manifest leads to up/downgrading of all dependencies, basically whatever the Pkg resolver wants to do from scratch.

Can Pluto at least try ]resolve first to keep the manifest as long as possible?
And potentially – ask the user for an explicit confirmation before performing the destructive action of dropping the manifest...

@fonsp
Copy link
Owner

fonsp commented Oct 25, 2024

Can you share a notebook file that we can test with?

@fonsp fonsp added the package manager Pluto's built-in package manager label Oct 25, 2024
@fonsp fonsp changed the title Try resolve before nuking the manifest Try resolve before removing manifest when instantiating fails Oct 25, 2024
@fonsp
Copy link
Owner

fonsp commented Oct 28, 2024

@fonsp fonsp added the bug Something isn't working label Oct 28, 2024
@fonsp
Copy link
Owner

fonsp commented Oct 28, 2024

Pluto does do resolve when loading a notebook. You can see this in the Status tab (>0 sec time spent on resolve) and in the pkg logs.

But it looks like resolving a Julia 1.11 environment in 1.10 does not always work. My notebook above had the following issue:

JuliaLang/Pkg.jl#4058

@fonsp
Copy link
Owner

fonsp commented Nov 13, 2024

We already try resolve before removing the manifest. This particular issue was caused by JuliaLang/Pkg.jl#4058 which will be fixed in upcoming 1.10 and 1.11 releases

@fonsp fonsp closed this as completed Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working package manager Pluto's built-in package manager
Projects
None yet
Development

No branches or pull requests

2 participants