We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7311051 commit b13bd2dCopy full SHA for b13bd2d
src/Types.jl
@@ -247,6 +247,7 @@ Base.@kwdef mutable struct Project
247
uuid::Union{UUID, Nothing} = nothing
248
version::Union{VersionTypes, Nothing} = nothing
249
manifest::Union{String, Nothing} = nothing
250
+ path::Union{String, Nothing} = nothing
251
# Sections
252
deps::Dict{String,UUID} = Dict{String,UUID}()
253
# deps that are also in weakdeps for backwards compat
@@ -576,7 +577,8 @@ function read_package(path::String)
576
577
pkgerror("expected a `uuid` entry in project file at `$(abspath(path))`")
578
end
579
name = project.name
- if !isfile(joinpath(dirname(path), "src", "$name.jl"))
580
+ pkgpath = joinpath(dirname(path), something(project.path, ""))
581
+ if !isfile(joinpath(pkgpath, "src", "$name.jl"))
582
pkgerror("expected the file `src/$name.jl` to exist for package `$name` at `$(dirname(path))`")
583
584
return project
src/project.jl
@@ -122,6 +122,7 @@ function Project(raw::Dict; file=nothing)
122
project.other = raw
123
project.name = get(raw, "name", nothing)::Union{String, Nothing}
124
project.manifest = get(raw, "manifest", nothing)::Union{String, Nothing}
125
+ project.path = get(raw, "path", nothing)::Union{String, Nothing}
126
project.uuid = read_project_uuid(get(raw, "uuid", nothing))
127
project.version = read_project_version(get(raw, "version", nothing))
128
project.deps = read_project_deps(get(raw, "deps", nothing), "deps")
@@ -179,6 +180,7 @@ function destructure(project::Project)::Dict
179
180
entry!("uuid", project.uuid)
181
entry!("version", project.version)
182
entry!("manifest", project.manifest)
183
+ entry!("path", project.path)
184
entry!("deps", merge(project.deps, project._deps_weak))
185
entry!("weakdeps", project.weakdeps)
186
entry!("extras", project.extras)
0 commit comments