Skip to content

Commit 84a8293

Browse files
committed
Grab the rest
1 parent 3c3ca01 commit 84a8293

File tree

13 files changed

+7
-42
lines changed

13 files changed

+7
-42
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ too_many_arguments = "allow"
2525
unexpected_cfgs = { level = "warn", check-cfg = [
2626
'cfg(rust_analyzer)',
2727
'cfg(fuzzing)',
28+
'cfg(codspeed)',
2829
] }
2930

3031
# This crate is particularly sensitive to compiler optimizations

crates/next-api/benches/hmr.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ impl HmrBenchmark {
378378
}
379379

380380
async fn setup_benchmark(module_count: usize) -> HmrBenchmark {
381-
register();
382381
HmrBenchmark::new(module_count).await.unwrap()
383382
}
384383

turbopack/crates/turbo-tasks-backend/tests/test_config.trs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
|name, initial| {
2-
let path = std::path::PathBuf::from(format!(concat!(
3-
env!("OUT_DIR"),
4-
"/.cache/{}",
5-
), name));
2+
let path = std::path::PathBuf::from(
3+
format!("{}/.cache/{}", std::env::var("OUT_DIR").unwrap(), name));
64
if initial {
75
let _ = std::fs::remove_dir_all(&path);
86
}

turbopack/crates/turbo-tasks-fetch/tests/test_config.trs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
|name, initial| {
2-
let path = std::path::PathBuf::from(format!(concat!(
3-
env!("OUT_DIR"),
4-
"/.cache/{}",
5-
), name));
2+
let path = std::path::PathBuf::from(
3+
format!("{}/.cache/{}", std::env::var("OUT_DIR").unwrap(), name));
64
if initial {
75
let _ = std::fs::remove_dir_all(&path);
86
}

turbopack/crates/turbopack-cli/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,3 @@ criterion = { workspace = true, features = ["async_tokio"] }
7676
regex = { workspace = true }
7777
turbopack-bench = { workspace = true }
7878
turbo-tasks-malloc = { workspace = true, features = ["custom_allocator"] }
79-

turbopack/crates/turbopack-ecmascript/benches/analyzer.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ use turbopack_ecmascript::analyzer::{
2525
};
2626

2727
pub fn benchmark(c: &mut Criterion) {
28-
turbopack_ecmascript::register();
29-
3028
let tests_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests/analyzer/graph");
3129
let results = fs::read_dir(tests_dir).unwrap();
3230

turbopack/crates/turbopack-ecmascript/benches/references.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ use turbopack_ecmascript::{
2020
use turbopack_test_utils::noop_asset_context::NoopAssetContext;
2121

2222
pub fn benchmark(c: &mut Criterion) {
23-
turbopack_ecmascript::register();
24-
turbopack_test_utils::register();
25-
2623
let rt = tokio::runtime::Builder::new_current_thread()
2724
.build()
2825
.unwrap();

turbopack/crates/turbopack-ecmascript/src/analyzer/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3790,7 +3790,6 @@ mod tests {
37903790

37913791
#[fixture("tests/analyzer/graph/**/input.js")]
37923792
fn fixture(input: PathBuf) {
3793-
crate::register();
37943793
let graph_snapshot_path = input.with_file_name("graph.snapshot");
37953794
let graph_explained_snapshot_path = input.with_file_name("graph-explained.snapshot");
37963795
let graph_effects_snapshot_path = input.with_file_name("graph-effects.snapshot");

turbopack/crates/turbopack-tests/tests/execution.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
mod util;
77

8-
use std::{env, path::PathBuf, sync::Once};
8+
use std::{env, path::PathBuf};
99

1010
use anyhow::{Context, Result};
1111
use dunce::canonicalize;

turbopack/crates/turbopack-tests/tests/snapshot.rs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
mod util;
55

6-
use std::{collections::VecDeque, fs, io, path::PathBuf, sync::Once};
6+
use std::{collections::VecDeque, fs, io, path::PathBuf};
77

88
use anyhow::{Context, Result, bail};
99
use dunce::canonicalize;
@@ -64,20 +64,6 @@ use turbopack_test_utils::snapshot::{UPDATE, diff, expected, matches_expected, s
6464

6565
use crate::util::REPO_ROOT;
6666

67-
fn register() {
68-
turbo_tasks::register();
69-
turbo_tasks_env::register();
70-
turbo_tasks_fs::register();
71-
turbopack::register();
72-
turbopack_nodejs::register();
73-
turbopack_browser::register();
74-
turbopack_env::register();
75-
turbopack_ecmascript_plugins::register();
76-
turbopack_ecmascript_runtime::register();
77-
turbopack_resolve::register();
78-
include!(concat!(env!("OUT_DIR"), "/register_test_snapshot.rs"));
79-
}
80-
8167
#[derive(Debug, Deserialize)]
8268
#[serde(rename_all = "camelCase")]
8369
struct SnapshotOptions {
@@ -205,9 +191,6 @@ fn test(resource: PathBuf) {
205191

206192
#[tokio::main(flavor = "current_thread")]
207193
async fn run(resource: PathBuf) -> Result<()> {
208-
static REGISTER_ONCE: Once = Once::new();
209-
REGISTER_ONCE.call_once(register);
210-
211194
let tt = TurboTasks::new(TurboTasksBackend::new(
212195
BackendOptions {
213196
storage_mode: None,

0 commit comments

Comments
 (0)