From 42a22c280d80c986ab36baa1843b2b8344066501 Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Mon, 6 Feb 2023 14:18:16 +0900 Subject: [PATCH] use workspace dependencies --- Cargo.lock | 6 --- Cargo.toml | 55 ++++++++++++++++++++---- common/Cargo.toml | 25 +++++------ compiler/Cargo.toml | 2 +- compiler/ast/Cargo.toml | 3 +- compiler/codegen/Cargo.toml | 18 ++++---- compiler/core/Cargo.toml | 19 +++++---- compiler/parser/Cargo.toml | 23 +++++----- derive-impl/Cargo.toml | 9 ++-- derive/Cargo.toml | 2 +- jit/Cargo.toml | 5 ++- pylib/Cargo.toml | 2 +- stdlib/Cargo.toml | 57 +++++++++++++------------ vm/Cargo.toml | 84 ++++++++++++++++++------------------- wasm/lib/Cargo.toml | 7 ++-- 15 files changed, 176 insertions(+), 141 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a02126978..a36c8b6d1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1928,7 +1928,6 @@ dependencies = [ "flamescope", "libc", "log", - "num-traits", "python3-sys", "rustpython-compiler", "rustpython-parser", @@ -2120,7 +2119,6 @@ dependencies = [ "gethostname", "hex", "itertools", - "lexical-parse-float", "libc", "libsqlite3-sys", "libz-sys", @@ -2174,7 +2172,6 @@ dependencies = [ name = "rustpython-vm" version = "0.2.0" dependencies = [ - "adler32", "ahash", "ascii", "atty", @@ -2187,12 +2184,10 @@ dependencies = [ "exitcode", "flame", "flamer", - "flate2", "getrandom", "glob", "half", "hex", - "hexf-parse", "indexmap", "is-macro", "itertools", @@ -2253,7 +2248,6 @@ version = "0.2.0" dependencies = [ "console_error_panic_hook", "js-sys", - "parking_lot", "rustpython-common", "rustpython-parser", "rustpython-pylib", diff --git a/Cargo.toml b/Cargo.toml index 11df8b91f..aa7f7c48e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,45 @@ members = [ ".", "common", "derive", "jit", "vm", "pylib", "stdlib", "wasm/lib", "derive-impl", ] +[workspace.dependencies] +ahash = "0.7.6" +anyhow = "1.0.45" +ascii = "1.0" +atty = "0.2.14" +bincode = "1.3.3" +bitflags = "1.3.2" +bstr = "0.2.17" +cfg-if = "1.0" +chrono = "0.4.19" +crossbeam-utils = "0.8.9" +flame = "0.2.2" +glob = "0.3" +hex = "0.4.3" +indexmap = "1.8.1" +insta = "1.14.0" +itertools = "0.10.3" +libc = "0.2.133" +log = "0.4.16" +nix = "0.24" +num-complex = "0.4.0" +num-bigint = "0.4.3" +num-integer = "0.1.44" +num-rational = "0.4.0" +num-traits = "0.2" +num_enum = "0.5.7" +once_cell = "1.13" +parking_lot = "0.12" +paste = "1.0.7" +rand = "0.8.5" +rustyline = "10.0.0" +serde = "1.0" +schannel = "0.1.19" +static_assertions = "1.1" +syn = "1.0.91" +thiserror = "1.0" +thread_local = "1.1.4" +widestring = "0.5.1" + [features] default = ["threading", "stdlib", "zlib", "importlib", "encodings", "rustpython-parser/lalrpop"] importlib = ["rustpython-vm/importlib"] @@ -39,19 +78,21 @@ rustpython-pylib = { path = "pylib", optional = true, default-features = false } rustpython-stdlib = { path = "stdlib", optional = true, default-features = false } rustpython-vm = { path = "vm", version = "0.2.0", default-features = false, features = ["compiler"] } -cfg-if = "1.0.0" +atty = { workspace = true } +cfg-if = { workspace = true } +log = { workspace = true } +flame = { workspace = true, optional = true } + clap = "2.34" dirs = { package = "dirs-next", version = "2.0.0" } env_logger = { version = "0.9.0", default-features = false, features = ["atty", "termcolor"] } -flame = { version = "0.2.2", optional = true } flamescope = { version = "0.1.2", optional = true } -libc = "0.2.133" -log = "0.4.16" -num-traits = "0.2.14" -atty = "0.2.14" + +[target.'cfg(windows)'.dependencies] +libc = { workspace = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -rustyline = "10.0.0" +rustyline = { workspace = true } [dev-dependencies] cpython = "0.7.0" diff --git a/common/Cargo.toml b/common/Cargo.toml index 87229dce9..d98ec8e78 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -11,24 +11,25 @@ license = "MIT" threading = ["parking_lot"] [dependencies] -ascii = "1.0" -bitflags = "1.3.2" -cfg-if = "1.0" +ascii = { workspace = true } +bitflags = { workspace = true } +cfg-if = { workspace = true } +itertools = { workspace = true } +libc = { workspace = true } +num-bigint = { workspace = true } +num-complex = { workspace = true } +num-traits = { workspace = true } +once_cell = { workspace = true } +parking_lot = { workspace = true, optional = true } +rand = { workspace = true } + hexf-parse = "0.2.1" -itertools = "0.10.3" lexical-parse-float = { version = "0.8.0", features = ["format"] } -libc = "0.2.133" lock_api = "0.4" -num-bigint = "0.4.2" -num-complex = "0.4.0" -num-traits = "0.2" -once_cell = "1.4.1" -parking_lot = { version = "0.12.0", optional = true } radium = "0.7" -rand = "0.8" siphasher = "0.3" unic-ucd-category = "0.9" volatile = "0.3" [target.'cfg(windows)'.dependencies] -widestring = "0.5.1" +widestring = { workspace = true } diff --git a/compiler/Cargo.toml b/compiler/Cargo.toml index 34dbad326..b6e204dfd 100644 --- a/compiler/Cargo.toml +++ b/compiler/Cargo.toml @@ -10,4 +10,4 @@ rustpython-compiler-core = { path = "core" } rustpython-codegen = { path = "codegen" } rustpython-parser = { path = "parser" } -thiserror = "1.0" +thiserror = { workspace = true } diff --git a/compiler/ast/Cargo.toml b/compiler/ast/Cargo.toml index 08f29fcc9..bb280f48f 100644 --- a/compiler/ast/Cargo.toml +++ b/compiler/ast/Cargo.toml @@ -14,6 +14,7 @@ fold = [] unparse = ["rustpython-common"] [dependencies] -num-bigint = "0.4.3" rustpython-compiler-core = { path = "../core", version = "0.2.0" } rustpython-common = { path = "../../common", version = "0.2.0", optional = true } + +num-bigint = { workspace = true } diff --git a/compiler/codegen/Cargo.toml b/compiler/codegen/Cargo.toml index 4265e4b23..fd6ad6533 100644 --- a/compiler/codegen/Cargo.toml +++ b/compiler/codegen/Cargo.toml @@ -11,16 +11,16 @@ edition = "2021" rustpython-ast = { path = "../ast", features = ["unparse"] } rustpython-compiler-core = { path = "../core", version = "0.2.0" } -ahash = "0.7.6" -bitflags = "1.3.2" -indexmap = "1.8.1" -itertools = "0.10.3" -log = "0.4.16" -num-complex = { version = "0.4.0", features = ["serde"] } -num-traits = "0.2.14" -thiserror = "1.0" +ahash = { workspace = true } +bitflags = { workspace = true } +indexmap = { workspace = true } +itertools = { workspace = true } +log = { workspace = true } +num-complex = { workspace = true, features = ["serde"] } +num-traits = { workspace = true } +thiserror = { workspace = true } [dev-dependencies] rustpython-parser = { path = "../parser" } -insta = "1.14.0" +insta = { workspace = true } diff --git a/compiler/core/Cargo.toml b/compiler/core/Cargo.toml index f9cbce313..bf385a718 100644 --- a/compiler/core/Cargo.toml +++ b/compiler/core/Cargo.toml @@ -8,13 +8,14 @@ repository = "https://github.com/RustPython/RustPython" license = "MIT" [dependencies] -bincode = "1.3.3" -bitflags = "1.3.2" -bstr = "0.2.17" -itertools = "0.10.3" +bincode = { workspace = true } +bitflags = { workspace = true } +bstr = { workspace = true } +itertools = { workspace = true } +num-bigint = { workspace = true, features = ["serde"] } +num-complex = { workspace = true, features = ["serde"] } +num_enum = { workspace = true } +serde = { workspace = true, features = ["derive"] } +thiserror = { workspace = true } + lz4_flex = "0.9.2" -num-bigint = { version = "0.4.3", features = ["serde"] } -num-complex = { version = "0.4.0", features = ["serde"] } -num_enum = "0.5.7" -serde = { version = "1.0.136", features = ["derive"] } -thiserror = "1.0" diff --git a/compiler/parser/Cargo.toml b/compiler/parser/Cargo.toml index c7b8af64d..56f3d161f 100644 --- a/compiler/parser/Cargo.toml +++ b/compiler/parser/Cargo.toml @@ -12,7 +12,7 @@ edition = "2021" default = ["lalrpop"] # removing this causes potential build failure [build-dependencies] -anyhow = "1.0.45" +anyhow = { workspace = true } lalrpop = { version = "0.19.8", optional = true } phf_codegen = "0.11.1" tiny-keccak = { version = "2", features = ["sha3"] } @@ -21,18 +21,19 @@ tiny-keccak = { version = "2", features = ["sha3"] } rustpython-ast = { path = "../ast", version = "0.2.0" } rustpython-compiler-core = { path = "../core", version = "0.2.0" } -ahash = "0.7.6" -itertools = "0.10.3" -lalrpop-util = "0.19.8" -log = "0.4.16" -num-bigint = "0.4.3" -num-traits = "0.2.14" -phf = "0.11.1" -rustc-hash = "1.1.0" -thiserror = "1.0" +ahash = { workspace = true } +itertools = { workspace = true } +log = { workspace = true } +num-bigint = { workspace = true } +num-traits = { workspace = true } +thiserror = { workspace = true } + unic-emoji-char = "0.9.0" unic-ucd-ident = "0.9.0" unicode_names2 = "0.5.0" +lalrpop-util = "0.19.8" +phf = "0.11.1" +rustc-hash = "1.1.0" [dev-dependencies] -insta = "1.14.0" +insta = { workspace = true } diff --git a/derive-impl/Cargo.toml b/derive-impl/Cargo.toml index 2f1d936a5..31fab8abc 100644 --- a/derive-impl/Cargo.toml +++ b/derive-impl/Cargo.toml @@ -7,12 +7,13 @@ edition = "2021" rustpython-compiler-core = { path = "../compiler/core", version = "0.2.0" } rustpython-doc = { git = "https://github.com/RustPython/__doc__", branch = "main" } -indexmap = "1.8.1" -itertools = "0.10.3" +indexmap = { workspace = true } +itertools = { workspace = true } +once_cell = { workspace = true } +syn = { workspace = true, features = ["full", "extra-traits"] } + maplit = "1.0.2" -once_cell = "1.10.0" proc-macro2 = "1.0.37" quote = "1.0.18" -syn = { version = "1.0.91", features = ["full", "extra-traits"] } syn-ext = { version = "0.4.0", features = ["full"] } textwrap = { version = "0.15.0", default-features = false } diff --git a/derive/Cargo.toml b/derive/Cargo.toml index 3548bcf8b..f14d6db49 100644 --- a/derive/Cargo.toml +++ b/derive/Cargo.toml @@ -13,4 +13,4 @@ proc-macro = true [dependencies] rustpython-compiler = { path = "../compiler", version = "0.2.0" } rustpython-derive-impl = { path = "../derive-impl" } -syn = "1.0.91" +syn = { workspace = true } diff --git a/jit/Cargo.toml b/jit/Cargo.toml index c04266a3b..80cc9b868 100644 --- a/jit/Cargo.toml +++ b/jit/Cargo.toml @@ -12,12 +12,13 @@ autotests = false [dependencies] rustpython-compiler-core = { path = "../compiler/core", version = "0.2.0" } +num-traits = { workspace = true } +thiserror = { workspace = true } + cranelift = "0.88.0" cranelift-jit = "0.88.0" cranelift-module = "0.88.0" libffi = "2.0.0" -num-traits = "0.2" -thiserror = "1.0" [dev-dependencies] rustpython-derive = { path = "../derive", version = "0.2.0" } diff --git a/pylib/Cargo.toml b/pylib/Cargo.toml index ce08e1ebe..dba74d6c3 100644 --- a/pylib/Cargo.toml +++ b/pylib/Cargo.toml @@ -16,4 +16,4 @@ rustpython-compiler-core = { version = "0.2.0", path = "../compiler/core" } rustpython-derive = { version = "0.2.0", path = "../derive" } [build-dependencies] -glob = "0.3" +glob = { workspace = true } diff --git a/stdlib/Cargo.toml b/stdlib/Cargo.toml index 816494960..97b8943d7 100644 --- a/stdlib/Cargo.toml +++ b/stdlib/Cargo.toml @@ -18,8 +18,32 @@ rustpython-derive = { path = "../derive" } rustpython-vm = { path = "../vm" } rustpython-common = { path = "../common" } +ahash = { workspace = true } +ascii = { workspace = true } +cfg-if = { workspace = true } +crossbeam-utils = { workspace = true } +hex = { workspace = true } +itertools = { workspace = true } +libc = { workspace = true } +nix = { workspace = true } +num-complex = { workspace = true } +num-bigint = { workspace = true } +num-integer = { workspace = true } +num-rational = { workspace = true } +num-traits = { workspace = true } +num_enum = { workspace = true } +once_cell = { workspace = true } +parking_lot = { workspace = true } + +memchr = "2.4.1" +base64 = "0.13.0" +csv-core = "0.1.10" +libz-sys = { version = "1.1.5", optional = true } +puruspe = "0.1.5" +xml-rs = "0.8.4" + # random -rand = "0.8.5" +rand = { workspace = true } rand_core = "0.6.3" mt19937 = "2.0.1" @@ -50,31 +74,6 @@ crc32fast = "1.3.2" flate2 = "1.0.23" bzip2 = { version = "0.4", optional = true } -num-complex = "0.4.0" -num-bigint = "0.4.3" -num-integer = "0.1.44" -num-rational = "0.4.1" - -crossbeam-utils = "0.8.9" -itertools = "0.10.3" -lexical-parse-float = "0.8.3" -num-traits = "0.2.14" -memchr = "2.4.1" -base64 = "0.13.0" -csv-core = "0.1.10" -hex = "0.4.3" -puruspe = "0.1.5" -nix = "0.24" -xml-rs = "0.8.4" -libc = "0.2.133" -cfg-if = "1.0.0" -ahash = "0.7.6" -libz-sys = { version = "1.1.5", optional = true } -num_enum = "0.5.7" -ascii = "1.0.0" -parking_lot = "0.12.0" -once_cell = "1.13.0" - # uuid [target.'cfg(not(any(target_os = "ios", target_os = "android", target_os = "windows", target_arch = "wasm32")))'.dependencies] mac_address = "1.1.3" @@ -101,9 +100,9 @@ foreign-types-shared = { version = "0.1.1", optional = true } libsqlite3-sys = { version = "0.25", features = ["min_sqlite_version_3_7_16", "bundled"] } [target.'cfg(windows)'.dependencies] -schannel = "0.1.19" -widestring = "0.5.1" -paste = "1.0.7" +paste = { workspace = true } +schannel = { workspace = true } +widestring = { workspace = true } [target.'cfg(windows)'.dependencies.winapi] version = "0.3.9" diff --git a/vm/Cargo.toml b/vm/Cargo.toml index 437d2d77c..487b3eec8 100644 --- a/vm/Cargo.toml +++ b/vm/Cargo.toml @@ -32,45 +32,46 @@ rustpython-common = { path = "../common" } rustpython-derive = { path = "../derive", version = "0.2.0" } rustpython-jit = { path = "../jit", optional = true, version = "0.2.0" } -num-complex = { version = "0.4.0", features = ["serde"] } -num-bigint = { version = "0.4.3", features = ["serde"] } -num-traits = "0.2.14" -num-integer = "0.1.44" -num-rational = "0.4.0" -rand = "0.8.5" -getrandom = { version = "0.2.6", features = ["js"] } -log = "0.4.16" -serde = { version = "1.0.136", features = ["derive"] } +ascii = { workspace = true } +ahash = { workspace = true } +atty = { workspace = true } +bitflags = { workspace = true } +bstr = { workspace = true } +cfg-if = { workspace = true } +crossbeam-utils = { workspace = true } +chrono = { workspace = true, features = ["wasmbind"] } +flame = { workspace = true, optional = true } +hex = { workspace = true } +indexmap = { workspace = true } +itertools = { workspace = true } +libc = { workspace = true } +log = { workspace = true } +nix = { workspace = true } +num-bigint = { workspace = true, features = ["serde"] } +num-complex = { workspace = true, features = ["serde"] } +num-integer = { workspace = true } +num-rational = { workspace = true } +num-traits = { workspace = true } +num_enum = { workspace = true } +once_cell = { workspace = true } +parking_lot = { workspace = true } +paste = { workspace = true } +rand = { workspace = true } +serde = { workspace = true, features = ["derive"] } +static_assertions = { workspace = true } +thiserror = { workspace = true } +thread_local = { workspace = true } + caseless = "0.2.1" -chrono = { version = "0.4.19", features = ["wasmbind"] } -itertools = "0.10.3" -hex = "0.4.3" -hexf-parse = "0.2.1" -indexmap = "1.8.1" -ahash = "0.7.6" -bitflags = "1.3.2" -libc = "0.2.133" -nix = "0.24.2" -paste = "1.0.7" -is-macro = "0.2.0" -result-like = "0.4.5" -num_enum = "0.5.7" -bstr = "0.2.17" -crossbeam-utils = "0.8.9" -parking_lot = "0.12.0" -thread_local = "1.1.4" -cfg-if = "1.0.0" -timsort = "0.1.2" -thiserror = "1.0" -atty = "0.2.14" -static_assertions = "1.1.0" +getrandom = { version = "0.2.6", features = ["js"] } +flamer = { version = "0.4", optional = true } half = "1.8.2" +is-macro = "0.2.0" memchr = "2.4.1" -adler32 = "1.2.0" -flate2 = "1.0.23" -once_cell = "1.10.0" memoffset = "0.6.5" optional = "0.5.0" +result-like = "0.4.5" +timsort = "0.1.2" # RustPython crates implementing functionality based on CPython sre-engine = "0.4.1" @@ -89,11 +90,6 @@ unic-ucd-bidi = "0.9.0" unic-ucd-category = "0.9.0" unic-ucd-ident = "0.9.0" -flame = { version = "0.2", optional = true } -flamer = { version = "0.4", optional = true } - -ascii = "1.0.0" - [target.'cfg(unix)'.dependencies] exitcode = "1.1.2" uname = "0.1.1" @@ -101,16 +97,16 @@ strum = "0.24.0" strum_macros = "0.24.0" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -rustyline = "10.0.0" +rustyline = { workspace = true } which = "4.2.5" [target.'cfg(any(not(target_arch = "wasm32"), target_os = "wasi"))'.dependencies] num_cpus = "1.13.1" [target.'cfg(windows)'.dependencies] +schannel = { workspace = true } +widestring = { workspace = true } winreg = "0.10.1" -schannel = "0.1.19" -widestring = "0.5.1" [target.'cfg(windows)'.dependencies.windows] version = "0.39.0" @@ -130,6 +126,6 @@ features = [ wasm-bindgen = "0.2.80" [build-dependencies] -itertools = "0.10.3" +glob = { workspace = true } +itertools = { workspace = true } rustc_version = "0.4.0" -glob = "0.3" diff --git a/wasm/lib/Cargo.toml b/wasm/lib/Cargo.toml index cf77cd1d0..8a28f903f 100644 --- a/wasm/lib/Cargo.toml +++ b/wasm/lib/Cargo.toml @@ -23,13 +23,12 @@ rustpython-stdlib = { path = "../../stdlib", default-features = false, optional # make sure no threading! otherwise wasm build will fail rustpython-vm = { path = "../../vm", default-features = false, features = ["compiler", "encodings"] } +serde = { workspace = true } + console_error_panic_hook = "0.1" js-sys = "0.3" -# make parking_lot use wasm-bingden for instant -parking_lot = { version = "0.12.0" } -serde = "1.0" serde-wasm-bindgen = "0.3.1" -wasm-bindgen = "0.2" +wasm-bindgen = "0.2.80" wasm-bindgen-futures = "0.4" web-sys = { version = "0.3", features = [ "console",