Skip to content

Commit 280c99d

Browse files
Merge branch 'canary' into chore/update-oxlint-config
2 parents 7e59ac0 + f3537a0 commit 280c99d

File tree

20 files changed

+228
-785
lines changed

20 files changed

+228
-785
lines changed

.github/workflows/turbopack-benchmark.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,6 @@ env:
2727
TURBO_TOKEN: ${{ secrets.HOSTED_TURBO_TOKEN }}
2828

2929
jobs:
30-
benchmark-tiny:
31-
name: Benchmark Rust Crates (tiny)
32-
runs-on: ubuntu-latest
33-
steps:
34-
- uses: actions/checkout@v4
35-
36-
- name: Setup Rust toolchain
37-
uses: ./.github/actions/setup-rust
38-
39-
- name: Install cargo-codspeed
40-
uses: taiki-e/install-action@v2
41-
with:
42-
43-
44-
- name: Build app build benchmarks
45-
run: cargo codspeed build -p next-api
46-
47-
- name: Run the benchmarks
48-
uses: CodSpeedHQ/action@v3
49-
with:
50-
run: cargo codspeed run
51-
token: ${{ secrets.CODSPEED_TOKEN }}
52-
5330
benchmark-small-apps:
5431
name: Benchmark Rust Crates (small apps)
5532
runs-on: ['self-hosted', 'linux', 'x64', 'metal']

Cargo.lock

Lines changed: 0 additions & 74 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@ criterion = { package = "codspeed-criterion-compat", version = "3.0.5" }
356356
crossbeam-channel = "0.5.8"
357357
dashmap = "6.1.0"
358358
data-encoding = "2.3.3"
359-
divan = { package = "codspeed-divan-compat", version = "3.0.5" }
360359
dhat = { version = "0.3.2" }
361360
dunce = "1.0.3"
362361
either = "1.9.0"

crates/napi/src/next_api/project.rs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ use tracing::Instrument;
3232
use tracing_subscriber::{Registry, layer::SubscriberExt, util::SubscriberInitExt};
3333
use turbo_rcstr::{RcStr, rcstr};
3434
use turbo_tasks::{
35-
Completion, Effects, FxIndexSet, NonLocalValue, OperationValue, OperationVc, ReadRef,
36-
ResolvedVc, TaskInput, TransientInstance, TryJoinIterExt, TurboTasksApi, UpdateInfo, Vc,
37-
get_effects,
35+
Effects, FxIndexSet, NonLocalValue, OperationValue, OperationVc, ReadRef, ResolvedVc,
36+
TaskInput, TransientInstance, TryJoinIterExt, TurboTasksApi, UpdateInfo, Vc, get_effects,
3837
message_queue::{CompilationEvent, Severity, TimingEvent},
3938
trace::TraceRawVcs,
4039
};
@@ -465,13 +464,18 @@ pub fn project_new(
465464
.or_else(|e| turbopack_ctx.throw_turbopack_internal_result(&e))
466465
.await?;
467466

468-
turbo_tasks.spawn_once_task({
467+
turbo_tasks.start_once_process({
469468
let tt = turbo_tasks.clone();
470-
async move {
471-
benchmark_file_io(tt, container.project().node_root().owned().await?)
472-
.await
473-
.inspect_err(|err| tracing::warn!(%err, "failed to benchmark file IO"))
474-
}
469+
Box::pin(async move {
470+
let future = async move {
471+
benchmark_file_io(tt, container.project().node_root().owned().await?).await
472+
};
473+
if let Err(err) = future.await {
474+
// TODO Not ideal to print directly to stdout.
475+
// We should use a compilation event instead to report async errors.
476+
println!("Failed to benchmark file IO: {err}");
477+
}
478+
})
475479
});
476480

477481
Ok(External::new(ProjectInstance {
@@ -519,10 +523,7 @@ impl CompilationEvent for SlowFilesystemEvent {
519523
/// - https://x.com/jarredsumner/status/1637549427677364224
520524
/// - https://github.com/oven-sh/bun/blob/06a9aa80c38b08b3148bfeabe560/src/install/install.zig#L3038
521525
#[tracing::instrument(skip(turbo_tasks))]
522-
async fn benchmark_file_io(
523-
turbo_tasks: NextTurboTasks,
524-
directory: FileSystemPath,
525-
) -> Result<Vc<Completion>> {
526+
async fn benchmark_file_io(turbo_tasks: NextTurboTasks, directory: FileSystemPath) -> Result<()> {
526527
// try to get the real file path on disk so that we can use it with tokio
527528
let fs = ResolvedVc::try_downcast_type::<DiskFileSystem>(directory.fs)
528529
.context(anyhow!(
@@ -567,7 +568,7 @@ async fn benchmark_file_io(
567568
}));
568569
}
569570

570-
Ok(Completion::new())
571+
Ok(())
571572
}
572573

573574
#[napi]

crates/next-api/Cargo.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ autobenches = false
99
[lib]
1010
bench = false
1111

12-
[[bench]]
13-
name = "hmr"
14-
harness = false
15-
1612
[lints]
1713
workspace = true
1814

@@ -44,12 +40,10 @@ turbopack-wasm = { workspace = true }
4440

4541
[dev-dependencies]
4642
turbo-tasks-malloc = { workspace = true }
47-
divan = { workspace = true }
4843
tokio = { workspace = true }
4944
tempfile = { workspace = true }
5045
turbo-tasks-backend = { workspace = true }
5146

52-
5347
[build-dependencies]
5448
anyhow = { workspace = true }
5549
vergen = { workspace = true }

0 commit comments

Comments
 (0)