-
Notifications
You must be signed in to change notification settings - Fork 112
feat: selective clean
functionality
#1171
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
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.
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_settings
helper - 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 PR adds new options to the
fpm clean
command 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