- Create a new SwiftPM package.
- Add (say) ArgumentParser as a dependency https://github.com/apple/swift-argument-parser
- Add import ArgumentParser to one of the source code files. Things should compile okay with swift build.
- Remove the ArgumentParser dependency from Package.swift
- Run swift build again.
Expected behavior: Second run of swift build should fail because ArgumentParser is no longer a dependency, so the module should fail to import.
Actual behavior: Second run of swift build succeeds, but trying swift build -c release fails with the expected error.