JuliaLang / Pkg.jl

Pkg - Package manager for the Julia programming language
https://pkgdocs.julialang.org
Other
610 stars 251 forks source link

[extensions] is ignored in JuliaProject.toml #3815

Open xitology opened 4 months ago

xitology commented 4 months ago

When the project file is called JuliaProject.toml (as opposed to Project.toml), its [extensions] section is ignored by Pkg.jl. It must be caused to the hard-coded filename in https://github.com/JuliaLang/Pkg.jl/blob/master/src/Operations.jl#L168.

This could be reproduced with a package from Pkg.jl tests:

cd test/test_packages/ExtensionExamples/HasExtensions.jl
# Verify that it works
julia --project=@hasext-good -e 'using Pkg; Pkg.add("OffsetArrays"); Pkg.add("IndirectArrays"); Pkg.develop(path="."); include("test/runtests.jl")'
# Rename *.toml files
mv Project.toml JuliaProject.toml
mv Manifest.toml JuliaManifest.toml
# Verify that it no longer works
julia --project=@hasext-bad -e 'using Pkg; Pkg.add("OffsetArrays"); Pkg.add("IndirectArrays"); Pkg.develop(path="."); include("test/runtests.jl")'
KristofferC commented 4 months ago

Yep, seems like a straight up bug. Happy for a PR.