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

Highlight manifests from other versions when failing to find packages #51613

Merged

Conversation

IanButterworth
Copy link
Member

@IanButterworth IanButterworth commented Oct 6, 2023

There's ideas on how to avoid this error entirely, but in cases where manifest from other versions can't be hotpatched, it seems helpful to highlight the problematic manifest(s) in the load path.

So this type of error would become

% ./julia
┌ Info: Precompiling Revise [295af30f-e4ad-537b-8983-00126c2a3abe]
└ @ Base loading.jl:2401
ERROR: LoadError: ArgumentError: Package LibGit2 does not have LibGit2_jll in its dependencies:
- Note that the following manifests in the load path were resolved with a different
  julia version, which may be the cause of the error:
    /Users/ian/.julia/environments/v1.11/Manifest.toml (v1.10.0-beta1)
- You may have a partially installed environment. Try `Pkg.instantiate()`
  to ensure all packages in the environment are installed.
- Or, if you have LibGit2 checked out for development and have
  added LibGit2_jll as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with LibGit2

or

% ./julia 
┌ Info: Precompiling Revise [295af30f-e4ad-537b-8983-00126c2a3abe]
└ @ Base loading.jl:2401
ERROR: LoadError: ArgumentError: Package LibGit2 does not have LibGit2_jll in its dependencies:
- Note that the following manifests in the load path were resolved a potentially
  different DEV version of the current version, which may be the cause
  of the error:
    /Users/ian/.julia/environments/v1.11/Manifest.toml
- You may have a partially installed environment. Try `Pkg.instantiate()`
  to ensure all packages in the environment are installed.
- Or, if you have LibGit2 checked out for development and have
  added LibGit2_jll as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with LibGit2

@IanButterworth IanButterworth force-pushed the ib/unsuitable_manifest branch from 8864634 to 9ea33fd Compare October 6, 2023 01:43
@IanButterworth IanButterworth force-pushed the ib/unsuitable_manifest branch from 055abac to 3fb931d Compare October 6, 2023 10:52
@brenhinkeller brenhinkeller added the packages Package management and loading label Oct 6, 2023
@IanButterworth IanButterworth marked this pull request as draft October 6, 2023 19:42
@IanButterworth IanButterworth added the merge me PR is reviewed. Merge when all tests are passing label Oct 6, 2023
@IanButterworth IanButterworth marked this pull request as ready for review October 6, 2023 19:56
@IanButterworth IanButterworth merged commit fd21c96 into JuliaLang:master Oct 6, 2023
4 checks passed
@IanButterworth IanButterworth deleted the ib/unsuitable_manifest branch October 6, 2023 23:46
@IanButterworth IanButterworth removed the merge me PR is reviewed. Merge when all tests are passing label Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages Package management and loading
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants