-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
respect versions in sysimage #3002
Conversation
afea2a8
to
bd4bfe8
Compare
bd4bfe8
to
9a938e1
Compare
What will the error message look like if the user explicitly does |
|
Need to wait for a Julia nightly that includes JuliaLang/julia#44318 now. |
How would this compose with #2916? Is it the case that any package that is in the system image is an stdlib? If so, could we get this same information by storing the current list of stdlibs (as in that PR) and using that information during resolution? In any case, I like the UI improvements here. |
9a938e1
to
b8a61e3
Compare
Not really, the concept of an stdlib and a package in the sysimage is not the same. An stdlib is a package in the stdlib folder, a package in the sysimage is a package that is in the sysimage. They do not need to have any overlap, for example an stdlib does not need to be in the sysimage (like the Also a package in the sysimage (that is not an stdlib) still gets its dependency and compat information from the registry. |
Looking at the test failure, I'll disable the sysimage check when |
@@ -526,6 +526,18 @@ function devpath(env::EnvCache, name::AbstractString, shared::Bool) | |||
return joinpath(dev_dir, name) | |||
end | |||
|
|||
function error_if_in_sysimage(pkg::PackageSpec) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks BinaryBuilder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can set Pkg.respect_sysimage_versions(false)
as a workaround.
Although, it would be good to figure out why it breaks BinaryBuilder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expression: setup_dependencies(prefix, getpkg.(dependencies), platform)
tried to develop or add a package by URL that is already in the sysimage
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.9/Pkg/src/Types.jl:67
[2] error_if_in_sysimage(pkg::Pkg.Types.PackageSpec)
@ Pkg.Types /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.9/Pkg/src/Types.jl:537
[3] (::Pkg.Types.var"#47#48"{Pkg.Types.Context, Pkg.Types.PackageSpec, String})(repo::GitRepo)
@ Pkg.Types /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.9/Pkg/src/Types.jl:752
[4] with(f::Pkg.Types.var"#47#48"{Pkg.Types.Context, Pkg.Types.PackageSpec, String}, obj::GitRepo)
@ LibGit2 /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.9/LibGit2/src/types.jl:1153
[5] handle_repo_add!(ctx::Pkg.Types.Context, pkg::Pkg.Types.PackageSpec)
@ Pkg.Types /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.9/Pkg/src/Types.jl:709
[6] handle_repos_add!(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec})
@ Pkg.Types /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.9/Pkg/src/Types.jl:779
[7] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Platform, kwargs::Base.Pairs{Symbol, Union{Base.DevNull, Nothing}, Tuple{Symbol, Symbol}, NamedTuple{(:io, :julia_version), Tuple{Base.DevNull, Nothing}}})
@ Pkg.API /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.9/Pkg/src/API.jl:255
[8] (::BinaryBuilderBase.var"#89#95"{Bool, Prefix, Vector{Pkg.Types.PackageSpec}, Platform, Vector{String}, Vector{String}})()
@ BinaryBuilderBase ~/work/BinaryBuilderBase.jl/BinaryBuilderBase.jl/src/Prefix.jl:631
[9] activate(f::BinaryBuilderBase.var"#89#95"{Bool, Prefix, Vector{Pkg.Types.PackageSpec}, Platform, Vector{String}, Vector{String}}, new_project::String)
@ Pkg.API /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.9/Pkg/src/API.jl:1700
[10] setup_dependencies(prefix::Prefix, dependencies::Vector{Pkg.Types.PackageSpec}, platform::Platform; verbose::Bool)
@ BinaryBuilderBase ~/work/BinaryBuilderBase.jl/BinaryBuilderBase.jl/src/Prefix.jl:582
[11] setup_dependencies
@ ~/work/BinaryBuilderBase.jl/BinaryBuilderBase.jl/src/Prefix.jl:556 [inlined]
[12] (::var"#38#60"{Platform, Vector{Dependency}, Prefix})()
@ Main ./none:0
[13] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:511
[14] with_logger
@ ./logging.jl:623 [inlined]
[15] #collect_test_logs#65
@ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.9/Test/src/logging.jl:114 [inlined]
[16] collect_test_logs
@ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.9/Test/src/logging.jl:113 [inlined]
[17] #match_logs#66
@ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.9/Test/src/logging.jl:260 [inlined]
[18] match_logs
@ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.9/Test/src/logging.jl:260 [inlined]
[19] (::var"#37#59")(dir::String)
@ Main ~/work/BinaryBuilderBase.jl/BinaryBuilderBase.jl/test/dependencies.jl:151
[20] #30
@ ~/work/BinaryBuilderBase.jl/BinaryBuilderBase.jl/test/dependencies.jl:14 [inlined]
[21] activate(f::var"#30#32"{String, var"#37#59"}, new_project::String)
@ Pkg.API /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.9/Pkg/src/API.jl:1700
[22] #29
@ ~/work/BinaryBuilderBase.jl/BinaryBuilderBase.jl/test/dependencies.jl:13 [inlined]
[23] mktempdir(fn::var"#29#31"{var"#37#59"}, parent::String; prefix::String)
@ Base.Filesystem ./file.jl:760
[24] mktempdir (repeats 2 times)
@ ./file.jl:758 [inlined]
[25] with_temp_project(f::var"#37#59")
@ Main ~/work/BinaryBuilderBase.jl/BinaryBuilderBase.jl/test/dependencies.jl:12
[26] macro expansion
@ ~/work/BinaryBuilderBase.jl/BinaryBuilderBase.jl/test/dependencies.jl:145 [inlined]
[27] macro expansion
@ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.9/Test/src/Test.jl:1357 [inlined]
[28] macro expansion
@ ~/work/BinaryBuilderBase.jl/BinaryBuilderBase.jl/test/dependencies.jl:109 [inlined]
[29] macro expansion
@ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.9/Test/src/Test.jl:1357 [inlined]
[30] top-level scope
@ ~/work/BinaryBuilderBase.jl/BinaryBuilderBase.jl/test/dependencies.jl:20
We install JLL stdlibs with different version numbers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh, yeah that makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests still fail even with JuliaPackaging/BinaryBuilderBase.jl#227, but in a different way, so there may be something else broken now. But I don't have the time to debug now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I believe that the remaining failure is unrelated to any changes in Pkg. Pkg.respect_sysimage_versions(false)
is sufficient to be able to install packages without problems.
any chance this is eligible for backport to 1.8? |
Maybe this can go into 1.8.1? |
(cherry picked from commit 31af274)
I created a sysimage with an outdated Plots versions, loaded Julia with that sysimage and created a temp repo and added Plots:
Requires JuliaLang/julia#44318