Best IDE to use for Swift Package

I have a package with multiple targets. One target depends on another one. Whenever I edit the manifest file to remove the dependency target, the Xcode builds the target just fine. I always have to clean the build folder before it registers the missing dependency target. And when I add the missing dependency target, I have to clean the build folder and build again, before Xcode finds the newly added dependency; otherwise it still raises the missing dependency error.

It seems Xcode is littered with bugs and is not properly integrated with SPM.
Do you guys have a better IDE/solution?

Use cmd+s to save your file and tell Xcode to rebuild the dependency tree.

You can also use Xcode package menu in the top level menu or by right clicking the package section title above the package list. There you can force an update of the versions or reset the cache which both ask Xcode to rebuild the tree right after the operation.

I would use another ide for Apple platforms but VS code and its official plugin might suit you for other platforms.