Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternative to swift build --clean?

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)

like image 660
Philip Avatar asked Nov 09 '17 03:11

Philip


1 Answers

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!

like image 186
Rick Ballard Avatar answered Oct 12 '22 05:10

Rick Ballard