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

[rust, bazel] separate mdbook into its own crate index #25797

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

nbdd0121
Copy link
Contributor

@nbdd0121 nbdd0121 commented Jan 7, 2025

mdbook is only used as binary and we don't use it as a library, so making it a separate crate index. This allows us to avoid mixing its dependencies with other OT dependencies.

Copy link
Contributor

@jwnrt jwnrt left a comment

Choose a reason for hiding this comment

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

Looks fine to me, but this could be a short crate.spec(...) call in the MODULE.bazel file. Please remind me why we're using a full Cargo manifest?

third_party/mdbook/Cargo.toml Outdated Show resolved Hide resolved
@nbdd0121
Copy link
Contributor Author

nbdd0121 commented Jan 8, 2025

A Cargo manifest makes it slightly easier to precisely track and pin dependencies, as there're more tools (e.g. cargo-audit or cargo-deny) that handles Cargo.lock compared to Bazel lock.

mdbook is only used as binary and we don't use it as a library, so making
it a separate crate index. This allows us to avoid mixing its dependencies
with other OT dependencies.

Signed-off-by: Gary Guo <[email protected]>
Copy link
Contributor

@jwnrt jwnrt left a comment

Choose a reason for hiding this comment

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

Seems fine to me, thanks

It appears that `bazel mod deps` is needed when bzlmod is modified.

Signed-off-by: Gary Guo <[email protected]>
@jwnrt
Copy link
Contributor

jwnrt commented Jan 9, 2025

@nbdd0121 is this okay to merge? I'd like the lockfile changes for another PR

@nbdd0121 nbdd0121 merged commit ed6c889 into lowRISC:master Jan 9, 2025
38 checks passed
@nbdd0121 nbdd0121 deleted the mdbook branch January 9, 2025 13:54
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