Skip to content

Commit

Permalink
add preference for version named manifest files
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Jan 17, 2022
1 parent 3522661 commit 05d2597
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@ end
## generic project & manifest API ##

const project_names = ("JuliaProject.toml", "Project.toml")
const manifest_names = ("JuliaManifest.toml", "Manifest.toml")
const manifest_names = ("JuliaManifest$(VERSION.major).$(VERSION.minor).toml", "JuliaManifest.toml",
"Manifest$(VERSION.major).$(VERSION.minor).toml", "Manifest.toml")
const preferences_names = ("JuliaLocalPreferences.toml", "LocalPreferences.toml")

# classify the LOAD_PATH entry to be one of:
Expand Down
2 changes: 1 addition & 1 deletion stdlib/Artifacts/src/Artifacts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function parse_toml(path::String)
Base.parsed_toml(path)
end

# keep in sync with Base.project_names and Base.manifest_names
# keep in sync with Base.project_names
const artifact_names = ("JuliaArtifacts.toml", "Artifacts.toml")

const ARTIFACTS_DIR_OVERRIDE = Ref{Union{String,Nothing}}(nothing)
Expand Down
1 change: 0 additions & 1 deletion stdlib/Artifacts/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,5 @@ end
@testset "`Artifacts.artifact_names` and friends" begin
n = length(Artifacts.artifact_names)
@test length(Base.project_names) == n
@test length(Base.manifest_names) == n
@test length(Base.preferences_names) == n
end
4 changes: 3 additions & 1 deletion test/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,10 @@ end
@testset "`Base.project_names` and friends" begin
# Some functions in Pkg assumes that these tuples have the same length
n = length(Base.project_names)
@test length(Base.manifest_names) == n
@test length(Base.preferences_names) == n

# there are two manifest names per project name
@test length(Base.manifest_names) == 2n
end

@testset "Manifest formats" begin
Expand Down

0 comments on commit 05d2597

Please sign in to comment.