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

caps Download; thread-first aliases #259

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

caps Download; thread-first aliases #259

wants to merge 4 commits into from

Conversation

tiye
Copy link
Member

@tiye tiye commented Jan 17, 2025

add command on caps

  • caps download org/repo@tag

add alias in Calcit

  • thread-first for ->
  • thread-last for ->>
  • thread-as for ->%

@tiye tiye requested review from a team and Copilot January 17, 2025 17:45
Copy link
Contributor

coderabbitai bot commented Jan 17, 2025

Walkthrough

This pull request introduces several updates across the Calcit project. The changes include version increments in Cargo.toml and package.json, adding new threading macro aliases in the core language definition, and extending the CLI tool with a new Download subcommand for package management. The modifications reflect routine maintenance and feature enhancements, focusing on improving developer experience and dependency management.

Changes

File Change Summary
Cargo.toml - Version bumped from 0.9.7 to 0.9.8
- Updated dependencies: dirs (5.0.1 → 6.0.0), notify (7.0.0 → 8.0.0), notify-debouncer-mini (0.5.0 → 0.6.0)
package.json - Version updated to 0.9.8
- Dev dependencies updated: @types/node (22.10.5 → 22.10.7), typescript (5.7.2 → 5.7.3)
src/bin/calcit_deps.rs - Added new Download subcommand
- Introduced DownloadCaps struct for package download functionality
- Refactored CLI argument handling
src/cirru/calcit-core.cirru - Added new macro aliases: thread-first, thread-as, thread-last
calcit/test-macro.cirru - Added test assertions for new threading macro expansions
README.md - Updated command usage examples
- Added `:calcit-version

Possibly related PRs

Poem

🐰 Hopping through code with glee,
Macros dance, dependencies free!
Version bumps, a rabbit's delight,
CLI powers now shine so bright!
Calcit grows, one commit at a time! 🚀


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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 using 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 generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration 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.

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 7 changed files in this pull request and generated no comments.

Files not reviewed (3)
  • calcit/test-macro.cirru: Language not supported
  • package.json: Language not supported
  • src/cirru/calcit-core.cirru: Language not supported
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

🧹 Nitpick comments (4)
README.md (4)

55-57: Clarify Default Behavior in Watch Mode Commands
The examples showing cr -1 for single-run and cr for watch mode are well presented. However, adding a brief comment that clarifies the fallback to compact.cirru could help new users.


77-78: JS Code Generation Commands Are Informative
The examples for generating JavaScript code clearly illustrate both the default behavior and the use of a custom output path. It might be beneficial to mention the default directory (js-out/) explicitly for clarity.


111-112: Refine Version Check Description for Clarity
The current phrase “:calcit-version helps in check version, and provides hints in CI environment” can be improved for clarity and grammatical correctness. Consider the following revision:

-`:calcit-version` helps in check version, and provides hints in [CI](https://github.com/calcit-lang/setup-cr) environment.
+`:calcit-version` assists in version checking and provides hints for CI environments.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~111-~111: This verb may not be in the correct form. Consider using a different form for this context.
Context: ...ust dylibs. :calcit-version helps in check version, and provides hints in [CI](htt...

(AI_EN_LECTOR_REPLACEMENT_VERB_FORM)


123-123: Adjust Grammar in Module Suffix Explanation
The sentence “Modules that ends with /s are automatically suffixed compact.cirru since it's the default entry.” contains a grammatical error. Consider revising it to:

-Modules that ends with `/`s are automatically suffixed `compact.cirru` since it's the default entry.
+Modules that end with `/` are automatically suffixed with `compact.cirru` as the default entry.

This change improves subject–verb agreement and overall clarity.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~123-~123: This verb does not appear to agree with the subject. Consider using a different form.
Context: ...les/memof/compact.cirru. Modules that ends with /s are automatically suffixed c...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4ea255b and 860dd02.

📒 Files selected for processing (1)
  • README.md (3 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[uncategorized] ~59-~59: Did you mean: “By default,”?
Context: ...cr # watch mode enabled by default ``` By default Calcit reads :init-fn and `:reload-fn...

(BY_DEFAULT_COMMA)


[uncategorized] ~74-~74: 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...

(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)


[uncategorized] ~111-~111: This verb may not be in the correct form. Consider using a different form for this context.
Context: ...ust dylibs. :calcit-version helps in check version, and provides hints in [CI](htt...

(AI_EN_LECTOR_REPLACEMENT_VERB_FORM)


[uncategorized] ~123-~123: This verb does not appear to agree with the subject. Consider using a different form.
Context: ...les/memof/compact.cirru. Modules that ends with /s are automatically suffixed c...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)

🔇 Additional comments (6)
README.md (6)

47-47: Confirm New Alias Usage for Thread-first
The new example using the thread-first alias is clearly demonstrated. Please double-check that the alias semantics align with the definitions in calcit-core.cirru.


63-63: Validate Custom Function Flag Syntax
The example demonstrating how to specify initialization and reload functions with --init-fn and --reload-fn looks correct. Ensure that this syntax is documented elsewhere for consistency.


69-69: Entry Configuration Example Is Clear
The cr --entry server example succinctly shows how to set the entry point when running Calcit. This example is straightforward and needs no further modification.


85-85: Verify JavaScript Entry Point Mapping
The snippet importing and invoking main_$x_() properly reflects the mapping from Calcit's main! function. Confirm that users are aware of the naming convention used during JavaScript codegen.


103-103: Update Dependency Version Information
The addition of :calcit-version |0.9.8 in the deps.cirru example helps maintain version consistency across the documentation and configuration files (e.g., Cargo.toml and package.json). Please verify that all related files have been updated accordingly.


113-113: Module Loading Configuration Example Looks Good
The example for loading modules via the :modules configuration is clear and useful. There is no further action required here.

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.

1 participant