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

Update contributing.md to include additional steps #208

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

csmarchbanks
Copy link
Contributor

@csmarchbanks csmarchbanks commented Dec 19, 2024

I ran into some additional necessary dependencies to install before I could run the project. In addition, pin wit-bindgen-cli to a specific version to avoid unnecessary diffs in generated files.

Summary by CodeRabbit

  • Documentation

    • Updated the contributing.md file to enhance clarity and improve the contribution process, including new steps for development setup and updated commands for building and testing.
  • New Features

    • Introduced a new variable WIT_BINDGEN_VERSION for flexible dependency management in the installation process.

Copy link
Contributor

coderabbitai bot commented Dec 19, 2024

Walkthrough

The pull request introduces updates to the project's contribution documentation and dependency management. The contributing.md file has been revised to provide clearer setup instructions, incorporating new tools like cargo-binstall and nextest. In the justfile, a new version-specific variable for wit-bindgen-cli has been added, allowing more flexible dependency management by specifying the exact version to install.

Changes

File Change Summary
book/src/contributing.md - Updated development setup steps
- Added cargo-binstall installation instructions
- Modified dependency installation process
- Updated build and test commands
components/justfile - Added WIT_BINDGEN_VERSION variable
- Updated wit-bindgen-cli installation to use version-specific binstall command

Possibly related PRs

  • chore: release v0.4.1 #132: The changes in this PR involve updates to the Cargo.toml file for versioning, which may relate to the dependency management improvements mentioned in the main PR's updates to contributing.md.
  • chore: release v0.4.2 #133: Similar to PR chore: release v0.4.1 #132, this PR also updates the Cargo.toml for versioning, which connects to the overall dependency management context discussed in the main PR.

Poem

🐰 A Rabbit's Ode to Project Setup
With binstall in paw and version in sight,
Our dev docs now shine so crisp and bright.
Dependencies dance, commands align,
Contributing's smooth, everything's fine!
Hop to the code, let's make magic tonight! 🚀


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.

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 (1)
book/src/contributing.md (1)

20-24: Add language specifier to the code block

The fenced code block should specify a language for better syntax highlighting and clarity.

-```
+```bash
 (cd components && just install-deps)

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 LanguageTool</summary>

[grammar] ~20-~20: This phrase is duplicated. You should probably use “install dependencies” only once.
Context: ...Install [`cargo-binstall`][binstall] to install dependencies 5. Install dependencies: ``` (cd components && just install-dep...

(PHRASE_REPETITION)

</details>
<details>
<summary>🪛 Markdownlint (0.37.0)</summary>

22-22: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

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

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 70dacff6dc1e61e094e6f30b90c1e5f09b60c8bb and 7abbe7ec8bbc8e4b1ed4ce0dc3b5cfd3b89e6955.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `book/src/contributing.md` (2 hunks)
* `components/justfile` (2 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 LanguageTool</summary>

<details>
<summary>book/src/contributing.md</summary>

[grammar] ~20-~20: This phrase is duplicated. You should probably use “install dependencies” only once.
Context: ...Install [`cargo-binstall`][binstall] to install dependencies 5. Install dependencies: ``` (cd components && just install-dep...

(PHRASE_REPETITION)

</details>

</details>
<details>
<summary>🪛 Markdownlint (0.37.0)</summary>

<details>
<summary>book/src/contributing.md</summary>

22-22: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (4)</summary>

<details>
<summary>book/src/contributing.md (2)</summary>

`65-65`: **LGTM!**

The added links for cargo-binstall and nextest are properly formatted and point to the correct documentation.



Also applies to: 67-67

---

`29-33`: **Verify the command change from 'just build' to 'just watch'**

The build command has been updated. Let's verify this change is consistent with the justfile implementation.

<details>
<summary>✅ Verification successful</summary>

**The `just watch` command exists and is correctly documented**

The verification shows that the `watch` command exists in the root `justfile` and runs `bacon`, which is consistent with the documentation update. The change from `just build` to `just watch` is valid as it provides a better development experience with continuous building and checking.

- Root `justfile` implements `watch: bacon`
- The documentation correctly references this command
- The change improves the development workflow by using `bacon` for continuous building/checking instead of a one-time build



</details>

<details>
<summary>🏁 Scripts executed</summary>

The following scripts were executed for the analysis:

Script:

```shell
#!/bin/bash
# Verify the existence and implementation of the 'watch' command
rg "watch:" components/justfile

Length of output: 31


Script:

#!/bin/bash
# Let's search for the justfile in the repository root and other common locations
fd justfile

# Also search for any mentions of 'watch' or 'build' commands in justfiles
rg -A 3 "^(watch|build):" $(fd justfile)

Length of output: 808

components/justfile (2)

2-2: LGTM!

Adding a version variable for wit-bindgen-cli is a good practice for maintaining consistency across the project.


19-19: Verify wit-bindgen-cli version compatibility

The version has been pinned to 0.34.0. Let's verify this version's compatibility with other dependencies.

✅ Verification successful

Version 0.34.0 of wit-bindgen-cli appears compatible with the codebase

The verification shows that:

  • The WIT interface files are using standard WIT syntax compatible with wit-bindgen-cli 0.34.0
  • The justfile shows a consistent toolchain setup where wit-bindgen-cli is used alongside other WebAssembly tools:
    • cargo-component for component model support
    • wasm-tools for component operations
    • wac-cli for WebAssembly components
  • No version conflicts or compatibility issues are evident in the build process
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for version constraints or compatibility issues
rg -A 3 "wit-bindgen|cargo-component" package.json components/*/package.json 2>/dev/null
rg "wit-bindgen" components/*/Cargo.toml 2>/dev/null

Length of output: 123


Script:

#!/bin/bash
# Let's check for wit-bindgen dependencies and version references in Cargo.toml files
fd Cargo.toml --exec rg -l "wit-bindgen" {} 2>/dev/null

# Check for any wit-bindgen related configuration or version specifications
fd "wit|component" --type f --exec rg -l "wit-bindgen|cargo-component" {} 2>/dev/null

# Look for any wit interface definitions that might indicate compatibility requirements
fd ".wit$" 2>/dev/null

# Check for any documentation about version requirements
rg -i "wit-bindgen.*version|component.*version" README.md docs/ 2>/dev/null

Length of output: 302


Script:

#!/bin/bash
# Let's examine the content of the WIT files to understand the interface requirements
cat components/cpp/prophet-wasmstan/wit/prophet-wasmstan.wit
cat crates/augurs-prophet/prophet-wasmstan.wit

# Check the justfile for any other related version configurations
cat components/justfile

# Look for any cargo component configurations
fd "Cargo.toml|justfile" --exec rg -A 3 "cargo-component" {} 2>/dev/null

Length of output: 16853

I ran into some additional necessary dependencies to install before I
could run the project. In addition, pin wit-bindgen-cli to a specific
version to avoid unnecessary diffs in generated files.
@csmarchbanks csmarchbanks force-pushed the improve-contributing-instructions branch from 7abbe7e to b89567b Compare December 19, 2024 21:01
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 (2)
book/src/contributing.md (2)

20-24: Make the bash command more copy-paste friendly

The command is correct, but could be more user-friendly. Consider using the explicit form without parentheses.

-```bash
-(cd components && just install-deps)
-```
+```bash
+cd components
+just install-deps
+cd ..
+```
🧰 Tools
🪛 LanguageTool

[grammar] ~20-~20: This phrase is duplicated. You should probably use “install dependencies” only once.
Context: ...Install [cargo-binstall][binstall] to install dependencies 5. Install dependencies: ```bash (cd components && just install...

(PHRASE_REPETITION)


25-33: Enhance clarity of build and test instructions

Consider adding brief explanations:

  1. What the WASM component is and why it needs to be built
  2. Why bacon is preferred over regular cargo watch
  3. The benefits of using nextest over standard cargo test

Example additions:

 6. Build the WASM component:
+> This builds the core WebAssembly component needed for augurs to function
 ```bash
 just build-component
  1. Start building and checking the project using [bacon]:
    +> bacon provides faster incremental builds and better error reporting
just watch
  1. Run tests using [nextest]:
    +> nextest offers parallel test execution and better test reporting
just test

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

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

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 7abbe7ec8bbc8e4b1ed4ce0dc3b5cfd3b89e6955 and b89567b7a53e2edbfe014dcfebfec7788e92c32f.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `book/src/contributing.md` (2 hunks)
* `components/justfile` (2 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary>

* components/justfile

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 LanguageTool</summary>

<details>
<summary>book/src/contributing.md</summary>

[grammar] ~20-~20: This phrase is duplicated. You should probably use “install dependencies” only once.
Context: ...Install [`cargo-binstall`][binstall] to install dependencies 5. Install dependencies: ```bash (cd components && just install...

(PHRASE_REPETITION)

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (2)</summary>

<details>
<summary>book/src/contributing.md (2)</summary>

`65-67`: **LGTM!**

The reference links are well-organized and point to the correct documentation.

---

`20-24`: **Verify wit-bindgen-cli version in install-deps**

The PR mentions pinning wit-bindgen-cli version, but we should verify if this is handled in the install-deps command.

<details>
<summary>✅ Verification successful</summary>

**✓ wit-bindgen-cli version is properly pinned**

The `install-deps` command in `components/justfile` correctly pins the wit-bindgen-cli version to 0.34.0 using the `WIT_BINDGEN_VERSION` variable.



</details>

<details>
<summary>🏁 Scripts executed</summary>

The following scripts were executed for the analysis:

Script:

```shell
#!/bin/bash
# Check if wit-bindgen-cli version is specified in justfile
rg -A 5 "install-deps:" components/justfile

Length of output: 283


Script:

#!/bin/bash
# Check if WIT_BINDGEN_VERSION is defined in justfile
rg "set WIT_BINDGEN_VERSION" components/justfile

Length of output: 50


Script:

#!/bin/bash
# Look for WIT_BINDGEN_VERSION definition in justfile using different patterns
rg -i "wit.?bindgen.?version" components/justfile

Length of output: 143

🧰 Tools
🪛 LanguageTool

[grammar] ~20-~20: This phrase is duplicated. You should probably use “install dependencies” only once.
Context: ...Install [cargo-binstall][binstall] to install dependencies 5. Install dependencies: ```bash (cd components && just install...

(PHRASE_REPETITION)

Copy link
Collaborator

@sd2k sd2k left a comment

Choose a reason for hiding this comment

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

Thank you! This was on my list after chatting with Gerry earlier...

@sd2k sd2k merged commit d8a8c42 into main Dec 20, 2024
24 checks passed
@sd2k sd2k deleted the improve-contributing-instructions branch December 20, 2024 08:18
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