Skip to content

Commit 7af346c

Browse files
Update Operations.jl
1 parent a985419 commit 7af346c

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/Operations.jl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,14 @@ function resolve_versions!(env::EnvCache, registries::Vector{Registry.RegistryIn
338338
names[pkg.uuid] = pkg.name
339339
end
340340

341-
jv = env.manifest.julia_version
342-
manifest_same_version = !isnothing(jv) && jv.major == VERSION.major && jv.minor == VERSION.minor
343-
# if the manifest was previously resolved by the same major-minor julia version, don't require stdlib versions
344-
# to remain the same. This allows manifests that were generated on nightly julia versions, where stdlibs may change version
345-
# to be updated
346-
347-
reqs = Resolve.Requires(pkg.uuid => (manifest_same_version && is_stdlib(pkg.uuid)) ? VersionSpec("*") : VersionSpec(pkg.version) for pkg in pkgs)
341+
mjv = env.manifest.julia_version
342+
allow_stdlib_changes = julia_version == VERSION && !isnothing(mjv) && mjv.major == VERSION.major && mjv.minor == VERSION.minor
343+
# if the manifest was previously resolved by the same major-minor julia version as the current version and the version that is being
344+
# requested, don't require stdlib versions to remain the same. This allows manifests that were generated on nightly julia versions, or
345+
# different patch releases where stdlibs may change version to be updated. Otherwise manifests will be invalid & break Pkg.precompile
346+
# as they will have different stdlib versions listed to those which will be loaded
347+
348+
reqs = Resolve.Requires(pkg.uuid => (allow_stdlib_changes && is_stdlib(pkg.uuid)) ? VersionSpec("*") : VersionSpec(pkg.version) for pkg in pkgs)
348349
graph, compat_map = deps_graph(env, registries, names, reqs, fixed, julia_version)
349350
Resolve.simplify_graph!(graph)
350351
vers = Resolve.resolve(graph)

0 commit comments

Comments
 (0)