Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit fa87462

Browse files
committed
Auto merge of rust-lang#13969 - Veykril:workspace.dependencies, r=Veykril
Use workspace.dependencies to declare local dependencies
2 parents 6290785 + bed4db3 commit fa87462

File tree

27 files changed

+240
-168
lines changed

27 files changed

+240
-168
lines changed

Cargo.toml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,39 @@ debug = 0
3838
# ungrammar = { path = "../ungrammar" }
3939

4040
# salsa = { path = "../salsa" }
41+
42+
[workspace.dependencies]
43+
# local crates
44+
base-db = { path = "./crates/base-db", version = "0.0.0" }
45+
cfg = { path = "./crates/cfg", version = "0.0.0" }
46+
flycheck = { path = "./crates/flycheck", version = "0.0.0" }
47+
hir = { path = "./crates/hir", version = "0.0.0" }
48+
hir-def = { path = "./crates/hir-def", version = "0.0.0" }
49+
hir-expand = { path = "./crates/hir-expand", version = "0.0.0" }
50+
hir-ty = { path = "./crates/hir-ty", version = "0.0.0" }
51+
ide = { path = "./crates/ide", version = "0.0.0" }
52+
ide-assists = { path = "./crates/ide-assists", version = "0.0.0" }
53+
ide-completion = { path = "./crates/ide-completion", version = "0.0.0" }
54+
ide-db = { path = "./crates/ide-db", version = "0.0.0" }
55+
ide-diagnostics = { path = "./crates/ide-diagnostics", version = "0.0.0" }
56+
ide-ssr = { path = "./crates/ide-ssr", version = "0.0.0" }
57+
intern = { path = "./crates/intern", version = "0.0.0" }
58+
limit = { path = "./crates/limit", version = "0.0.0" }
59+
mbe = { path = "./crates/mbe", version = "0.0.0" }
60+
parser = { path = "./crates/parser", version = "0.0.0" }
61+
paths = { path = "./crates/paths", version = "0.0.0" }
62+
proc-macro-api = { path = "./crates/proc-macro-api", version = "0.0.0" }
63+
proc-macro-srv = { path = "./crates/proc-macro-srv", version = "0.0.0" }
64+
proc-macro-srv-cli = { path = "./crates/proc-macro-srv-cli", version = "0.0.0" }
65+
proc-macro-test = { path = "./crates/proc-macro-test", version = "0.0.0" }
66+
profile = { path = "./crates/profile", version = "0.0.0" }
67+
project-model = { path = "./crates/project-model", version = "0.0.0" }
68+
sourcegen = { path = "./crates/sourcegen", version = "0.0.0" }
69+
stdx = { path = "./crates/stdx", version = "0.0.0" }
70+
syntax = { path = "./crates/syntax", version = "0.0.0" }
71+
test-utils = { path = "./crates/test-utils", version = "0.0.0" }
72+
text-edit = { path = "./crates/text-edit", version = "0.0.0" }
73+
toolchain = { path = "./crates/toolchain", version = "0.0.0" }
74+
tt = { path = "./crates/tt", version = "0.0.0" }
75+
vfs-notify = { path = "./crates/vfs-notify", version = "0.0.0" }
76+
vfs = { path = "./crates/vfs", version = "0.0.0" }

crates/base-db/Cargo.toml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ doctest = false
1515
salsa = "0.17.0-pre.2"
1616
rustc-hash = "1.1.0"
1717

18-
syntax = { path = "../syntax", version = "0.0.0" }
19-
stdx = { path = "../stdx", version = "0.0.0" }
20-
cfg = { path = "../cfg", version = "0.0.0" }
21-
profile = { path = "../profile", version = "0.0.0" }
22-
tt = { path = "../tt", version = "0.0.0" }
23-
test-utils = { path = "../test-utils", version = "0.0.0" }
24-
vfs = { path = "../vfs", version = "0.0.0" }
18+
# local deps
19+
cfg.workspace = true
20+
profile.workspace = true
21+
stdx.workspace = true
22+
syntax.workspace = true
23+
test-utils.workspace = true
24+
tt.workspace = true
25+
vfs.workspace = true

crates/cfg/Cargo.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@ doctest = false
1414
[dependencies]
1515
rustc-hash = "1.1.0"
1616

17-
tt = { path = "../tt", version = "0.0.0" }
17+
# locals deps
18+
tt.workspace = true
1819

1920
[dev-dependencies]
20-
mbe = { path = "../mbe" }
21-
syntax = { path = "../syntax" }
2221
expect-test = "1.4.0"
2322
oorandom = "11.1.3"
2423
# We depend on both individually instead of using `features = ["derive"]` to microoptimize the
2524
# build graph: if the feature was enabled, syn would be built early on in the graph if `smolstr`
2625
# supports `arbitrary`. This way, we avoid feature unification.
2726
arbitrary = "1.1.7"
2827
derive_arbitrary = "1.1.6"
28+
29+
# local deps
30+
mbe.workspace = true
31+
syntax.workspace = true

crates/flycheck/Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ serde_json = "1.0.86"
2121
jod-thread = "0.1.2"
2222
command-group = "2.0.1"
2323

24-
toolchain = { path = "../toolchain", version = "0.0.0" }
25-
stdx = { path = "../stdx", version = "0.0.0" }
26-
paths = { path = "../paths", version = "0.0.0" }
24+
# local deps
25+
paths.workspace = true
26+
stdx.workspace = true
27+
toolchain.workspace = true

crates/hir-def/Cargo.toml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,23 @@ rustc-hash = "1.1.0"
3030
smallvec = "1.10.0"
3131
tracing = "0.1.35"
3232

33-
stdx = { path = "../stdx", version = "0.0.0" }
34-
intern = { path = "../intern", version = "0.0.0" }
35-
base-db = { path = "../base-db", version = "0.0.0" }
36-
syntax = { path = "../syntax", version = "0.0.0" }
37-
profile = { path = "../profile", version = "0.0.0" }
38-
hir-expand = { path = "../hir-expand", version = "0.0.0" }
3933
rustc_abi = { version = "0.0.20221221", package = "hkalbasi-rustc-ap-rustc_abi", default-features = false }
4034
rustc_index = { version = "0.0.20221221", package = "hkalbasi-rustc-ap-rustc_index", default-features = false }
41-
mbe = { path = "../mbe", version = "0.0.0" }
42-
cfg = { path = "../cfg", version = "0.0.0" }
43-
tt = { path = "../tt", version = "0.0.0" }
44-
limit = { path = "../limit", version = "0.0.0" }
35+
36+
# local deps
37+
stdx.workspace = true
38+
intern.workspace = true
39+
base-db.workspace = true
40+
syntax.workspace = true
41+
profile.workspace = true
42+
hir-expand.workspace = true
43+
mbe.workspace = true
44+
cfg.workspace = true
45+
tt.workspace = true
46+
limit.workspace = true
4547

4648
[dev-dependencies]
47-
test-utils = { path = "../test-utils" }
4849
expect-test = "1.4.0"
50+
51+
# local deps
52+
test-utils.workspace = true

crates/hir-expand/Cargo.toml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,16 @@ hashbrown = { version = "0.12.1", features = [
2323
], default-features = false }
2424
smallvec = { version = "1.10.0", features = ["const_new"] }
2525

26-
stdx = { path = "../stdx", version = "0.0.0" }
27-
intern = { path = "../intern", version = "0.0.0" }
28-
base-db = { path = "../base-db", version = "0.0.0" }
29-
cfg = { path = "../cfg", version = "0.0.0" }
30-
syntax = { path = "../syntax", version = "0.0.0" }
31-
profile = { path = "../profile", version = "0.0.0" }
32-
tt = { path = "../tt", version = "0.0.0" }
33-
mbe = { path = "../mbe", version = "0.0.0" }
34-
limit = { path = "../limit", version = "0.0.0" }
26+
# local deps
27+
stdx.workspace = true
28+
intern.workspace = true
29+
base-db.workspace = true
30+
cfg.workspace = true
31+
syntax.workspace = true
32+
profile.workspace = true
33+
tt.workspace = true
34+
mbe.workspace = true
35+
limit.workspace = true
3536

3637
[dev-dependencies]
3738
expect-test = "1.4.0"

crates/hir-ty/Cargo.toml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,24 @@ once_cell = "1.15.0"
3030
typed-arena = "2.0.1"
3131
rustc_index = { version = "0.0.20221221", package = "hkalbasi-rustc-ap-rustc_index", default-features = false }
3232

33-
stdx = { path = "../stdx", version = "0.0.0" }
34-
intern = { path = "../intern", version = "0.0.0" }
35-
hir-def = { path = "../hir-def", version = "0.0.0" }
36-
hir-expand = { path = "../hir-expand", version = "0.0.0" }
37-
base-db = { path = "../base-db", version = "0.0.0" }
38-
profile = { path = "../profile", version = "0.0.0" }
39-
syntax = { path = "../syntax", version = "0.0.0" }
40-
limit = { path = "../limit", version = "0.0.0" }
33+
# local deps
34+
stdx.workspace = true
35+
intern.workspace = true
36+
hir-def.workspace = true
37+
hir-expand.workspace = true
38+
base-db.workspace = true
39+
profile.workspace = true
40+
syntax.workspace = true
41+
limit.workspace = true
4142

4243
[dev-dependencies]
43-
test-utils = { path = "../test-utils" }
4444
expect-test = "1.4.0"
4545
tracing = "0.1.35"
4646
tracing-subscriber = { version = "0.3.16", default-features = false, features = [
4747
"env-filter",
4848
"registry",
4949
] }
5050
tracing-tree = "0.2.1"
51+
52+
# local deps
53+
test-utils.workspace = true

crates/hir/Cargo.toml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ itertools = "0.10.5"
1919
smallvec = "1.10.0"
2020
once_cell = "1.15.0"
2121

22-
stdx = { path = "../stdx", version = "0.0.0" }
23-
syntax = { path = "../syntax", version = "0.0.0" }
24-
base-db = { path = "../base-db", version = "0.0.0" }
25-
profile = { path = "../profile", version = "0.0.0" }
26-
hir-expand = { path = "../hir-expand", version = "0.0.0" }
27-
hir-def = { path = "../hir-def", version = "0.0.0" }
28-
hir-ty = { path = "../hir-ty", version = "0.0.0" }
29-
tt = { path = "../tt", version = "0.0.0" }
30-
cfg = { path = "../cfg", version = "0.0.0" }
22+
# local deps
23+
base-db.workspace = true
24+
cfg.workspace = true
25+
hir-def.workspace = true
26+
hir-expand.workspace = true
27+
hir-ty.workspace = true
28+
profile.workspace = true
29+
stdx.workspace = true
30+
syntax.workspace = true
31+
tt.workspace = true

crates/ide-assists/Cargo.toml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,20 @@ itertools = "0.10.5"
1818
either = "1.7.0"
1919
smallvec = "1.10.0"
2020

21-
stdx = { path = "../stdx", version = "0.0.0" }
22-
syntax = { path = "../syntax", version = "0.0.0" }
23-
text-edit = { path = "../text-edit", version = "0.0.0" }
24-
profile = { path = "../profile", version = "0.0.0" }
25-
ide-db = { path = "../ide-db", version = "0.0.0" }
26-
hir = { path = "../hir", version = "0.0.0" }
21+
# local deps
22+
stdx.workspace = true
23+
syntax.workspace = true
24+
text-edit.workspace = true
25+
profile.workspace = true
26+
ide-db.workspace = true
27+
hir.workspace = true
2728

2829
[dev-dependencies]
29-
test-utils = { path = "../test-utils" }
30-
sourcegen = { path = "../sourcegen" }
3130
expect-test = "1.4.0"
3231

32+
# local deps
33+
test-utils.workspace = true
34+
sourcegen.workspace = true
35+
3336
[features]
3437
in-rust-tree = []

crates/ide-completion/Cargo.toml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,20 @@ itertools = "0.10.5"
1818
once_cell = "1.15.0"
1919
smallvec = "1.10.0"
2020

21-
stdx = { path = "../stdx", version = "0.0.0" }
22-
syntax = { path = "../syntax", version = "0.0.0" }
23-
text-edit = { path = "../text-edit", version = "0.0.0" }
24-
base-db = { path = "../base-db", version = "0.0.0" }
25-
ide-db = { path = "../ide-db", version = "0.0.0" }
26-
profile = { path = "../profile", version = "0.0.0" }
2721

22+
# local deps
23+
base-db.workspace = true
24+
ide-db.workspace = true
25+
profile.workspace = true
26+
stdx.workspace = true
27+
syntax.workspace = true
28+
text-edit.workspace = true
2829
# completions crate should depend only on the top-level `hir` package. if you need
2930
# something from some `hir-xxx` subpackage, reexport the API via `hir`.
30-
hir = { path = "../hir", version = "0.0.0" }
31+
hir.workspace = true
3132

3233
[dev-dependencies]
3334
expect-test = "1.4.0"
3435

35-
test-utils = { path = "../test-utils" }
36+
# local deps
37+
test-utils.workspace = true

crates/ide-db/Cargo.toml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,22 @@ arrayvec = "0.7.2"
2424
indexmap = "1.9.1"
2525
memchr = "2.5.0"
2626

27-
stdx = { path = "../stdx", version = "0.0.0" }
28-
parser = { path = "../parser", version = "0.0.0" }
29-
syntax = { path = "../syntax", version = "0.0.0" }
30-
text-edit = { path = "../text-edit", version = "0.0.0" }
31-
base-db = { path = "../base-db", version = "0.0.0" }
32-
profile = { path = "../profile", version = "0.0.0" }
27+
# local deps
28+
base-db.workspace = true
29+
limit.workspace = true
30+
parser.workspace = true
31+
profile.workspace = true
32+
stdx.workspace = true
33+
syntax.workspace = true
34+
text-edit .workspace = true
3335
# ide should depend only on the top-level `hir` package. if you need
3436
# something from some `hir-xxx` subpackage, reexport the API via `hir`.
35-
hir = { path = "../hir", version = "0.0.0" }
36-
limit = { path = "../limit", version = "0.0.0" }
37+
hir.workspace = true
3738

3839
[dev-dependencies]
39-
test-utils = { path = "../test-utils" }
40-
sourcegen = { path = "../sourcegen" }
4140
xshell = "0.2.2"
4241
expect-test = "1.4.0"
42+
43+
# local deps
44+
test-utils.workspace = true
45+
sourcegen.workspace = true

crates/ide-diagnostics/Cargo.toml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,21 @@ either = "1.7.0"
1717
itertools = "0.10.5"
1818
serde_json = "1.0.86"
1919

20-
profile = { path = "../profile", version = "0.0.0" }
21-
stdx = { path = "../stdx", version = "0.0.0" }
22-
syntax = { path = "../syntax", version = "0.0.0" }
23-
text-edit = { path = "../text-edit", version = "0.0.0" }
24-
cfg = { path = "../cfg", version = "0.0.0" }
25-
hir = { path = "../hir", version = "0.0.0" }
26-
ide-db = { path = "../ide-db", version = "0.0.0" }
20+
# local deps
21+
profile.workspace = true
22+
stdx.workspace = true
23+
syntax.workspace = true
24+
text-edit.workspace = true
25+
cfg.workspace = true
26+
hir.workspace = true
27+
ide-db.workspace = true
2728

2829
[dev-dependencies]
2930
expect-test = "1.4.0"
3031

31-
test-utils = { path = "../test-utils" }
32-
sourcegen = { path = "../sourcegen" }
32+
# local deps
33+
test-utils.workspace = true
34+
sourcegen.workspace = true
3335

3436
[features]
3537
in-rust-tree = []

crates/ide-ssr/Cargo.toml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@ doctest = false
1616
cov-mark = "2.0.0-pre.1"
1717
itertools = "0.10.5"
1818

19-
text-edit = { path = "../text-edit", version = "0.0.0" }
20-
parser = { path = "../parser", version = "0.0.0" }
21-
syntax = { path = "../syntax", version = "0.0.0" }
22-
ide-db = { path = "../ide-db", version = "0.0.0" }
23-
hir = { path = "../hir", version = "0.0.0" }
24-
stdx = { path = "../stdx", version = "0.0.0" }
19+
# local deps
20+
hir.workspace = true
21+
ide-db.workspace = true
22+
parser.workspace = true
23+
stdx.workspace = true
24+
syntax.workspace = true
25+
text-edit.workspace = true
2526

2627
[dev-dependencies]
27-
test-utils = { path = "../test-utils" }
2828
expect-test = "1.4.0"
29+
30+
# local deps
31+
test-utils.workspace = true

crates/ide/Cargo.toml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,29 @@ url = "2.3.1"
2424
dot = "0.1.4"
2525
smallvec = "1.10.0"
2626

27-
stdx = { path = "../stdx", version = "0.0.0" }
28-
syntax = { path = "../syntax", version = "0.0.0" }
29-
text-edit = { path = "../text-edit", version = "0.0.0" }
30-
ide-db = { path = "../ide-db", version = "0.0.0" }
31-
cfg = { path = "../cfg", version = "0.0.0" }
32-
profile = { path = "../profile", version = "0.0.0" }
33-
ide-assists = { path = "../ide-assists", version = "0.0.0" }
34-
ide-diagnostics = { path = "../ide-diagnostics", version = "0.0.0" }
35-
ide-ssr = { path = "../ide-ssr", version = "0.0.0" }
36-
ide-completion = { path = "../ide-completion", version = "0.0.0" }
37-
27+
# local deps
28+
cfg.workspace = true
29+
ide-assists.workspace = true
30+
ide-completion.workspace = true
31+
ide-db.workspace = true
32+
ide-diagnostics.workspace = true
33+
ide-ssr.workspace = true
34+
profile.workspace = true
35+
stdx.workspace = true
36+
syntax.workspace = true
37+
text-edit.workspace = true
3838
# ide should depend only on the top-level `hir` package. if you need
3939
# something from some `hir-xxx` subpackage, reexport the API via `hir`.
40-
hir = { path = "../hir", version = "0.0.0" }
40+
hir.workspace = true
4141

4242
[target.'cfg(not(any(target_arch = "wasm32", target_os = "emscripten")))'.dependencies]
43-
toolchain = { path = "../toolchain", version = "0.0.0" }
43+
toolchain.workspace = true
4444

4545
[dev-dependencies]
46-
test-utils = { path = "../test-utils" }
4746
expect-test = "1.4.0"
4847

48+
# local deps
49+
test-utils.workspace = true
50+
4951
[features]
5052
in-rust-tree = ["ide-assists/in-rust-tree", "ide-diagnostics/in-rust-tree"]

0 commit comments

Comments
 (0)