Skip to content
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

upgrade clap #244

Merged
merged 6 commits into from
Jun 5, 2024
Merged

upgrade clap #244

merged 6 commits into from
Jun 5, 2024

Conversation

tiye
Copy link
Member

@tiye tiye commented May 23, 2024

No description provided.

@tiye tiye requested a review from a team May 23, 2024 17:38
Copy link
Contributor

coderabbitai bot commented May 23, 2024

Walkthrough

The recent updates primarily focus on version increments for the calcit package and several dependencies, while also downgrading a few. Notable changes include modifications to command-line argument handling across multiple Rust source files, reflecting updates in the clap crate's API. Additionally, there are documentation updates to reflect a file renaming for better semantic clarity.

Changes

Files Change Summary
Cargo.toml Incremented calcit version, updated cirru_edn, cirru_parser, clap, and downgraded strum, strum_macros.
README.md Renamed package.cirru to deps.cirru and updated references.
package.json Updated @calcit/procs version from 0.8.52 to 0.8.56.
src/bin/bundle_calcit.rs Replaced cli_matches.is_present with cli_matches.get_flag and cli_matches.value_of with cli_matches.get_one::<String>.
src/bin/calcit_deps.rs Refactored CLI argument parsing from value_of to get_one and is_present to get_flag.
src/bin/git/mod.rs Updated error handling to include stderr in error messages.
src/bin/cr.rs Updated CLI argument processing methods to get_one and get_flag.
src/cli_args.rs Replaced .takes_value(false) with .num_args(0) and adjusted argument handling for dep.

Poem

In the land of code, where versions grow,
Updates come, dependencies flow.
Flags now clear, their meanings show,
Through clap's new ways, the changes glow.
With files renamed, and errors tamed,
Our calcit shines, forever famed. 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 972e08d and 09a9228.
Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing (6)
  • Cargo.toml (2 hunks)
  • package.json (1 hunks)
  • src/bin/bundle_calcit.rs (3 hunks)
  • src/bin/calcit_deps.rs (2 hunks)
  • src/bin/cr.rs (4 hunks)
  • src/cli_args.rs (2 hunks)
Files skipped from review due to trivial changes (4)
  • Cargo.toml
  • package.json
  • src/bin/calcit_deps.rs
  • src/cli_args.rs
Additional comments not posted (13)
src/bin/bundle_calcit.rs (6)

26-26: Refactor to use get_flag for boolean flags enhances clarity.


27-27: Ensure that get_one is used correctly for mandatory string arguments.


28-28: Correct usage of get_one for mandatory string arguments.


41-41: Refactor to use get_flag for boolean flags is consistent with other changes.


43-43: Ensure that get_one is used correctly for mandatory string arguments.


286-286: Updated CLI argument definitions to use .num_args(0) or .num_args(1) as appropriate.

Also applies to: 294-294, 301-301, 308-308

src/bin/cr.rs (7)

46-56: Refactor to use get_one and get_flag for argument parsing improves type safety and clarity.


58-58: Correct use of get_flag for boolean flags.


59-59: Ensure that get_one is used correctly for optional string arguments.


79-79: Correct use of get_one for mandatory string arguments.


87-87: Correct use of get_many for handling multiple values.


108-111: Correct use of get_one for mandatory string arguments and proper error handling.


129-135: Refactor to use get_one for optional string arguments and ensure proper ownership handling with .to_owned().

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range and nitpick comments (3)
README.md (3)

Line range hint 3-3: Consider adding a comma after "ClojureScript" for better readability.

- Semantically a dialect of ClojureScript. Built with Rust.
+ Semantically a dialect of ClojureScript, built with Rust.

Line range hint 70-70: Add a comma after "By default" for grammatical correctness.

- By default Calcit reads `:init-fn` and `:reload-fn` inside `compact.cirru` configs.
+ By default, Calcit reads `:init-fn` and `:reload-fn` inside `compact.cirru` configs.

Line range hint 85-85: Consider adding a comma after "However" for grammatical correctness.

- However it might require a lot of JavaScript interop.
+ However, it might require a lot of JavaScript interop.
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 09a9228 and 9ec0acb.
Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing (4)
  • Cargo.toml (2 hunks)
  • README.md (2 hunks)
  • package.json (1 hunks)
  • src/bin/calcit_deps.rs (4 hunks)
Files skipped from review as they are similar to previous changes (3)
  • Cargo.toml
  • package.json
  • src/bin/calcit_deps.rs
Additional Context Used
LanguageTool (4)
README.md (4)

Near line 3: Possible missing comma found.
Context: ### Calcit Scripting Language > Semantically a dialect of ClojureScript. Built with ...


Near line 34: Loose punctuation mark.
Context: ... 3 binaries are installed: -calcit, the runtime and js compiler - caps`, f...


Near line 70: Did you mean: “By default,”?
Context: ...ru # watch mode enabled by default ``` By default Calcit reads :init-fn and `:reload-fn...


Near line 85: A comma may be missing after the conjunctive/linking adverb ‘However’.
Context: ...Script and runs in consistet semantics. However it might require a lot of JavaScript in...

Markdownlint (5)
README.md (5)

5: null
Bare URL used


6: null
Bare URL used


7: null
Bare URL used


161: null
Bare URL used


162: null
Bare URL used

Additional comments not posted (1)
README.md (1)

110-110: This section on modules is clear and informative.

README.md Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 9ec0acb and d4003cb.
Files selected for processing (2)
  • src/bin/calcit_deps.rs (6 hunks)
  • src/bin/git/mod.rs (7 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/bin/calcit_deps.rs
Additional comments not posted (6)
src/bin/git/mod.rs (6)

41-42: Handle potential UTF-8 conversion errors gracefully.


71-72: Handle potential UTF-8 conversion errors gracefully.


103-104: Handle potential UTF-8 conversion errors gracefully.


122-123: Handle potential UTF-8 conversion errors gracefully.


137-138: Handle potential UTF-8 conversion errors gracefully.


155-156: Handle potential UTF-8 conversion errors gracefully.

src/bin/git/mod.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between d4003cb and 94e7d5d.
Files selected for processing (2)
  • src/bin/calcit_deps.rs (7 hunks)
  • src/bin/git/mod.rs (7 hunks)
Files skipped from review as they are similar to previous changes (2)
  • src/bin/calcit_deps.rs
  • src/bin/git/mod.rs

tiye and others added 2 commits May 25, 2024 02:37
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 94e7d5d and 2a353d1.
Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing (4)
  • Cargo.toml (2 hunks)
  • package.json (1 hunks)
  • src/bin/cr.rs (4 hunks)
  • src/bin/git/mod.rs (7 hunks)
Files skipped from review as they are similar to previous changes (4)
  • Cargo.toml
  • package.json
  • src/bin/cr.rs
  • src/bin/git/mod.rs

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 2a353d1 and 19a3eb1.

Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing (3)
  • Cargo.toml (3 hunks)
  • package.json (1 hunks)
  • src/calcit.rs (1 hunks)
Additional context used
Biome
Additional comments not posted (3)
package.json (1)

3-3: Version update from 0.8.52 to 0.8.56 looks good.

Cargo.toml (2)

3-3: Version update from 0.8.52 to 0.8.56 looks good.


23-23: Dependency updates for cirru_edn, cirru_parser, clap, strum, and strum_macros are correctly updated as per the PR objectives.

Also applies to: 25-25, 27-27, 38-39

@NoEgAm NoEgAm merged commit 332a769 into main Jun 5, 2024
2 checks passed
@NoEgAm NoEgAm deleted the upgrade-clap branch June 5, 2024 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants