So it used to be that from the command line, swift build --clean
would clean the build by removing the .build
directory. You could also pass --clean=dist
to get rid of the packages as well.
I just upgraded to Swift 4 and these are apparently gone. Has it been rolled into a subcommand or something? Can anyone point me to some docs on this? I couldn't find them...
Actually, I couldn't find docs on the subcommands at all. I know swift run
and swift package
were introduced. Anyone know where a complete documentation of these and other commands are? I find bits and pieces described in various places, but haven't found the complete doc (that hopefully exists somewhere)
swift build --clean
has been replaced with swift package clean
in swift 4. We made that change here: https://bugs.swift.org/browse/SR-2082
Documentation for stuff like this should be at https://github.com/apple/swift-package-manager/blob/master/Documentation/Usage.md, but it's lacking in some respects. We've just filed an issue to track that:
I also went ahead and filed:
Swift usage message should mention swiftpm commands
SwiftPM command usage messages should mention other top-level commands
Thanks for bringing this up!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With