Failed to resolve dependencies Dependencies could not be resolved because package 'nestedpackage' is required using a stable-version but 'nestedpackage' depends on an unstable-version package 'localpackage' and root depends on 'nestedpackage' 1.1.0

I have a Remote package NestedPackage which modularizes its code into another local package LocalPacakge. This setup works fine when I use RemotePackage from its Package.swift but it fails to integrate in another package or Xcode project as a dependency.

I understand what is happening but why is this configuration not supported? Why does SPM care that a remote package has its code in another directory (that is also a package but local)?

See the code for NestedPackage here NestedPackage/Package.swift at master · shahzadmajeed/NestedPackage · GitHub

Here is the error when I use NestedPackage

Presumably the reason is that SwiftPM can't guarantee that it will be available when the package is cloned. Lets assume you set the path to ../MyOtherPackage - SwiftPM won't be able to clone that since it won't exist in the repo which would then be a problem