Skip to content

Commit

Permalink
Add cucumber crate to cargo raze (typedb#394)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
dmitrii-ubskii authored and James Williams committed Dec 5, 2022
1 parent 629b2b6 commit 29ddd4c
Show file tree
Hide file tree
Showing 92 changed files with 5,816 additions and 48 deletions.
72 changes: 72 additions & 0 deletions library/crates/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,24 @@ alias(
],
)

alias(
name = "clap",
actual = "@raze__clap__4_0_26//:clap",
tags = [
"cargo-raze",
"manual",
],
)

alias(
name = "clap_derive",
actual = "@raze__clap_derive__4_0_21//:clap_derive",
tags = [
"cargo-raze",
"manual",
],
)

alias(
name = "crossbeam",
actual = "@raze__crossbeam__0_8_2//:crossbeam",
Expand All @@ -48,6 +66,33 @@ alias(
],
)

alias(
name = "cucumber",
actual = "@raze__cucumber__0_15_2//:cucumber",
tags = [
"cargo-raze",
"manual",
],
)

alias(
name = "cucumber_codegen",
actual = "@raze__cucumber_codegen__0_15_3//:cucumber_codegen",
tags = [
"cargo-raze",
"manual",
],
)

alias(
name = "cucumber_expressions",
actual = "@raze__cucumber_expressions__0_2_1//:cucumber_expressions",
tags = [
"cargo-raze",
"manual",
],
)

alias(
name = "cxx",
actual = "@raze__cxx__1_0_59//:cxx",
Expand Down Expand Up @@ -111,6 +156,33 @@ alias(
],
)

alias(
name = "synthez",
actual = "@raze__synthez__0_2_0//:synthez",
tags = [
"cargo-raze",
"manual",
],
)

alias(
name = "synthez_codegen",
actual = "@raze__synthez_codegen__0_2_0//:synthez_codegen",
tags = [
"cargo-raze",
"manual",
],
)

alias(
name = "synthez_core",
actual = "@raze__synthez_core__0_2_0//:synthez_core",
tags = [
"cargo-raze",
"manual",
],
)

alias(
name = "tokio",
actual = "@raze__tokio__1_20_1//:tokio",
Expand Down
37 changes: 35 additions & 2 deletions library/crates/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,23 @@ path = "" # ignored by cargo raze
antlr-rust = "=0.3.0-beta"
axum = "=0.5.15"
chrono = "=0.4.22"
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"
tokio = { version = "=1.20.1", features = ["rt", "rt-multi-thread"] }
tonic = "=0.8.0"
tonic-build = "=0.8.0"
Expand Down Expand Up @@ -47,11 +56,35 @@ targets = [
# vendored set of dependencies.
genmode = "Remote"

[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\"])"
Loading

0 comments on commit 29ddd4c

Please sign in to comment.