Skip to content

Commit b1e7517

Browse files
set julia_version in manifest during resolve only
(cherry picked from commit 52a2eeb)
1 parent fa7e82a commit b1e7517

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
@@ -361,10 +361,13 @@ end
361361
function resolve_versions!(ctx::Context, pkgs::Vector{PackageSpec})
362362
# compatibility
363363
if ctx.julia_version !== nothing
364+
ctx.env.manifest.julia_version = ctx.julia_version
364365
v = intersect(ctx.julia_version, project_compatibility(ctx, "julia"))
365366
if isempty(v)
366367
@warn "julia version requirement for project not satisfied" _module=nothing _file=nothing
367368
end
369+
else
370+
ctx.env.manifest.julia_version = VERSION
368371
end
369372
names = Dict{UUID, String}(uuid => stdlib for (uuid, stdlib) in stdlibs())
370373
# 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
@@ -221,7 +221,7 @@ Base.:(==)(t1::PackageEntry, t2::PackageEntry) = t1.name == t2.name &&
221221
Base.hash(x::PackageEntry, h::UInt) = foldr(hash, [x.name, x.version, x.path, x.pinned, x.repo, x.tree_hash, x.deps], init=h) # omits `other`
222222

223223
Base.@kwdef mutable struct Manifest
224-
julia_version::Union{Nothing,VersionNumber} = Base.VERSION
224+
julia_version::Union{Nothing,VersionNumber} = nothing # only set to VERSION when resolving
225225
manifest_format::VersionNumber = v"1.0.0" # default to older flat format
226226
deps::Dict{UUID,PackageEntry} = Dict{UUID,PackageEntry}()
227227
other::Dict{String,Any} = Dict{String,Any}()

0 commit comments

Comments
 (0)