Test deps with workspaces

I have a few questions on the new workflow for test dependencies, which should be enabled in 1.12 thanks to the [workspace] section:

  1. Does the parent package have to be listed in test/Project.toml now? It didn’t have to before and it is not demanded by the docs, but my preliminary tests suggest this is necessary now.

Parent Project.toml:

name = "MyPkg"
uuid = "5ac2c900-a191-4ac4-ac14-729ea0a25c21"
version = "0.1.0"
authors = ["Guillaume Dalle"]

[workspace]
projects = ["test"]

test/Project.toml:

[deps]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

Pkg.test error:

(MyPkg) pkg> test
      Status `~/Documents/GitHub/Julia/_Scratchpad/MyPkg/test/Project.toml`
  [8dfed614] Test v1.11.0
      Status `~/Documents/GitHub/Julia/_Scratchpad/MyPkg/Manifest.toml`
  [2a0f44e3] Base64 v1.11.0
  [b77e0a4c] InteractiveUtils v1.11.0
  [ac6e5ff7] JuliaSyntaxHighlighting v1.12.0
  [56ddb016] Logging v1.11.0
  [d6f4376e] Markdown v1.11.0
  [9a3f8284] Random v1.11.0
  [ea8e919c] SHA v0.7.0
  [9e88b42a] Serialization v1.11.0
  [f489334b] StyledStrings v1.11.0
  [8dfed614] Test v1.11.0
     Testing Running tests...
ERROR: LoadError: ArgumentError: Package MyPkg not found in current path.
- Run `import Pkg; Pkg.add("MyPkg")` to install the MyPkg package.
  1. Does this way of pointing to the parent package from the tests actually go look for it in the parent folder, like the [sources] does?

My understanding is that all projects in a workspace are resolved at once and so share a single top-level Manifest.toml, and:

  1. Each project still needs to list all the packages it directly depends on. So your tests do need to depend on the package being tested. I think the magical project merging for the test environment that occurs with the older ways of declaring test deps doesn’t happen when using workspaces - it’s just an ordinary project.
  2. I believe you don’t need to specify the source for the package being tested, since it is implied by the top-level project, which is resolved at the same time.

(Caveat: I am also getting my head around workspaces too.)

Yeah, I’ve had success just putting MyPkg with the uuid into the deps section of test/Project.toml