1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-21 04:52:26 -05:00

build on stable rust

This commit is contained in:
Bartek Iwańczuk 2024-12-03 03:40:14 +01:00
parent 46766438f8
commit 1217314cc7
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750
4 changed files with 1 additions and 122 deletions

90
Cargo.lock generated
View file

@ -92,7 +92,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
dependencies = [
"cfg-if",
"const-random",
"getrandom",
"once_cell",
"version_check",
@ -920,26 +919,6 @@ version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
[[package]]
name = "const-random"
version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359"
dependencies = [
"const-random-macro",
]
[[package]]
name = "const-random-macro"
version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e"
dependencies = [
"getrandom",
"once_cell",
"tiny-keccak",
]
[[package]]
name = "convert_case"
version = "0.4.0"
@ -952,12 +931,6 @@ version = "5.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147be55d677052dabc6b22252d5dd0fd4c29c8c27aa4f2fbef0f94aa003b406f"
[[package]]
name = "copyless"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536"
[[package]]
name = "core-foundation"
version = "0.9.4"
@ -1067,12 +1040,6 @@ version = "0.8.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
[[package]]
name = "crunchy"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
[[package]]
name = "crypto-bigint"
version = "0.5.5"
@ -1320,8 +1287,6 @@ dependencies = [
"spki",
"sqlformat",
"strsim",
"swc_estree_compat",
"swc_node_comments",
"tar",
"tempfile",
"test_server",
@ -7106,7 +7071,6 @@ dependencies = [
"swc_atoms",
"swc_eq_ignore_macros",
"swc_visit",
"termcolor",
"tracing",
"unicode-width",
"url",
@ -7403,40 +7367,6 @@ dependencies = [
"syn 2.0.87",
]
[[package]]
name = "swc_estree_ast"
version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f43fc4af85f158e5400b68c493f13a9351dbf5a31264818962420b52eea2110"
dependencies = [
"better_scoped_tls",
"serde",
"serde_json",
"swc_atoms",
"swc_common",
]
[[package]]
name = "swc_estree_compat"
version = "0.212.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "091527fcd167fca9cc83da15c3be102351709a76f2cb4e6b691731f0d5a229fc"
dependencies = [
"ahash",
"anyhow",
"copyless",
"serde",
"serde_json",
"swc_atoms",
"swc_common",
"swc_ecma_ast",
"swc_ecma_parser",
"swc_ecma_utils",
"swc_ecma_visit",
"swc_estree_ast",
"swc_node_comments",
]
[[package]]
name = "swc_fast_graph"
version = "0.25.0"
@ -7473,17 +7403,6 @@ dependencies = [
"syn 2.0.87",
]
[[package]]
name = "swc_node_comments"
version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d016ab18b432523b2a3c104ce3aaf7d869db46c0a41477dbfb6201ddc86c1eb0"
dependencies = [
"dashmap",
"swc_atoms",
"swc_common",
]
[[package]]
name = "swc_visit"
version = "0.6.2"
@ -7776,15 +7695,6 @@ dependencies = [
"time-core",
]
[[package]]
name = "tiny-keccak"
version = "2.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"
dependencies = [
"crunchy",
]
[[package]]
name = "tiny_pretty"
version = "0.2.0"

View file

@ -154,8 +154,6 @@ shell-escape = "=0.1.5"
spki = { version = "0.7", features = ["pem"] }
sqlformat = "=0.3.2"
strsim = "0.11.1"
swc_estree_compat = "0.212.0"
swc_node_comments = "0.24.0"
tar.workspace = true
tempfile.workspace = true
text-size = "=1.1.0"

View file

@ -29,8 +29,6 @@ use indexmap::IndexMap;
use serde::Deserialize;
use std::rc::Rc;
use std::sync::Arc;
use swc_estree_compat::babelify;
use swc_estree_compat::babelify::Babelify;
use tokio::sync::mpsc::channel;
use tokio::sync::mpsc::Receiver;
use tokio::sync::mpsc::Sender;
@ -392,33 +390,6 @@ pub fn serialize_ast(parsed_source: ParsedSource) -> Result<String, AnyError> {
Ok(r)
}
pub fn get_estree_from_parsed_source(
parsed_source: ParsedSource,
) -> Result<String, AnyError> {
let cm = Rc::new(swc_common::SourceMap::new(
swc_common::FilePathMapping::empty(),
));
let fm = Rc::new(swc_common::SourceFile::new(
Rc::new(swc_common::FileName::Anon),
false,
Rc::new(swc_common::FileName::Anon),
parsed_source.text().to_string(),
BytePos(1),
));
let babelify_ctx = babelify::Context {
fm,
cm,
comments: swc_node_comments::SwcComments::default(),
};
let program = parsed_source.program();
let start = std::time::Instant::now();
let program = &*program;
let r = serde_json::to_string(&program.clone().babelify(&babelify_ctx))?;
let end = std::time::Instant::now();
eprintln!("serialize using serde_json took {:?}", end - start);
Ok(r)
}
struct LintPluginDesc {
rules: IndexMap<String, v8::Global<v8::Function>>,
}

View file

@ -1,3 +1,3 @@
[toolchain]
channel = "nightly"
channel = "1.82.0"
components = ["rustfmt", "clippy"]