You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Test-specific dependencies section of the documentation currently only lists two older methods for specifying test-specific dependencies:
[targets] + [extras] in main Project.toml
test/Project.toml: add only additional dependencies there
Both of these older methods have been somewhat unsatisfactory: they only work via special magic applied by Pkg.test(), and they do not work if one simply tries to activate a local test environment with julia --project=test/ runtests.jl.
Fortunately there are now two new, alternative, better ways of solving this problem, which do not rely on special magic applied by Pkg.test(), and these finally allow the test folder to be just a normal project:
[source] in test/Project.toml: under [deps] add ProjectName=UUID as a dependency and under [source] also add ProjectName={path='..'} such that the cd test/ && julia --project environment finds the project to test in its own parent folder
[workspace] in Project.toml: add projects = ["test"] such that the test environment finds the project to test in its own parent folder
The Test-specific dependencies section of the documentation currently only lists two older methods for specifying test-specific dependencies:
[targets]
+[extras]
in mainProject.toml
test/Project.toml
: add only additional dependencies thereBoth of these older methods have been somewhat unsatisfactory: they only work via special magic applied by
Pkg.test()
, and they do not work if one simply tries to activate a local test environment withjulia --project=test/ runtests.jl
.Fortunately there are now two new, alternative, better ways of solving this problem, which do not rely on special magic applied by
Pkg.test()
, and these finally allow the test folder to be just a normal project:[source]
intest/Project.toml
: under[deps]
addProjectName=UUID
as a dependency and under[source]
also addProjectName={path='..'}
such that thecd test/ && julia --project
environment finds the project to test in its own parent folder[workspace]
inProject.toml
: addprojects = ["test"]
such that the test environment finds the project to test in its own parent folderAt the moment, these new features are still hidden in the
Project.toml
format descriptionIt would be great to have these documented as well under https://pkgdocs.julialang.org/dev/creating-packages/#Test-specific-dependencies
The text was updated successfully, but these errors were encountered: