-
Notifications
You must be signed in to change notification settings - Fork 129
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
refactor: Upgrade kclvm/cmd clap version to 4.x #560
Conversation
/assign @Peefy |
Pull Request Test Coverage Report for Build 5103381836
💛 - Coveralls |
Thank you for your contribution. I have allowed testing and you can execute |
I have discovered some issues while executing the example,I will solve them. |
OK, go ahead! |
@niconical CI failed, corresponding test cases need to be modified. |
Signed-off-by: cuih <cuihang97@foxmail.com>
I noticed a FAILED reported in CI FAILED test_grammar.py::test_grammar[/home/ch/kcl/test/grammar/builtins/json/output_2] - ruamel.yaml.parser.ParserError: expected '<document start>', but found ('<scalar>',) But when I use the latest kcl release version to execute Here are some environment parameters:
$ kclvm_cli version
Version: 0.5.0-alpha.1-eb2f4d1aabc2a287c298bc35c5fcfec1
Platform: x86_64-unknown-linux-gnu
GitCommit: VERGEN_IDEMPOTENT_OUTPUT
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy |
Thank you for your feedback. After investigation, it has been found that there has been a change in the logic of the upstream YAML library. I have temporarily fixed the version of |
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.
LGTM
1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):
fix #333
2. What is the scope of this PR:
3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):
Summary of changes:
Arg.num_args
multiple_values
andtakes_value
ArgMatches.get_one
andArgMatches.get_many
in place ofArgMatches.value_of*
andArgMatches.values_of*
occurrences_of
withArgAction::Count
andget_count
for flag countingoccurrences_of
withget_flag
for flags whether4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):
This PR updates the dependency of clap from 3.x to 4.x in kclvm/cmd, resulting in significant changes to the CLI interface style, such as color support.
5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:
If there are any defects in this PR, please contact me in time.
6. Release note
Please refer to Release Notes Language Style Guide to write a quality release note.