Removing Swift package from Xcode

In Xcode 11.5, removing a Swift package dependency from Xcode workspace does not delete the checkout data in the DerivedData. Is this behavior expected? If not, has it been fixed in Xcode 12? Should I file a radar?
Post not yet marked as solved Up vote post of jonprescott Down vote post of jonprescott
813 views

Answers

Beyond frustrating because I'm experiencing this too in Xcode 12.0.1, this still has yet to be resolved. Even when I remove the dependency from the project and delete the DerivedData folder, Xcode is checking out these old repositories every time I open my project.
For me I think the fix was changing my Dockerfile to disable automatic resolution. NOTE: that I also deleted my derived data directory.

Code Block
RUN swift build \
--enable-test-discovery \
--disable-automatic-resolution \
-c release \
-Xswiftc -g


Not sure if this had a material impact but while I was in there... I upgraded my docker build:
Code Block
#FROM swift:5.2.3-bionic as build
FROM swift:5.3-bionic as build