New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-7596] Add new alias 'swift clean' that means 'swift package clean' #4819
Comments
Why do you need to clean? I think its important to fix the issues that forces people to clean rather than promoting clean operations. |
Also, adding a top level command requires an evolution proposal. |
At the moment, it's easier to do rm -rf .build, but this blows away the checkouts and caches. It would be fat better to run swift [package] clean, but that's more characters at the moment. Also, if you consider the scope of other tools 'make clean; make test', 'go test', 'go clean', 'mvn clean', 'mvn compile' they all have a clean command. Even git has a clean command for removing detritus. I don't think you need to try and justify it because 'you shouldn't need cleaning'. Every build system has it, and swift package manager surfaces it through swift package clean, so it should be a top level command like 'swift test', 'swift run' etc. |
I am not sure if I agree with the philosophy of copying things from other build systems just because they have it. IMO the build system should be smart enough to take care of cleaning when required. Currently, cleaning is sometimes required for SwiftPM packages but those are open bugs. Two concrete examples:
LLBuild has a feature called "stale-file removal" which can solve the above two issues. I think we should try to understand why people are performing clean operations and try to solve those problems. If you really think `swift clean` should be a top level command, please open a thread on Swift forums 🙂 . |
Attachment: Download
Additional Detail from JIRA
md5: 6aee4842767f1afbc8c6e5c52041ec60
Issue Description:
I have a custom bash script, called swift-clean, which just runs 'swift package clean'. It means that at the command line, I can do:
$ swift clean
in the same way that we do
$ swift build
$ swift test
$ swift run
Having a short cut would increase the utility of the functionality
The text was updated successfully, but these errors were encountered: