Skip to content

Commit eebf14f

Browse files
authored
Allow stable rust (#118)
This pr introduces some cargo features. For `swc_common` and `swc_ecma_ast`, it introduces a feature flag `fold`. `Fold` and `Visit` traits exist only if the feature is enabled. For `swc_ecma_parser`, flag called `verify` is added. When disabled, we skip checking of validity of some expressions. e.g. `{foo = bar}` Verification is disabled by default it requires nightly compiler
1 parent 3387591 commit eebf14f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+8987
-671
lines changed

.cargo/config

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
[build]
33
rustflags = [
44
"--cfg", "procmacro2_semver_exempt",
5-
"--cfg", "parallel_queries",
65
]
76

87
rustdocflags = [
98
"--cfg", "procmacro2_semver_exempt",
10-
"--cfg", "parallel_queries",
119
]

common/Cargo.toml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
11
[package]
22
name = "swc_common"
3-
version = "0.1.4"
3+
version = "0.2.0"
44
authors = ["강동윤 <[email protected]>"]
55
license = "Apache-2.0/MIT"
66
repository = "https://github.com/swc-project/swc.git"
77
documentation = "https://swc-project.github.io/rustdoc/swc_common/"
88
description = "Common utilities for the swc project."
99

10+
[features]
11+
default = []
12+
# Enable folder and visitor. Requires nightly compiler.
13+
fold = ["ast_node/fold"]
14+
15+
1016
[dependencies]
11-
ast_node = { version = "0.2", path = "../macros/ast_node" }
17+
ast_node = { version = "0.3", path = "../macros/ast_node" }
1218
string_cache = "0.7"
1319
either = "1.5"
14-
rustc-ap-rustc_errors = "313"
15-
rustc-ap-syntax = "313"
16-
rustc-ap-rustc_data_structures = "313"
17-
rustc-ap-syntax_pos = "313"
20+
scoped-tls = { version = "0.1.1", features = ["nightly"] }
21+
unicode-width = "0.1.4"
22+
cfg-if = "0.1.2"
23+
log = "0.4"
24+
atty = "0.2"
25+
parking_lot = "0.6"
26+
fxhash = "0.2"
27+
termcolor = "1.0"
28+
rayon = "1"
29+
rayon-core = "1"
30+
owning_ref = "0.4"

0 commit comments

Comments
 (0)