feat: selective clean functionality - #1171
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds selective cleaning functionality to the fpm clean command, allowing users to delete specific types of build artifacts instead of the entire build directory. The implementation introduces new command-line flags (--test, --apps, --examples) and adds target-specific deletion logic.
- Adds selective cleaning flags for test, app, and example executables
- Refactors command-line parsing to use a shared
build_settingshelper - Implements target filtering and deletion for specific artifact types
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/fpm_command_line.f90 |
Adds new clean flags, refactors build settings initialization, and implements validation logic |
src/fpm.f90 |
Implements target-specific deletion functionality with scope filtering |
test/cli_test/cli_test.f90 |
Adds test cases for the new selective clean command options |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds new options to the
fpm cleancommand for selectively deleting specific types of build artifacts:--test- Delete only test executables--apps- Delete only application executables--examples- Delete only example executablesUsage
fpm clean --test# Delete only test executablesfpm clean --apps# Delete only app executablesfpm clean --examples# Delete only example executablesfpm clean --test --apps# Delete both test and app executablesThis allows to quickly clean specific build artifacts without rebuilding everything.
Resolves requirement for selective build artifact cleanup. Close #1136