# Project.toml in test directory vs extras

**URL:** <https://discourse.julialang.org/t/project-toml-in-test-directory-vs-extras/59199>\
**Category:** General Usage\
**Created:** [April 13, 2021, 1:54pm UTC](https://discourse.julialang.org/t/project-toml-in-test-directory-vs-extras/59199 "2021-04-13T13:54:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [April 13, 2021, 1:54pm UTC](https://discourse.julialang.org/t/project-toml-in-test-directory-vs-extras/59199/1 "2021-04-13T13:54:53Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jishnub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jishnub/32/33620_2.png) [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Post date:** [April 13, 2021, 7:06pm UTC](https://discourse.julialang.org/t/project-toml-in-test-directory-vs-extras/59199/2 "2021-04-13T19:06:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [April 13, 2021, 7:21pm UTC](https://discourse.julialang.org/t/project-toml-in-test-directory-vs-extras/59199/3 "2021-04-13T19:21:39Z")

</div>

Ah interesting. Do you have a source for that?

---

<div class="post-metadata">

**Author:** ![hendri54](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hendri54/32/9621_2.png) [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Post date:** [April 13, 2021, 7:24pm UTC](https://discourse.julialang.org/t/project-toml-in-test-directory-vs-extras/59199/4 "2021-04-13T19:24:58Z")

</div>

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](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

> [@When to migrate to 1.2-style test-specific dependencies](https://discourse.julialang.org/t/when-to-migrate-to-1-2-style-test-specific-dependencies/28205):
>
> Are the semantics for [test-specific dependencies with test/Project.toml](https://julialang.github.io/Pkg.jl/dev/creating-packages/#Test-specific-dependencies-in-Julia-1.2-and-above-1) 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?

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

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [April 13, 2021, 7:28pm UTC](https://discourse.julialang.org/t/project-toml-in-test-directory-vs-extras/59199/5 "2021-04-13T19:28:25Z")

</div>

[https://pkgdocs.julialang.org/dev/creating-packages/#Test-specific-dependencies-in-Julia-1.2-and-above](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](https://docs.julialang.org/en/v1/stdlib/Pkg/) is a concise one within the general julia documentation, and an other one, at the given link, more exhaustive…
