"Package.resolved" Error with local packages

Let's say you're creating two packages on a local drive, package 'A' and package 'B'.

Is it possible, in A's "Package.swift" file to read (from a JSON or XML file) the path to B, and then add it as a Package.Dependency?

I've written my Package.swift script to do so (actually I'm resolving an alias file instead of getting the path from JSON). The problem is: although A's script definitely can read the correct relative path to B (I've logged it to the console and it's fine), no matter what I do, the build always errors out:

"the Package.resolved file is most likely severely out-of-date and is preventing correct resolution; delete the resolved file and try again"

This happens so reliably that I assume it's either the (1) script timing out, or (2) some kind of sand-boxing. Either way, the message is pretty useless.

I've checked ".swiftpm" and I see no trace of any "Package.resolved" file. Deleting ".swiftpm" doesn't fix the issue.

Can anyone shed some light? I'm out of ideas.
Yeah, so actually I see message in Console saying "packer-manifest(7818) System Policy: deny(1) file-read-data /private/var/folders/ /T/com.apple.dt.IDECacheDeleteAppExtension/TemporaryItems"

So, so much for that idea, it looks like a sandbox issue. Wow, that makes life difficult.
Correct, package resolution is sandboxed to only be able to access content in the package's own directory.
"Package.resolved" Error with local packages
 
 
Q