# Handling dependencies for non-src, non-test code

**URL:** <https://discourse.julialang.org/t/handling-dependencies-for-non-src-non-test-code/123634>\
**Category:** New to Julia\
**Tags:** package\
**Created:** [December 9, 2024, 9:47pm UTC](https://discourse.julialang.org/t/handling-dependencies-for-non-src-non-test-code/123634 "2024-12-09T21:47:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NelisDrost](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nelisdrost/32/214038_2.png) [@NelisDrost](https://discourse.julialang.org/u/NelisDrost)\
**Post date:** [December 9, 2024, 9:47pm UTC](https://discourse.julialang.org/t/handling-dependencies-for-non-src-non-test-code/123634/1 "2024-12-09T21:47:31Z")

</div>

I’m developing a package that has a different set of dependencies during development than it should for the user. Specifically, the user version depends on a specific set of DifferentialEquations packages, rather than the whole thing (to save on disk space + precompilation time), while in development I use the whole package to run benchmarks against different solvers.

In Python, I’d be able to specify different dependencies for, e.g.: [dev] and [test], but it seems like the intended way to achieve this in Julia (for test code) to put that code in a test/ folder with its own Project.toml.

I’ve tried to do the same thing in my benchmarking code, creating a benchmarking/ folder inside my package folder (next to src/, test/, and the package Project.toml). Inside that folder I have a Project.toml with my additional dependencies.

I now have two questions:  
1 - is this the right approach so far?  
2 - how do I include my package as a dependency to my benchmarking code, so that I can `import` it?

---

<div class="post-metadata">

**Author:** ![danielwe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielwe/32/35657_2.png) [@danielwe](https://discourse.julialang.org/u/danielwe)\
**Post date:** [December 10, 2024, 3:47am UTC](https://discourse.julialang.org/t/handling-dependencies-for-non-src-non-test-code/123634/2 "2024-12-10T03:47:37Z")

</div>

There’s special sauce for merging the src and test dependencies when running tests. You won’t get that for your benchmarking folder. Instead, a common approach is to `dev` the base package in the benchmarking environment. From the package folder, assuming your benchmarking environment is in `./benchmarking`, do the following

```bash
$ julia --project=benchmarking
julia> ]
(benchmarking) pkg> dev .
(benchmarking) pkg> add <other benchmarking deps>

```

Now you should be able to import both your package and the benchmarking-specific dependencies when running code in the `benchmarking` environment.
