Skip to content

Commit

Permalink
chore: fix next dev turbopack benchmark (#52328)
Browse files Browse the repository at this point in the history
This is a follow up to PR #52291
which removed the `next.config.js` which started causing an error during
CI:

```
@next/swc:test-cargo-bench: error: couldn't read packages/next-swc/crates/next-dev/benches/next.config.js: No such file or directory (os error 2)
@next/swc:test-cargo-bench:   --> packages/next-swc/crates/next-dev/benches/bundler.rs:74:13
@next/swc:test-cargo-bench:    |
@next/swc:test-cargo-bench: 74 |             include_bytes!("next.config.js"),
@next/swc:test-cargo-bench:    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@next/swc:test-cargo-bench:    |
@next/swc:test-cargo-bench:    = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)
@next/swc:test-cargo-bench: 
@next/swc:test-cargo-bench: error: could not compile `next-dev` (bench "mod") due to previous error
@next/swc:test-cargo-bench: warning: build failed, waiting for other jobs to finish...
@next/swc:test-cargo-bench:  ELIFECYCLE  Command failed with exit code 101.
```

https://github.com/vercel/next.js/actions/runs/5476339074/jobs/9973767389#step:27:959
  • Loading branch information
styfle committed Jul 6, 2023
1 parent 38e45f2 commit 9141586
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions packages/next-swc/crates/next-dev/benches/bundler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ impl Bundler for TurboNext {
return Err(anyhow!("pnpm build failed. See above."));
}

fs::write(
install_dir.join("next.config.js"),
include_bytes!("next.config.js"),
)?;

Ok(())
}

Expand Down

0 comments on commit 9141586

Please sign in to comment.