-
Notifications
You must be signed in to change notification settings - Fork 99
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
add clean command #665
add clean command #665
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition. In a few situations I recall deleting the build folder manually to get things work again (it might have been due to some clashes after upgrading fpm).
Brevity is the soul of wit. - WS Co-authored-by: Ivan Pribec <ivan.pribec@gmail.com>
Instead of asking at a prompt, why not to also add |
Would it make sense to reuse the Following this line of reasoning, we could perhaps have
In any case, I think it's worth some debate whether this should be a new subcommand or a subcommand option. |
Would it be too complicated to have both? I think those are two distinct, typical use cases:
|
I fail to see how those two cases are distinct unless you mean My motivation to comment was primarily because introducing a new subcommand should not be taken lightly. The sub-command
I do like the analogy between |
Yes, this is what I meant. So I might have misinterpreted your comment then, sorry.
Agreed. A lot of people, I suspect, would be familiar with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Andre @freevryheid. I agree that having a fpm clean
command would be good however my preference would be that, by default, it only removes the build output files and not also the dependencies folder. (An additional flag could be specified to remove the dependencies also.)
Yes fpm build -d
is also a possible option, however I caution against this because under normal operation it should not be necessary for users to frequently do clean+build. This would imply some deficiency with fpm (e.g. #463).
I like fpm clean
as the command since that is what would be most expected
Indeed, I often delete things by
If we add it to Just yesterday I wrongly specified a branch of a dependency ( Overall, I think it's fine to add |
Good point and I agree. With this observation in mind, I'll take back my previous preference to provide also clean+build, clean+run, etc... |
After reviewing |
Thanks for the discussion everyone, I think we've come to a decision on the specification for this as outline in Ondrej's comment. Andre @freevryheid, are you happy to update this PR accordingly? |
Thanks, I'll give it a shot. |
add missing dash to clean all option
I just added a CLI test for |
And here's another patch that adds the |
Btw, I tested on both bare-metal Linux (Ubuntu 20.04.4 LTS) and a Windows 10 VM (using @LKedward's quick start Fortran installer for Windows). I think this PR is ready to be merged, unless somebody wants to clean it up further to use |
Thanks. Let's get this done. I am missing |
Many thanks Andre @freevryheid and Wileam @wyphan, and apologies for the delay in reviewing this. @freevryheid are you able to take a look at the patches from @wyphan? I hope to have some time to review and test this in the coming week. |
wyphan's patches includes a fix for the issue discussed here: #668 |
@freevryheid Huh that's weird, I didn't recall patching that file too ( |
@wyphan, yep I made the changes to installer.f90 a while back - forgot they were in there when I merged and committed your patches. |
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
Co-authored-by: Laurence Kedward <laurence.kedward@bristol.ac.uk>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks again Andre @freevryheid and Wileam @wyphan, this all looks good to me 👍
And thanks for reviewing @awvwgk. If there aren't any further comments here, then I'll go ahead and merge this tomorrow.
Just a matter of style, but why the very terse options "-d" and "-D"? I
would never be able to remember which one is which ;). Why not use complete
words?
Op di 15 mrt. 2022 om 13:26 schreef Emanuele Pagone <
***@***.***>:
… Would it be too complicated to have both?
I think those are two distinct, typical use cases:
- you want to "clean" and then decide what to do (e.g. follow-up with fpm
run or fpm test, etc...)
- you know already you want to re-build or re-run and then you'll use
the flags -d or -D
—
Reply to this email directly, view it on GitHub
<#665 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN6YR5QJ46A5FW5LY7A5UTVAB6WZANCNFSM5PRXMYKQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I think what was actually implemented is |
NAMEclean(1) - delete the build SYNOPSISfpm clean DESCRIPTIONPrompts the user to confirm deletion of the build. If affirmative, OPTIONS--skip delete the build without prompting but skip dependencies. USAGE:
From the --usage key no short names were given for --skip and --all. It seems there are strong opinions about assigning short names to the commands in some discussions both for and against; but it would be a four-character change to the code to assign short names. Where it defines --all F you would change it to --all:a F, for example. Just add :LETTER after the name when it is defined in set_arg. Maybe there should be a discussion about whether short names should be required or eshewed. |
Only tested on linux.
Closes #454