@@ -724,7 +724,7 @@ function resolve_versions!(
724724
725725 jll_fix = Dict {UUID, VersionNumber} ()
726726 for pkg in pkgs
727- if ! is_stdlib (pkg. uuid) && endswith (pkg. name, " _jll" ) && pkg. version isa VersionNumber
727+ if ! is_stdlib (pkg. uuid, julia_version ) && endswith (pkg. name, " _jll" ) && pkg. version isa VersionNumber
728728 jll_fix[pkg. uuid] = pkg. version
729729 end
730730 end
@@ -775,7 +775,7 @@ function resolve_versions!(
775775 # Unless using the unbounded or historical resolver, always allow stdlibs to update. Helps if the previous resolve
776776 # happened on a different julia version / commit and the stdlib version in the manifest is not the current stdlib version
777777 unbind_stdlibs = julia_version === VERSION
778- reqs = Resolve. Requires (pkg. uuid => is_stdlib (pkg. uuid) && unbind_stdlibs ? VersionSpec (" *" ) : VersionSpec (pkg. version) for pkg in pkgs)
778+ reqs = Resolve. Requires (pkg. uuid => is_stdlib (pkg. uuid, julia_version ) && unbind_stdlibs ? VersionSpec (" *" ) : VersionSpec (pkg. version) for pkg in pkgs)
779779 deps_map_compressed, compat_map_compressed, weak_deps_map_compressed, weak_compat_map_compressed, pkg_versions_map, pkg_versions_per_registry, uuid_to_name, reqs, fixed = deps_graph (env, registries, names, reqs, fixed, julia_version, installed_only)
780780 graph = Resolve. Graph (deps_map_compressed, compat_map_compressed, weak_deps_map_compressed, weak_compat_map_compressed, pkg_versions_map, pkg_versions_per_registry, uuid_to_name, reqs, fixed, false , julia_version)
781781 Resolve. simplify_graph! (graph)
@@ -906,6 +906,7 @@ function deps_graph(
906906 # unregistered stdlib we must special-case it here. This is further
907907 # complicated by the fact that we can ask this question relative to
908908 # a Julia version.
909+ # CRITICAL: Never resolve stdlibs from registry for target julia_version
909910 if (julia_version != VERSION && is_unregistered_stdlib (uuid)) || uuid_is_stdlib
910911 # We use our historical stdlib versioning data to unpack the version, deps and weakdeps of this uuid
911912 stdlib_info = stdlibs_for_julia_version[uuid]
@@ -1969,7 +1970,7 @@ function update_package_add(ctx::Context, pkg::PackageSpec, entry::PackageEntry,
19691970 if entry. path != = nothing || entry. repo. source != = nothing || pkg. repo. source != = nothing
19701971 return pkg # overwrite everything, nothing to copy over
19711972 end
1972- if is_stdlib (pkg. uuid)
1973+ if is_stdlib (pkg. uuid, ctx . julia_version )
19731974 return pkg # stdlibs are not versioned like other packages
19741975 elseif is_dep && (
19751976 (isa (pkg. version, VersionNumber) && entry. version == pkg. version) ||
@@ -2468,18 +2469,19 @@ function up(
24682469 return build_versions (ctx, union (new_apply, new_git))
24692470end
24702471
2471- function update_package_pin! (registries :: Vector{Registry.RegistryInstance} , pkg:: PackageSpec , entry:: Union{Nothing, PackageEntry} )
2472+ function update_package_pin! (ctx :: Context , pkg:: PackageSpec , entry:: Union{Nothing, PackageEntry} )
24722473 if entry === nothing
24732474 cmd = Pkg. in_repl_mode () ? " pkg> resolve" : " Pkg.resolve()"
24742475 pkgerror (" package $(err_rep (pkg)) not found in the manifest, run `$cmd ` and retry." )
24752476 end
2477+ registries = ctx. registries
24762478
24772479 # if entry.pinned && pkg.version == VersionSpec()
24782480 # println(ctx.io, "package $(err_rep(pkg)) already pinned")
24792481 # end
24802482 # update pinned package
24812483 pkg. pinned = true
2482- if is_stdlib (pkg. uuid)
2484+ if is_stdlib (pkg. uuid, ctx . julia_version )
24832485 return nothing # nothing left to do
24842486 elseif pkg. version == VersionSpec ()
24852487 pkg. version = entry. version # pin at current version
@@ -2500,7 +2502,7 @@ end
25002502is_fully_pinned (ctx:: Context ) = ! isempty (ctx. env. manifest. deps) && all (kv -> last (kv). pinned, ctx. env. manifest. deps)
25012503
25022504function pin (ctx:: Context , pkgs:: Vector{PackageSpec} )
2503- foreach (pkg -> update_package_pin! (ctx. registries , pkg, manifest_info (ctx. env. manifest, pkg. uuid)), pkgs)
2505+ foreach (pkg -> update_package_pin! (ctx, pkg, manifest_info (ctx. env. manifest, pkg. uuid)), pkgs)
25042506 pkgs = load_direct_deps (ctx. env, pkgs)
25052507
25062508 # TODO : change pin to not take a version and just have it pin on the current version. Then there is no need to resolve after a pin
0 commit comments