Following the instructions from Pkg docs, I ran the following commands to add two dependecies that I only need for tests:
Starting Julia...
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.2.0 (2019-08-20)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
(v1.2) pkg> activate ./test
(test) pkg> add Test DataStructures
Updating registry at `C:\Users\carlm\.juliapro\JuliaPro_v1.2.0-1\registries\JuliaPro`
Updating git-repo `https://pkg.juliacomputing.com//registry/JuliaPro`
Resolving package versions...
Updating `C:\Users\carlm\workspace\montecarlo\MC\test\Project.toml`
[no changes]
Updating `C:\Users\carlm\workspace\montecarlo\MC\test\Manifest.toml`
[no changes]
(test) pkg> activate .
(MC) pkg> test
Testing MC
ERROR: target `test` has unlisted dependency `Test`
My Project.toml
and test/Project.toml
are as follows:
Project.toml
name = "MC"
uuid = "769ab3d0-0d7b-11ea-0685-592be65fdeeb"
authors = ["Carl Morris"]
version = "0.1.0"
[compat]
julia = "1"
[targets]
test = ["Test"]
test/Project.toml
[deps]
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
I create my project using PkgTemplates
in case that’s relevant. Any pointer to where I went wrong?