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

PlutoPkg: if Pkg.resolve fails, try updating the registries #2298

Merged
merged 2 commits into from
Oct 5, 2022

Conversation

fonsp
Copy link
Owner

@fonsp fonsp commented Sep 28, 2022

When opening a notebook (e.g. from the web), we call Pkg.resolve on the notebook environment. If this fails, we try some strategies one-by-one to automatically fix the problem until it resolves. These strategies are:

  1. Force update registries (added in this PR)
  2. Remove the Manifest.toml
  3. Remove the Manifest.toml and all [compat] entries from the Project.toml (added in Recover gracefully from loading a notebook with non-existing versions #2294)

This should improve the situation of #2280. Before this PR, Pluto would try strategy 2, fail, then strategy 3 which works. But this removes all compat entries for all packages, including packages that had no problems, and installs latest versions for all.
After this PR, strategy 1 would already work, and the notebook would run with the intended package versions.

@fonsp fonsp added enhancement New feature or request package manager Pluto's built-in package manager labels Sep 28, 2022
@github-actions
Copy link
Contributor

Try this Pull Request!

Open Julia and type:

julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="update-registries-if-resolve-fails")
julia> using Pluto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request package manager Pluto's built-in package manager
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant