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

Commit bed4db3

Browse files
committed
Use workspace.dependencies to declare local dependencies
1 parent f932d39 commit bed4db3

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
@@ -32,3 +32,39 @@ debug = 0
3232
# ungrammar = { path = "../ungrammar" }
3333

3434
# salsa = { path = "../salsa" }
35+
36+
[workspace.dependencies]
37+
# local crates
38+
base-db = { path = "./crates/base-db", version = "0.0.0" }
39+
cfg = { path = "./crates/cfg", version = "0.0.0" }
40+
flycheck = { path = "./crates/flycheck", version = "0.0.0" }
41+
hir = { path = "./crates/hir", version = "0.0.0" }
42+
hir-def = { path = "./crates/hir-def", version = "0.0.0" }
43+
hir-expand = { path = "./crates/hir-expand", version = "0.0.0" }
44+
hir-ty = { path = "./crates/hir-ty", version = "0.0.0" }
45+
ide = { path = "./crates/ide", version = "0.0.0" }
46+
ide-assists = { path = "./crates/ide-assists", version = "0.0.0" }
47+
ide-completion = { path = "./crates/ide-completion", version = "0.0.0" }
48+
ide-db = { path = "./crates/ide-db", version = "0.0.0" }
49+
ide-diagnostics = { path = "./crates/ide-diagnostics", version = "0.0.0" }
50+
ide-ssr = { path = "./crates/ide-ssr", version = "0.0.0" }
51+
intern = { path = "./crates/intern", version = "0.0.0" }
52+
limit = { path = "./crates/limit", version = "0.0.0" }
53+
mbe = { path = "./crates/mbe", version = "0.0.0" }
54+
parser = { path = "./crates/parser", version = "0.0.0" }
55+
paths = { path = "./crates/paths", version = "0.0.0" }
56+
proc-macro-api = { path = "./crates/proc-macro-api", version = "0.0.0" }
57+
proc-macro-srv = { path = "./crates/proc-macro-srv", version = "0.0.0" }
58+
proc-macro-srv-cli = { path = "./crates/proc-macro-srv-cli", version = "0.0.0" }
59+
proc-macro-test = { path = "./crates/proc-macro-test", version = "0.0.0" }
60+
profile = { path = "./crates/profile", version = "0.0.0" }
61+
project-model = { path = "./crates/project-model", version = "0.0.0" }
62+
sourcegen = { path = "./crates/sourcegen", version = "0.0.0" }
63+
stdx = { path = "./crates/stdx", version = "0.0.0" }
64+
syntax = { path = "./crates/syntax", version = "0.0.0" }
65+
test-utils = { path = "./crates/test-utils", version = "0.0.0" }
66+
text-edit = { path = "./crates/text-edit", version = "0.0.0" }
67+
toolchain = { path = "./crates/toolchain", version = "0.0.0" }
68+
tt = { path = "./crates/tt", version = "0.0.0" }
69+
vfs-notify = { path = "./crates/vfs-notify", version = "0.0.0" }
70+
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
@@ -13,10 +13,11 @@ doctest = false
1313
salsa = "0.17.0-pre.2"
1414
rustc-hash = "1.1.0"
1515

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

crates/cfg/Cargo.toml

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

15-
tt = { path = "../tt", version = "0.0.0" }
15+
# locals deps
16+
tt.workspace = true
1617

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

crates/flycheck/Cargo.toml

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

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

crates/hir-def/Cargo.toml

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

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

4446
[dev-dependencies]
45-
test-utils = { path = "../test-utils" }
4647
expect-test = "1.4.0"
48+
49+
# local deps
50+
test-utils.workspace = true

crates/hir-expand/Cargo.toml

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

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

3435
[dev-dependencies]
3536
expect-test = "1.4.0"

crates/hir-ty/Cargo.toml

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

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

4041
[dev-dependencies]
41-
test-utils = { path = "../test-utils" }
4242
expect-test = "1.4.0"
4343
tracing = "0.1.35"
4444
tracing-subscriber = { version = "0.3.16", default-features = false, features = [
4545
"env-filter",
4646
"registry",
4747
] }
4848
tracing-tree = "0.2.1"
49+
50+
# local deps
51+
test-utils.workspace = true

crates/hir/Cargo.toml

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

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

crates/ide-assists/Cargo.toml

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

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

2627
[dev-dependencies]
27-
test-utils = { path = "../test-utils" }
28-
sourcegen = { path = "../sourcegen" }
2928
expect-test = "1.4.0"
3029

30+
# local deps
31+
test-utils.workspace = true
32+
sourcegen.workspace = true
33+
3134
[features]
3235
in-rust-tree = []

crates/ide-completion/Cargo.toml

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

19-
stdx = { path = "../stdx", version = "0.0.0" }
20-
syntax = { path = "../syntax", version = "0.0.0" }
21-
text-edit = { path = "../text-edit", version = "0.0.0" }
22-
base-db = { path = "../base-db", version = "0.0.0" }
23-
ide-db = { path = "../ide-db", version = "0.0.0" }
24-
profile = { path = "../profile", version = "0.0.0" }
2519

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

3031
[dev-dependencies]
3132
expect-test = "1.4.0"
3233

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

crates/ide-db/Cargo.toml

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

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

3637
[dev-dependencies]
37-
test-utils = { path = "../test-utils" }
38-
sourcegen = { path = "../sourcegen" }
3938
xshell = "0.2.2"
4039
expect-test = "1.4.0"
40+
41+
# local deps
42+
test-utils.workspace = true
43+
sourcegen.workspace = true

crates/ide-diagnostics/Cargo.toml

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

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

2627
[dev-dependencies]
2728
expect-test = "1.4.0"
2829

29-
test-utils = { path = "../test-utils" }
30-
sourcegen = { path = "../sourcegen" }
30+
# local deps
31+
test-utils.workspace = true
32+
sourcegen.workspace = true
3133

3234
[features]
3335
in-rust-tree = []

crates/ide-ssr/Cargo.toml

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

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

2425
[dev-dependencies]
25-
test-utils = { path = "../test-utils" }
2626
expect-test = "1.4.0"
27+
28+
# local deps
29+
test-utils.workspace = true

crates/ide/Cargo.toml

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

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

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

4343
[dev-dependencies]
44-
test-utils = { path = "../test-utils" }
4544
expect-test = "1.4.0"
4645

46+
# local deps
47+
test-utils.workspace = true
48+
4749
[features]
4850
in-rust-tree = ["ide-assists/in-rust-tree", "ide-diagnostics/in-rust-tree"]

0 commit comments

Comments
 (0)