Skip to content

Add Cargo.lock to version control for reproducible builds #1161

@coderabbitai

Description

@coderabbitai

Summary

The bootstrap crate (and possibly other workspace members) use semver-range dependency specifiers (e.g. pest_generator = "2.1.1", quote = "1.0") but no Cargo.lock is committed to the repository. This means the generated meta/src/grammar.rs can change between CI runs as upstream dependencies release new versions, which undermines the check-grammar-sync CI gate introduced in #1159.

Recommended Fix

Follow the Cargo FAQ guidance on checking in Cargo.lock:

  1. Run cargo generate-lockfile (or simply cargo build) at the repository root.
  2. Commit the resulting Cargo.lock file.
  3. Add a CI step or update existing steps to ensure the lockfile stays up to date.

Context

Raised during review of #1159 (comment: #1159 (comment)) by @konstin.
This is a pre-existing condition, not introduced by #1159, but it is now more visible because grammar.rs is kept in tree and verified in CI.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions