Skip to content

Commit 402f37f

Browse files
IanButterworthKristofferC
authored andcommitted
set julia_version in manifest during resolve only
(cherry picked from commit 52a2eeb)
1 parent 092703e commit 402f37f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Operations.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,13 @@ end
288288
function resolve_versions!(env::EnvCache, registries::Vector{Registry.RegistryInstance}, pkgs::Vector{PackageSpec}, julia_version)
289289
# compatibility
290290
if julia_version !== nothing
291+
env.manifest.julia_version = julia_version
291292
v = intersect(julia_version, get_compat(env.project, "julia"))
292293
if isempty(v)
293294
@warn "julia version requirement for project not satisfied" _module=nothing _file=nothing
294295
end
296+
else
297+
env.manifest.julia_version = VERSION
295298
end
296299
names = Dict{UUID, String}(uuid => stdlib for (uuid, stdlib) in stdlibs())
297300
# recursive search for packages which are tracking a path

src/Types.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ Base.:(==)(t1::PackageEntry, t2::PackageEntry) = t1.name == t2.name &&
261261
Base.hash(x::PackageEntry, h::UInt) = foldr(hash, [x.name, x.version, x.path, x.pinned, x.repo, x.tree_hash, x.deps, x.uuid], init=h) # omits `other`
262262

263263
Base.@kwdef mutable struct Manifest
264-
julia_version::Union{Nothing,VersionNumber} = Base.VERSION
264+
julia_version::Union{Nothing,VersionNumber} = nothing # only set to VERSION when resolving
265265
manifest_format::VersionNumber = v"2.0.0"
266266
deps::Dict{UUID,PackageEntry} = Dict{UUID,PackageEntry}()
267267
other::Dict{String,Any} = Dict{String,Any}()

0 commit comments

Comments
 (0)