When to migrate to 1.2-style test-specific dependencies

Are the semantics for test-specific dependencies with test/Project.toml still being finalized?

Who should migrate at this point? (eg adventurous users who don’t mind if things break or change, or more conservative ones who just like the new feature, etc)

Does using this feature implicitly mean dropping CI support for 1.0 or 1.1?

Yes, as stated in the note in the docs the interaction between Manifest.toml and test/Manifest.toml are not quite finalized. I would consider this feature beta until we have solved Proposal for "sub-projects". · Issue #1233 · JuliaLang/Pkg.jl · GitHub.

Feel free to try it out, it should work, and in particular it is very useful to easily simulate the test-environment, e.g. Making test dependencies available at the REPL · Issue #1008 · JuliaLang/Pkg.jl · GitHub

No, Julia 1.0 and 1.1 will still use [targets], but then you will have to maintain both test/Project.toml and [targets] then.

4 Likes

I wasn’t aware this change was happening - just want to say it seems like a very slick way to go. I like that when writing your tests you just plop yourself into the MyPkg/test environment and then you can add/remove packages easily from the pkg> prompt, and run code from Juno, etc. Seems very simple and understandable.

1 Like

FYI, I wanted to use test/Project.toml in Julia < 1.2 so I wrote Run.jl. I find other sub-projects like docs/Project.toml and benchmarks/Project.toml pretty useful too.

3 Likes