Project.toml in test directory vs extras

I’m working on a package now which has a separate Poject.toml in the test directory. But DataFrames and others have all their test dependencies listed in extra in the main Project.toml. Is there anything I can read for when to use one approach vs the other?

If you want to support julia versions older than 1.2 then you need the extras approach. The test environment is the new way of doing things

1 Like

Ah interesting. Do you have a source for that?

The two pieces of info that I know of:

https://pkgdocs.julialang.org/v1/creating-packages/#Test-specific-dependencies-in-Julia-1.2-and-above

This says the interface with test/Project.toml is still experimental.

Then there is an older discussion

The issue mentioned here (#1223) is still open, so the comment of the interface being considered beta probably still applies.

https://pkgdocs.julialang.org/dev/creating-packages/#Test-specific-dependencies-in-Julia-1.2-and-above

Note that there are two documentstions for the package manager: one is a concise one within the general julia documentation, and an other one, at the given link, more exhaustive…