-
Notifications
You must be signed in to change notification settings - Fork 8
refactor(taskfiles)!: Require NAME
to be set if CMAKE_SETTINGS_DIR
is set in utils:cmake:install
(fixes #50).
#57
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
base: main
Are you sure you want to change the base?
Conversation
…s:cmake` by requiring explicit definition and checking it with a precondition.
""" WalkthroughThe changes unify the parameter naming by replacing Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant InstallTask
User->>InstallTask: Invoke install with parameters
alt CMAKE_SETTINGS_DIR is set
InstallTask->>InstallTask: Check CMAKE_PACKAGE_NAME is non-empty (precondition)
InstallTask-->>User: Error if CMAKE_PACKAGE_NAME is empty
else CMAKE_SETTINGS_DIR is not set
InstallTask->>InstallTask: Proceed without CMAKE_PACKAGE_NAME
end
InstallTask-->>User: Complete installation
Possibly related issues
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (9)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
exports/taskfiles/utils/cmake.yaml
(3 hunks)
🔇 Additional comments (2)
exports/taskfiles/utils/cmake.yaml (2)
110-110
: Removal ofNAME
from required vars aligns with new optional behaviour.The prerequisite variables for
install
no longer includeNAME
, matching the conditional requirement introduced below. This change looks correct.
111-119
: Conditional precondition enforcesNAME
whenCMAKE_SETTINGS_DIR
is set.The
preconditions
block correctly checks that.NAME
is non-empty when.CMAKE_SETTINGS_DIR
is provided. Consider trimming whitespace or validating the variable further if needed, but the current check is sound.
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.
For the PR title, how about:
refactor(taskfiles)!: Require `NAME` to be set if `CMAKE_SETTINGS_DIR` is set in `utils:cmake:install` (fixes #50).
CMAKE_SETTINGS_DIR
behaviour in utils:cmake
by requiring explicit definition and checking it with a precondition (fixes #50).NAME
to be set if CMAKE_SETTINGS_DIR
is set in utils:cmake:install
(fixes #50).
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.
For the PR title, how about:
refactor(taskfiles)!: Rename `NAME` to `CMAKE_PACKAGE_NAME` and require it to be set if `CMAKE_SETTINGS_DIR` is set in `utils:cmake:install` (fixes #50).
# @param {string} [CMAKE_SETTINGS_DIR] If set, the directory where the project's CMake settings | ||
# file should be stored. | ||
# @param {string[]} [EXTRA_ARGS] Any additional arguments to pass to the install command. | ||
# @param {string} [CMAKE_PACKAGE_NAME] CMake project name (used in directory names and the CMake |
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.
Do we want to re-alphabetize this now that the var name has changed?
# @param {string} [CMAKE_SETTINGS_DIR] If set, the directory where the project's CMake settings | ||
# file should be stored. | ||
# @param {string[]} [EXTRA_ARGS] Any additional arguments to pass to the install command. | ||
# @param {string} [CMAKE_PACKAGE_NAME] CMake project name (used in directory names and the CMake | ||
# settings file). Required if `CMAKE_SETTINGS_DIR` is set. |
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.
# settings file). Required if `CMAKE_SETTINGS_DIR` is set. | |
# settings file). Required if `CMAKE_SETTINGS_DIR` is set. |
@@ -201,7 +210,7 @@ tasks: | |||
EXTRA_ARGS: | |||
ref: ".CMAKE_INSTALL_ARGS" | |||
INSTALL_PREFIX: "{{.INSTALL_PREFIX}}" | |||
NAME: "{{.NAME}}" | |||
CMAKE_PACKAGE_NAME: "{{.CMAKE_PACKAGE_NAME}}" |
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.
Could alphabetize?
Description
As title says.
Additional minor changes:
NAME
is renamed toCMAKE_PACKAGE_NAME
to avoid issues with WSL where theNAME
environment variable is set by default.CMAKE_SETTINGS_DIR
no longer has a default value inutils:cmake:install-remote-tar
to ensure it is set explicitly and intentionally.Checklist
breaking change.
Validation performed
Tested locally with log-surgeon.
Summary by CodeRabbit
Documentation
NAME
toCMAKE_PACKAGE_NAME
and clarify its requirement whenCMAKE_SETTINGS_DIR
is set.New Features
CMAKE_PACKAGE_NAME
only whenCMAKE_SETTINGS_DIR
is specified.Chores