Skip to content

Commit

Permalink
always allow stdlibs to update
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Oct 25, 2021
1 parent 4bf88fb commit 35836d1
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/Operations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,10 @@ function resolve_versions!(env::EnvCache, registries::Vector{Registry.RegistryIn
names[pkg.uuid] = pkg.name
end

mjv = env.manifest.julia_version
allow_stdlib_changes = julia_version == VERSION && !isnothing(mjv) && mjv.major == VERSION.major && mjv.minor == VERSION.minor
# if the manifest was previously resolved by the same major-minor julia version as the current version and the version that is being
# requested, don't require stdlib versions to remain the same. This allows manifests that were generated on nightly julia versions, or
# different patch releases where stdlibs may change version to be updated. Otherwise manifests will be invalid & break Pkg.precompile
# as they will have different stdlib versions listed to those which will be loaded

reqs = Resolve.Requires(pkg.uuid => (allow_stdlib_changes && is_stdlib(pkg.uuid)) ? VersionSpec("*") : VersionSpec(pkg.version) for pkg in pkgs)
# Unless using the unbounded or historical resolver, always allow stdlibs to update. Helps if the previous resolve
# happened on a different julia version / commit and the stdlib version in the manifest is not the current stdlib version
unbind_stdlibs = julia_version === VERSION
reqs = Resolve.Requires(pkg.uuid => is_stdlib(pkg.uuid) && unbind_stdlibs ? VersionSpec("*") : VersionSpec(pkg.version) for pkg in pkgs)
graph, compat_map = deps_graph(env, registries, names, reqs, fixed, julia_version)
Resolve.simplify_graph!(graph)
vers = Resolve.resolve(graph)
Expand Down

0 comments on commit 35836d1

Please sign in to comment.