Unable to access local package stored on iCloud Drive

I have a package stored on iCloud Drive and want to list it as a dependency in another package. This worked fine when the package was stored on the Mac hard drive, but moving it to iCloud seems to cause a problem.

dependencies: [ .package(url: "file:///Users/bill/Library/Mobile Documents/com~apple~CloudDocs/Projects/Matrix", from: "0.0.1") ],

This results in an Xcode error message:

x-xcode-log://812C74F5-B7CA-4E15-A87C-E6C9586B0926 /Users/bill/Library/Mobile%20Documents/com~apple~CloudDocs/Projects/Matrix: The source control operation failed because the specified URL cannot be used. Make sure the URL is valid and try again.

Can anyone advise how to make the URL valid, or is storing the package on iCloud Drive not yet possible?