Skip to content

Commit

Permalink
set julia_version in manifest during resolve only
Browse files Browse the repository at this point in the history
(cherry picked from commit 52a2eeb)
  • Loading branch information
IanButterworth authored and KristofferC committed Jun 16, 2021
1 parent 377045e commit 2018f15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/Operations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,13 @@ end
function resolve_versions!(ctx::Context, pkgs::Vector{PackageSpec})
# compatibility
if ctx.julia_version !== nothing
ctx.env.manifest.julia_version = ctx.julia_version
v = intersect(ctx.julia_version, project_compatibility(ctx, "julia"))
if isempty(v)
@warn "julia version requirement for project not satisfied" _module=nothing _file=nothing
end
else
ctx.env.manifest.julia_version = VERSION
end
names = Dict{UUID, String}(uuid => stdlib for (uuid, stdlib) in stdlibs())
# recursive search for packages which are tracking a path
Expand Down
2 changes: 1 addition & 1 deletion src/Types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ Base.:(==)(t1::PackageEntry, t2::PackageEntry) = t1.name == t2.name &&
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`

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

0 comments on commit 2018f15

Please sign in to comment.