Skip to content

Commit

Permalink
build(cargo): remove unused features (#62616)
Browse files Browse the repository at this point in the history
### What?

It doesn't look like we are using these dependencies, remove from cargo
manifests.

Deploy CI confirms all native builds are passing:
https://github.com/vercel/next.js/actions/runs/8074472383


Closes PACK-2609
  • Loading branch information
kwonoj committed Feb 28, 2024
1 parent 7525633 commit acdf052
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 102 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ jobs:
run: node scripts/normalize-version-bump.js

- name: Build
run: turbo run build-wasm -vvv --remote-cache-timeout 90 --summarize -- --target ${{ matrix.target }} --features tracing/release_max_level_info
run: turbo run build-wasm -vvv --remote-cache-timeout 90 --summarize -- --target ${{ matrix.target }}

- name: Add target to folder name
run: '[[ -d "packages/next-swc/crates/wasm/pkg" ]] && mv packages/next-swc/crates/wasm/pkg packages/next-swc/crates/wasm/pkg-${{ matrix.target }} || ls packages/next-swc/crates/wasm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ jobs:

uses: ./.github/workflows/build_reusable.yml
with:
afterBuild: rustup target add wasm32-unknown-unknown && curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh && node ./scripts/normalize-version-bump.js && turbo run build-wasm -- --target nodejs --features tracing/release_max_level_info && git checkout . && mv packages/next-swc/crates/wasm/pkg packages/next-swc/crates/wasm/pkg-nodejs && node ./scripts/setup-wasm.mjs && NEXT_TEST_MODE=start TEST_WASM=true node run-tests.js test/production/pages-dir/production/test/index.test.ts test/e2e/streaming-ssr/index.test.ts
afterBuild: rustup target add wasm32-unknown-unknown && curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh && node ./scripts/normalize-version-bump.js && turbo run build-wasm -- --target nodejs && git checkout . && mv packages/next-swc/crates/wasm/pkg packages/next-swc/crates/wasm/pkg-nodejs && node ./scripts/setup-wasm.mjs && NEXT_TEST_MODE=start TEST_WASM=true node run-tests.js test/production/pages-dir/production/test/index.test.ts test/e2e/streaming-ssr/index.test.ts
stepName: 'test-next-swc-wasm'
secrets: inherit

Expand Down
74 changes: 5 additions & 69 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions packages/next-swc/crates/napi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,10 @@ napi = { version = "2", default-features = false, features = [
napi-derive = "2"
next-custom-transforms = { workspace = true }

once_cell = { workspace = true }
serde = "1"
serde_json = "1"
shadow-rs = { workspace = true }
tracing = { workspace = true }
tracing-futures = "0.2.5"
tracing-subscriber = { workspace = true }
tracing-chrome = "0.5.0"
url = {workspace = true}
Expand Down
17 changes: 0 additions & 17 deletions packages/next-swc/crates/next-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,15 @@ autobenches = false
bench = false

[features]
tokio_console = [
"dep:console-subscriber",
"tokio/tracing",
"turbo-tasks/tokio_tracing",
]
serializable = []
profile = []

[lints]
workspace = true

[dependencies]
anyhow = { workspace = true }
async-recursion = { workspace = true }
console-subscriber = { workspace = true, optional = true }
dunce = { workspace = true }
next-core = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true, features = ["full"] }
tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter", "json"] }
indoc = { workspace = true }
indexmap = { workspace = true }
mime_guess = "2.0.4"
base64 = "0.21.0"

turbopack-binding = { workspace = true, features = [
"__turbo_tasks",
Expand Down
2 changes: 0 additions & 2 deletions packages/next-swc/crates/next-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ anyhow = { workspace = true }
async-recursion = { workspace = true }
async-trait = { workspace = true }
base64 = "0.21.0"
const_format = "0.2.30"
lazy-regex = "3.0.1"
next-custom-transforms = { workspace = true }
once_cell = { workspace = true }
Expand All @@ -25,7 +24,6 @@ regex = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
indexmap = { workspace = true, features = ["serde"] }
mime = { workspace = true }
mime_guess = "2.0.4"
indoc = { workspace = true }
allsorts = { workspace = true }
Expand Down
4 changes: 0 additions & 4 deletions packages/next-swc/crates/next-custom-transforms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ workspace = true

[dependencies]
chrono = "0.4"
convert_case = "0.5.0"
easy-error = "1.0.0"
either = "1"
fxhash = "0.2.1"
Expand All @@ -25,9 +24,6 @@ serde = { workspace = true }
serde_json = { workspace = true, features = ["preserve_order"] }
sha1 = "0.10.1"
tracing = { version = "0.1.37" }
anyhow = { workspace = true }
lazy_static = { workspace = true }
lightningcss = {workspace = true}

turbopack-binding = { workspace = true, features = [
"__swc_core",
Expand Down
7 changes: 1 addition & 6 deletions packages/next-swc/crates/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ crate-type = ["cdylib"]
default = ["swc_v1"]
swc_v1 = []

plugin = ["getrandom/js", "turbopack-binding/__swc_core_binding_wasm_plugin"]
plugin = ["turbopack-binding/__swc_core_binding_wasm_plugin"]

[lints]
workspace = true
Expand All @@ -20,12 +20,7 @@ workspace = true
anyhow = "1.0.66"
console_error_panic_hook = "0.1.6"
next-custom-transforms = { workspace = true }
once_cell = { workspace = true }
parking_lot_core = "=0.8.0"
path-clean = "0.1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tracing = { version = "0.1.37" }
wasm-bindgen = { version = "0.2", features = ["enable-interning"] }
wasm-bindgen-futures = "0.4.8"
getrandom = { version = "0.2.9", default-features = false, features = ["js"] }
Expand Down

0 comments on commit acdf052

Please sign in to comment.