Skip to content

Commit d20ad22

Browse files
committed
Fix workspace level not(plus) build
#623
1 parent 477c84c commit d20ad22

File tree

35 files changed

+154
-51
lines changed

35 files changed

+154
-51
lines changed

.github/workflows/bencher.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -321,29 +321,16 @@ jobs:
321321
- name: Run Smoke Test
322322
run: cargo test-api smoke docker
323323

324-
# Cargo Check (Minus)
325-
cargo_check_api_minus:
326-
name: Cargo Check API (Minus)
324+
# Cargo Check (not(plus))
325+
cargo_check_workspace_not_plus:
326+
name: Cargo Check Workspace (not(plus))
327327
runs-on: ubuntu-22.04
328328
steps:
329329
- uses: actions/checkout@v4
330330
- uses: rui314/setup-mold@v1
331331
with:
332332
mold-version: ${{ env.MOLD_VERSION }}
333333
- name: cargo check
334-
working-directory: ./services/api
335-
run: cargo check --no-default-features
336-
337-
cargo_check_cli_minus:
338-
name: Cargo Check CLI (Minus)
339-
runs-on: ubuntu-22.04
340-
steps:
341-
- uses: actions/checkout@v4
342-
- uses: rui314/setup-mold@v1
343-
with:
344-
mold-version: ${{ env.MOLD_VERSION }}
345-
- name: cargo check
346-
working-directory: ./services/cli
347334
run: cargo check --no-default-features
348335

349336
# Cargo Benchmark
@@ -1003,8 +990,7 @@ jobs:
1003990
- cargo_test
1004991
- api_smoke_test
1005992
- release_api_smoke_test
1006-
- cargo_check_api_minus
1007-
- cargo_check_cli_minus
993+
- cargo_check_workspace_not_plus
1008994
- cargo_bench
1009995
- cargo_audit
1010996
- cargo_udeps

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ license-file = "LICENSE.md"
1919

2020
[workspace.dependencies]
2121
# services
22-
bencher_api = { path = "services/api" }
23-
bencher_cli = { path = "services/cli" }
22+
bencher_api = { path = "services/api", default-features = false }
23+
bencher_cli = { path = "services/cli", default-features = false }
2424
# lib
2525
bencher_adapter = { path = "lib/bencher_adapter" }
2626
bencher_boundary = { path = "lib/bencher_boundary" }

DEVELOPMENT.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@ prerequisites installed on your machine.
1111
- [Rust](https://www.rust-lang.org/tools/install)
1212
- [Node.js](https://nodejs.org/)
1313
- [typeshare](https://crates.io/crates/typeshare)
14-
15-
```shell
16-
cargo install typeshare-cli --version 1.13.2 --locked
17-
```
18-
14+
```shell
15+
cargo install typeshare-cli --version 1.13.2 --locked
16+
```
1917
- [wasm-pack](https://crates.io/crates/wasm-pack)
20-
21-
```shell
22-
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
23-
```
18+
```shell
19+
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
20+
```
2421

2522
### Installation
2623

@@ -49,7 +46,7 @@ prerequisites installed on your machine.
4946
```
5047
7. Configure the CLI environment
5148
```shell
52-
cd ./services/cli
49+
cd ./services/cli
5350
. ./env.sh
5451
```
5552

lib/api_auth/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ license-file.workspace = true
77
publish = false
88

99
[features]
10+
default = []
1011
plus = [
1112
"bencher_endpoint/plus",
1213
"bencher_json/plus",

lib/api_checkout/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ license-file.workspace = true
77
publish = false
88

99
[features]
10+
default = []
1011
plus = [
1112
"dep:bencher_rbac",
1213
"dep:dropshot",

lib/api_checkout/src/checkout.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,16 @@ pub async fn checkouts_post(
3838
bearer_token: BearerToken,
3939
body: TypedBody<JsonNewCheckout>,
4040
) -> Result<ResponseCreated<JsonCheckout>, HttpError> {
41+
#[cfg(feature = "sentry")]
4142
sentry::capture_message("Checkout endpoint activated", sentry::Level::Info);
4243
let auth_user = AuthUser::from_token(rqctx.context(), bearer_token).await?;
4344
let json = checkouts_post_inner(rqctx.context(), body.into_inner(), &auth_user)
4445
.await
4546
.inspect_err(|e| {
4647
#[cfg(feature = "sentry")]
4748
sentry::capture_error(&e);
49+
#[cfg(not(feature = "sentry"))]
50+
let _ = e;
4851
})?;
4952
Ok(Post::auth_response_created(json))
5053
}

lib/api_organizations/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ license-file.workspace = true
77
publish = false
88

99
[features]
10+
default = []
1011
plus = [
11-
"dep:bencher_billing",
12+
"bencher_billing/plus",
1213
"bencher_endpoint/plus",
1314
"bencher_json/plus",
1415
"bencher_schema/plus",

lib/api_organizations/src/plan.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ pub async fn org_plan_post(
124124
.inspect_err(|e| {
125125
#[cfg(feature = "sentry")]
126126
sentry::capture_error(e);
127+
#[cfg(not(feature = "sentry"))]
128+
let _ = e;
127129
})?;
128130
Ok(Post::auth_response_created(json))
129131
}
@@ -255,6 +257,8 @@ pub async fn org_plan_delete(
255257
.inspect_err(|e| {
256258
#[cfg(feature = "sentry")]
257259
sentry::capture_error(&e);
260+
#[cfg(not(feature = "sentry"))]
261+
let _ = e;
258262
})?;
259263
Ok(Delete::auth_response_deleted())
260264
}
@@ -287,6 +291,8 @@ async fn delete_inner(
287291
.inspect_err(|e| {
288292
#[cfg(feature = "sentry")]
289293
sentry::capture_error(&e);
294+
#[cfg(not(feature = "sentry"))]
295+
let _ = e;
290296
});
291297

292298
diesel::delete(schema::plan::table.filter(schema::plan::id.eq(query_plan.id)))

lib/api_projects/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ license-file.workspace = true
77
publish = false
88

99
[features]
10+
default = []
1011
plus = [
1112
"bencher_endpoint/plus",
1213
"bencher_json/plus",

lib/api_run/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ license-file.workspace = true
77
publish = false
88

99
[features]
10+
default = []
1011
plus = [
1112
"bencher_endpoint/plus",
1213
"bencher_json/plus",

0 commit comments

Comments
 (0)