-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add cucumber crate to cargo raze #394
Conversation
PR Review ChecklistDo not edit the content of this comment. The PR reviewer should simply update this comment by ticking each review item below, as they get completed. Code
Architecture
|
[package.metadata.raze.crates.tonic.'0.8.0'] | ||
[package.metadata.raze.crates.axum.'0.5.15'] | ||
compile_data_attr = "glob([\"**/*.md\"])" | ||
|
||
[package.metadata.raze.crates.clap.'4.0.26'] | ||
compile_data_attr = "glob([\"**/*.md\"])" | ||
|
||
[package.metadata.raze.crates.clap_derive.'4.0.21'] | ||
compile_data_attr = "glob([\"**/*.md\"])" | ||
|
||
[package.metadata.raze.crates.cucumber-codegen.'0.15.3'] | ||
compile_data_attr = "glob([\"**/*.md\"])" | ||
|
||
[package.metadata.raze.crates.cucumber-expressions.'0.2.1'] | ||
compile_data_attr = "glob([\"**/*.md\"])" | ||
|
||
[package.metadata.raze.crates.cucumber.'0.15.2'] | ||
compile_data_attr = "glob([\"**/*.md\"])" | ||
|
||
[package.metadata.raze.crates.prost.'0.11.0'] | ||
compile_data_attr = "glob([\"**/*.md\"])" | ||
|
||
[package.metadata.raze.crates.axum.'0.5.15'] | ||
[package.metadata.raze.crates.synthez-codegen.'0.2.0'] | ||
compile_data_attr = "glob([\"**/*.md\"])" | ||
|
||
[package.metadata.raze.crates.synthez-core.'0.2.0'] | ||
compile_data_attr = "glob([\"**/*.md\"])" | ||
|
||
[package.metadata.raze.crates.synthez.'0.2.0'] | ||
compile_data_attr = "glob([\"**/*.md\"])" | ||
|
||
[package.metadata.raze.crates.tonic.'0.8.0'] | ||
compile_data_attr = "glob([\"**/*.md\"])" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These crates require their README.md to be present during compilation, which aren't pulled in by raze by default.
""" | ||
@generated | ||
cargo-raze crate build file. | ||
|
||
DO NOT EDIT! Replaced on runs of cargo-raze | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flagrantly disregarding this docstring. This is a manually edited version of the generated file that works around a bug in bazel.
clap = "=4.0.26" | ||
clap_derive = "=4.0.21" | ||
crossbeam = "=0.8.2" | ||
cucumber = "=0.15.2" | ||
cucumber-codegen = "=0.15.3" | ||
cucumber-expressions = "=0.2.1" | ||
cxx = "=1.0.59" | ||
derivative = "=2.2.0" | ||
enum_dispatch = "=0.3.8" | ||
futures = { version = "=0.3.21", features = ["executor", "thread-pool"] } | ||
log = "=0.4.8" | ||
prost = "=0.11.0" | ||
rocksdb = "=0.17.0" | ||
rustix = "=0.35.9" | ||
synthez = "=0.2.0" | ||
synthez-codegen = "=0.2.0" | ||
synthez-core = "=0.2.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added cucumber and pinned its dependencies that require additional configuration to work with raze ('md' files referenced in code)
] + selects.with_or({ | ||
( | ||
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu", | ||
"@rules_rust//rust/platform:x86_64-apple-darwin", | ||
"@rules_rust//rust/platform:x86_64-pc-windows-msvc", | ||
"@rules_rust//rust/platform:aarch64-apple-darwin", | ||
): [ | ||
"@raze__libc__0_2_132//:libc", | ||
], | ||
"//conditions:default": [], | ||
}) + selects.with_or({ | ||
( | ||
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu", | ||
): [ | ||
"@raze__linux_raw_sys__0_0_46//:linux_raw_sys", | ||
], | ||
"//conditions:default": [], | ||
}) + selects.with_or({ | ||
( | ||
"@rules_rust//rust/platform:x86_64-apple-darwin", | ||
"@rules_rust//rust/platform:x86_64-pc-windows-msvc", | ||
"@rules_rust//rust/platform:aarch64-apple-darwin", | ||
): [ | ||
"@raze__errno__0_2_8//:errno", | ||
], | ||
"//conditions:default": [], | ||
}) + selects.with_or({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes are here, from (pseudocode) if (x) [libc, linux_raw_sys] else [] + if (y) [libc, errno] else []
, which bazel rules is an error (bazelbuild/bazel#13785), to if (x || y) [libc] else [] + if (x) [linux_raw_sys] else [] + if (y) [errno] else []
cp overrides/* remote/. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restore all manual changes after running cargo raze
.
## What is the goal of this PR? We add the cucumber testing framework crate to our pinned rust dependencies. ## What are the changes implemented in this PR? While making this change, we encountered an issue in bazel (bazelbuild/bazel#13785) that made it throw an error because, in essence, libc was included in two out of three conditions, which was regarded as a dependency duplication. Cargo-raze is aware of this issue (google/cargo-raze#451) and has their own workaround in the works (google/cargo-raze#512) which is not being reviewed or merged due to reviewer bandwidth issues. As our own workaround, we separate the inclusion of libc into its own condition, overriding raze and pacifying bazel. This change is stored separately from the razed crates and reapplied when `library/crates/update.sh` is run.
What is the goal of this PR?
We add the cucumber testing framework crate to our pinned rust dependencies.
What are the changes implemented in this PR?
While making this change, we encountered an issue in bazel (bazelbuild/bazel#13785) that made it throw an error because, in essence, libc was included in two out of three conditions, which was regarded as a dependency duplication.
Cargo-raze is aware of this issue (google/cargo-raze#451) and has their own workaround in the works (google/cargo-raze#512) which is not being reviewed or merged due to reviewer bandwidth issues.
As our own workaround, we separate the inclusion of libc into its own condition, overriding raze and pacifying bazel. This change is stored separately from the razed crates and reapplied when
library/crates/update.sh
is run.