I am trying to use workspaces for adding tests to a project. I have added
[workspace]
projects = ["test"]
to the Project.toml in the main package. The pkg>status of the main project is
Project AggregatorX v0.1.0
Status `C:\Users\magnusl\local-work\AggregatorX\Project.toml`
[8bb1440f] DelimitedFiles v1.9.1
⌅ [682c06a0] JSON v0.21.4
[4076af6c] JuMP v1.29.4
[b77e0a4c] InteractiveUtils v1.11.0
In the /test folder there is a Project.toml
[deps]
AggregatorX = "a3088200-1605-46a3-87ce-f04f74214a31"
HiGHS = "87dc4568-4c63-4d18-b0c0-bb2238e4078b"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
or running pkg>status (after activating ./test)
(AggregatorX/test) pkg> status
Status `C:\Users\magnusl\local-work\AggregatorX\test\Project.toml`
[a3088200] AggregatorX v0.1.0 `.`
[87dc4568] HiGHS v1.21.1
⌅ [682c06a0] JSON v0.21.4
[4076af6c] JuMP v1.29.4
[8dfed614] Test v1.11.0
But when I run pkg>test (after activating main project environment) I get
ERROR: LoadError: ArgumentError: Package InteractiveUtils not found in current path.
- Run `import Pkg; Pkg.add("InteractiveUtils")` to install the InteractiveUtils package.
So it seems like the packages that only are explicitly added in the main project (like InteractiveUtils) can’t be seen from the test (i though that was the idea of the workspace, that this should be possible)? Any ideas why?