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

bump versions + minor clippy fixes #959

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

tomtau
Copy link
Contributor

@tomtau tomtau commented Jan 4, 2024

Summary by CodeRabbit

  • Refactor

    • Improved the output formatting in the build process.
  • Tests

    • Updated test logic for enhanced consistency in accessing elements.
  • Chores

    • Updated the CI toolchain to the latest nightly version.
    • Integrated a new tool for semantic versioning checks.
  • Documentation

    • Ensured documentation generation aligns with the updated toolchain version.

@tomtau tomtau added the pr label Jan 4, 2024
@tomtau tomtau requested a review from a team as a code owner January 4, 2024 14:26
@tomtau tomtau requested review from NoahTheDuke and removed request for a team January 4, 2024 14:26
Copy link
Contributor

coderabbitai bot commented Jan 4, 2024

Walkthrough

The project has shifted to a more recent Rust toolchain, specifically the nightly version at the end of 2023. A new tool, cargo-semver-checks, is now part of the continuous integration process to ensure semantic versioning compatibility. Code enhancements include using more idiomatic Rust functions for cleaner code, such as first() for vector access and the write! macro for string formatting.

Changes

File(s) Change Summary
.github/workflows/ci.yml Updated Rust toolchain; added cargo-semver-checks tool.
meta/build.rs, pest/tests/json.rs Improved code idiomaticity with write! macro and first() method.
semvercheck.sh Updated toolchain version for rustdoc generation in cargo command.

Poem

🐇✨
A leap to the future, so shiny, so new,
Nightly Rust's gleaming, in twenty-three's view.
Code hops along, with a semver check dance,
Ensuring our builds, always have a fair chance.
🌟📜

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 with CodeRabbit Bot (@coderabbitai)

  • You can directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • You can tag CodeRabbit on specific lines of code or entire files in the PR by tagging @coderabbitai in a comment. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • You can tag @coderabbitai in a PR comment and ask questions about the PR and the codebase. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid.
    • @coderabbitai read the files in the src/scheduler package and generate README in the markdown format.

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.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@tomtau
Copy link
Contributor Author

tomtau commented Jan 4, 2024

(I just tried if that "label"-only flow for the AI bot works FYI)

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.

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 6ea9523 and bce5520.
Files ignored due to filter (7)
  • debugger/Cargo.toml
  • derive/Cargo.toml
  • generator/Cargo.toml
  • grammars/Cargo.toml
  • meta/Cargo.toml
  • pest/Cargo.toml
  • vm/Cargo.toml
Files selected for processing (4)
  • .github/workflows/ci.yml (2 hunks)
  • meta/build.rs (1 hunks)
  • pest/tests/json.rs (1 hunks)
  • semvercheck.sh (2 hunks)
Files skipped from review due to trivial changes (1)
  • pest/tests/json.rs
Additional comments: 4
semvercheck.sh (2)
  • 11-11: Ensure that the new Rust toolchain version nightly-2023-12-31 is properly installed and available in the CI environment.

  • 24-24: Verify that the baseline Git SHA 8c602d832e625a0965701618626166e2ffbd94bb is the correct reference for the semver checks.

Verification successful

The baseline Git SHA 8c602d832e625a0965701618626166e2ffbd94bb exists in the repository history. This confirms that the reference for the semver checks is valid as far as its existence in the git history is concerned.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the baseline SHA exists in the repository history
git rev-parse --verify 8c602d832e625a0965701618626166e2ffbd94bb

Length of output: 106

.github/workflows/ci.yml (2)
  • 143-143: Ensure that the new Rust toolchain version nightly-2023-12-31 is properly installed and available in the CI environment for the no_std compatibility check.

  • 159-159: Verify that the cargo-semver-checks tool is properly installed and configured for the semver compatibility check.

Verification successful

The output from the script indicates that cargo-semver-checks is mentioned in the .github/workflows/ci.yml file. However, the output only shows a single line with tools: cargo-semver-checks, which does not provide enough context to confirm whether the tool is properly installed and configured.

To verify the installation and configuration, we need to see the surrounding lines of this entry to understand how cargo-semver-checks is being used in the workflow. Specifically, we should look for steps that install the tool and then steps that run it, along with any configuration options that might be set.


The provided output shows the context around the usage of cargo-semver-checks in the .github/workflows/ci.yml file. The relevant steps are as follows:

  1. The repository is checked out using actions/checkout@v3.
  2. A setup action is used, which is defined in ./.github/actions/setup. This action is configured with the kind: check, the toolchain: nightly-2023-12-31, and the tools: cargo-semver-checks.
  3. A check semver compatibility step is present, which executes ./semvercheck.sh.

From this, we can infer that cargo-semver-checks is intended to be installed by the setup action. However, without seeing the contents of the ./.github/actions/setup action or the semvercheck.sh script, we cannot confirm the installation and configuration of cargo-semver-checks. To complete the verification, we would need to inspect these files.


The output from the cat commands provides the contents of the .github/actions/setup/action.yml and the semvercheck.sh script.

From the action.yml file, we can see that the setup action is a composite action that includes steps to install the Rust toolchain and additional tools. The Install ${{inputs.tools}} step uses the taiki-e/install-action@v1 action to install tools specified in the tools input, which in the context of the ci.yml workflow includes cargo-semver-checks.

The semvercheck.sh script contains the following relevant steps:

  1. It sets the CURRENT_GIT_SHA to the current commit SHA.
  2. It runs cargo clean.
  3. It attempts to install cargo-semver-checks with cargo install cargo-semver-checks || true, which means it will not fail the script if the installation fails.
  4. It sets some environment variables for rustdoc.
  5. It builds and runs the pest_bootstrap package.
  6. It generates documentation in JSON format for several crates using rustdoc.
  7. It checks out a baseline Git SHA and repeats the build, run, and documentation generation for the baseline.
  8. It uses cargo semver-checks to check the release compatibility between the current and baseline documentation JSON files for each crate.

Given this information, we can confirm that:

  • The cargo-semver-checks tool is intended to be installed by the setup action in the CI workflow.
  • The semvercheck.sh script is configured to install cargo-semver-checks if it's not already present and then uses it to check semantic versioning compatibility.

Therefore, the cargo-semver-checks tool appears to be properly integrated into the workflow, with steps to ensure its installation and configuration for the semver compatibility check.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that cargo-semver-checks is installed
cargo semver-checks --version

Length of output: 104



Script:

#!/bin/bash
# Search for the installation and configuration of cargo-semver-checks in the ci.yml file
rg "cargo-semver-checks" .github/workflows/ci.yml

Length of output: 86



Script:

#!/bin/bash
# Extract more context around the usage of cargo-semver-checks in the ci.yml file
rg -C 10 "cargo-semver-checks" .github/workflows/ci.yml

Length of output: 441



Script:

#!/bin/bash
# Check the contents of the setup action and the semvercheck.sh script
cat .github/actions/setup/action.yml
cat semvercheck.sh

Length of output: 2953

meta/build.rs Show resolved Hide resolved
@tomtau tomtau merged commit d16266a into pest-parser:master Jan 4, 2024
9 checks passed
@tomtau tomtau deleted the bump-fix-semvercheck branch January 4, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant