Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

feat(rome_v8): implement a wrapper for the V8 runtime #3580

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ codegen-bindings = "run -p xtask_codegen --features schema -- bindings"
codegen-configuration = "run -p xtask_codegen --features configuration -- configuration"
codegen-schema = "run -p xtask_codegen --features schema -- schema"
codegen-website = "run -p xtask_codegen --features website -- website"
codemod = "run -p rome_v8 --example codemod --"
contributors = "run -p xtask_contributors --"
coverage = "run -p xtask_coverage --profile=release-with-debug --"
documentation = """
Expand Down
211 changes: 203 additions & 8 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ serde = { version = "1.0.163", features = ["derive"], default-featur
serde_json = "1.0.96"
smallvec = { version = "1.10.0", features = ["union", "const_new"] }
tracing = { version = "0.1.37", default-features = false, features = ["std"] }
crossbeam = "0.8.2"
# pinning to version 1.18 to avoid multiple versions of windows-sys as dependency
tokio = { version = "~1.18.5" }

Expand Down
2 changes: 1 addition & 1 deletion crates/rome_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ path = "src/main.rs"
[dependencies]
anyhow = "1.0.52"
bpaf = { workspace = true }
crossbeam = "0.8.1"
crossbeam = { workspace = true }
dashmap = { workspace = true }
hdrhistogram = { version = "7.5.0", default-features = false }
indexmap = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/rome_fs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version = "0.0.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
crossbeam = "0.8.1"
crossbeam = { workspace = true }
indexmap = { workspace = true }
parking_lot = { version = "0.12.0", features = ["arc_lock"] }
rayon = "1.5.1"
Expand Down
7 changes: 6 additions & 1 deletion crates/rome_fs/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ pub trait FileSystemExt: FileSystem {
)
}

/// Opens a file with read options
fn read(&self, path: &Path) -> io::Result<Box<dyn File>> {
self.open_with_options(path, OpenOptions::default().read(true))
}

/// Opens a file with the `read`, `write` and `create_new` options
///
/// Equivalent to [std::fs::File::create_new]
Expand All @@ -230,7 +235,7 @@ pub trait FileSystemExt: FileSystem {
}
}

impl<T: ?Sized> FileSystemExt for T where T: FileSystem {}
impl<T: FileSystem + ?Sized> FileSystemExt for T {}

type BoxedTraversal<'fs, 'scope> = Box<dyn FnOnce(&dyn TraversalScope<'scope>) + Send + 'fs>;

Expand Down
Loading
Loading