Interactive testing and test-specific dependencies

The current situation is clearly sub-optimal and it would be really nice to fix Pkg.jl#1233.


With the setup you describe I would simply add Foo to test/Project.toml using a relative path. You would then have something like:

$ tree .
.
├── Manifest.toml
├── Project.toml
├── src
│   └── Foo.jl
└── test
    ├── Manifest.toml
    ├── Project.toml
    └── runtests.jl

2 directories, 6 files

$ pkg --project=test dev .
   Resolving package versions...
    Updating `/tmp/tmp.w9xxYUTzYF/Foo/test/Project.toml`
  [8722260b] + Foo v0.1.0 `..`
    Updating `/tmp/tmp.w9xxYUTzYF/Foo/test/Manifest.toml`
  [8722260b] + Foo v0.1.0 `..`

Note that I devd with a relative path (.) and that the path for Foo in test/Manifest.toml is stored relative to the project (..).

Another way I often use is to simply add the test dependencies to the main project (but not committing it, obviously).


Edit: I forgot to mention the TestEnv.jl package, which tries to mimic Pkg.jl#1233. I have not used this myself though.

1 Like