2018-02-03 09:51:06 +00:00
|
|
|
[workspace]
|
2021-01-15 17:57:32 +00:00
|
|
|
members = ["xtask/", "lib/*", "crates/*"]
|
2024-01-04 10:09:45 +00:00
|
|
|
exclude = ["crates/proc-macro-srv/proc-macro-test/imp"]
|
2023-06-04 08:02:11 +00:00
|
|
|
resolver = "2"
|
2018-08-15 21:23:22 +00:00
|
|
|
|
2023-01-16 15:33:01 +00:00
|
|
|
[workspace.package]
|
2023-12-29 13:58:50 +00:00
|
|
|
rust-version = "1.74"
|
2023-01-16 15:41:47 +00:00
|
|
|
edition = "2021"
|
|
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
authors = ["rust-analyzer team"]
|
2023-01-16 15:33:01 +00:00
|
|
|
|
2019-10-11 08:06:28 +00:00
|
|
|
[profile.dev]
|
2020-08-18 15:44:51 +00:00
|
|
|
# Disabling debug info speeds up builds a bunch,
|
2019-11-11 07:11:46 +00:00
|
|
|
# and we don't rely on it for debugging that much.
|
2023-12-04 20:15:44 +00:00
|
|
|
debug = 0
|
2019-10-11 08:06:28 +00:00
|
|
|
|
2020-08-18 15:44:51 +00:00
|
|
|
[profile.dev.package]
|
|
|
|
# These speed up local tests.
|
|
|
|
rowan.opt-level = 3
|
|
|
|
rustc-hash.opt-level = 3
|
|
|
|
smol_str.opt-level = 3
|
|
|
|
text-size.opt-level = 3
|
|
|
|
# This speeds up `cargo xtask dist`.
|
|
|
|
miniz_oxide.opt-level = 3
|
|
|
|
|
2018-08-15 21:23:22 +00:00
|
|
|
[profile.release]
|
2021-05-30 23:12:11 +00:00
|
|
|
incremental = true
|
2021-10-19 12:15:47 +00:00
|
|
|
# Set this to 1 or 2 to get more useful backtraces in debugger.
|
|
|
|
debug = 0
|
2020-01-31 19:49:44 +00:00
|
|
|
|
2018-12-30 08:09:17 +00:00
|
|
|
[patch.'crates-io']
|
2020-01-11 21:15:27 +00:00
|
|
|
# rowan = { path = "../rowan" }
|
2020-02-15 17:00:14 +00:00
|
|
|
|
|
|
|
# chalk-solve = { path = "../chalk/chalk-solve" }
|
|
|
|
# chalk-ir = { path = "../chalk/chalk-ir" }
|
2020-10-30 17:57:16 +00:00
|
|
|
# chalk-recursive = { path = "../chalk/chalk-recursive" }
|
2022-10-13 15:39:14 +00:00
|
|
|
# chalk-derive = { path = "../chalk/chalk-derive" }
|
2023-06-21 01:23:07 +00:00
|
|
|
# line-index = { path = "lib/line-index" }
|
|
|
|
# la-arena = { path = "lib/la-arena" }
|
|
|
|
# lsp-server = { path = "lib/lsp-server" }
|
|
|
|
|
2020-12-15 14:37:37 +00:00
|
|
|
|
|
|
|
# ungrammar = { path = "../ungrammar" }
|
2021-05-06 17:59:54 +00:00
|
|
|
|
2023-12-07 09:57:51 +00:00
|
|
|
# rust-analyzer-salsa = { path = "../salsa" }
|
2023-01-17 09:52:26 +00:00
|
|
|
|
|
|
|
[workspace.dependencies]
|
|
|
|
# local crates
|
|
|
|
base-db = { path = "./crates/base-db", version = "0.0.0" }
|
|
|
|
cfg = { path = "./crates/cfg", version = "0.0.0" }
|
|
|
|
flycheck = { path = "./crates/flycheck", version = "0.0.0" }
|
|
|
|
hir = { path = "./crates/hir", version = "0.0.0" }
|
|
|
|
hir-def = { path = "./crates/hir-def", version = "0.0.0" }
|
|
|
|
hir-expand = { path = "./crates/hir-expand", version = "0.0.0" }
|
|
|
|
hir-ty = { path = "./crates/hir-ty", version = "0.0.0" }
|
|
|
|
ide = { path = "./crates/ide", version = "0.0.0" }
|
|
|
|
ide-assists = { path = "./crates/ide-assists", version = "0.0.0" }
|
|
|
|
ide-completion = { path = "./crates/ide-completion", version = "0.0.0" }
|
|
|
|
ide-db = { path = "./crates/ide-db", version = "0.0.0" }
|
|
|
|
ide-diagnostics = { path = "./crates/ide-diagnostics", version = "0.0.0" }
|
|
|
|
ide-ssr = { path = "./crates/ide-ssr", version = "0.0.0" }
|
|
|
|
intern = { path = "./crates/intern", version = "0.0.0" }
|
|
|
|
limit = { path = "./crates/limit", version = "0.0.0" }
|
2023-07-03 15:40:31 +00:00
|
|
|
load-cargo = { path = "./crates/load-cargo", version = "0.0.0" }
|
2023-01-17 09:52:26 +00:00
|
|
|
mbe = { path = "./crates/mbe", version = "0.0.0" }
|
|
|
|
parser = { path = "./crates/parser", version = "0.0.0" }
|
|
|
|
paths = { path = "./crates/paths", version = "0.0.0" }
|
|
|
|
proc-macro-api = { path = "./crates/proc-macro-api", version = "0.0.0" }
|
|
|
|
proc-macro-srv = { path = "./crates/proc-macro-srv", version = "0.0.0" }
|
|
|
|
proc-macro-srv-cli = { path = "./crates/proc-macro-srv-cli", version = "0.0.0" }
|
|
|
|
profile = { path = "./crates/profile", version = "0.0.0" }
|
|
|
|
project-model = { path = "./crates/project-model", version = "0.0.0" }
|
2023-12-18 12:30:41 +00:00
|
|
|
span = { path = "./crates/span", version = "0.0.0" }
|
2023-01-17 09:52:26 +00:00
|
|
|
stdx = { path = "./crates/stdx", version = "0.0.0" }
|
|
|
|
syntax = { path = "./crates/syntax", version = "0.0.0" }
|
|
|
|
text-edit = { path = "./crates/text-edit", version = "0.0.0" }
|
|
|
|
toolchain = { path = "./crates/toolchain", version = "0.0.0" }
|
|
|
|
tt = { path = "./crates/tt", version = "0.0.0" }
|
|
|
|
vfs-notify = { path = "./crates/vfs-notify", version = "0.0.0" }
|
|
|
|
vfs = { path = "./crates/vfs", version = "0.0.0" }
|
2023-06-19 10:44:09 +00:00
|
|
|
|
2024-01-25 04:42:48 +00:00
|
|
|
ra-ap-rustc_lexer = { version = "0.33.0", default-features = false }
|
|
|
|
ra-ap-rustc_parse_format = { version = "0.33.0", default-features = false }
|
2024-01-25 04:44:13 +00:00
|
|
|
ra-ap-rustc_index = { version = "0.33.0", default-features = false }
|
|
|
|
ra-ap-rustc_abi = { version = "0.33.0", default-features = false }
|
2024-01-16 23:28:05 +00:00
|
|
|
ra-ap-rustc_pattern_analysis = { version = "0.33.0", default-features = false }
|
2024-01-08 14:24:46 +00:00
|
|
|
|
2023-07-02 09:06:20 +00:00
|
|
|
# local crates that aren't published to crates.io. These should not have versions.
|
2023-12-18 13:53:11 +00:00
|
|
|
sourcegen = { path = "./crates/sourcegen" }
|
|
|
|
test-fixture = { path = "./crates/test-fixture" }
|
|
|
|
test-utils = { path = "./crates/test-utils" }
|
2023-07-02 09:06:20 +00:00
|
|
|
|
2023-06-21 01:23:07 +00:00
|
|
|
# In-tree crates that are published separately and follow semver. See lib/README.md
|
2023-12-12 15:18:08 +00:00
|
|
|
line-index = { version = "0.1.1" }
|
2023-06-21 01:23:07 +00:00
|
|
|
la-arena = { version = "0.3.1" }
|
2024-01-01 13:06:56 +00:00
|
|
|
lsp-server = { version = "0.7.6" }
|
2023-03-25 13:43:08 +00:00
|
|
|
|
2023-02-14 16:01:01 +00:00
|
|
|
# non-local crates
|
2023-11-15 10:49:32 +00:00
|
|
|
anyhow = "1.0.75"
|
2023-12-20 11:53:46 +00:00
|
|
|
arrayvec = "0.7.4"
|
2023-11-15 19:20:47 +00:00
|
|
|
bitflags = "2.4.1"
|
2023-11-15 19:18:49 +00:00
|
|
|
cargo_metadata = "0.18.1"
|
2023-12-18 13:53:11 +00:00
|
|
|
command-group = "2.0.1"
|
|
|
|
crossbeam-channel = "0.5.8"
|
2023-11-15 11:34:56 +00:00
|
|
|
dissimilar = "1.0.7"
|
2023-11-15 11:07:36 +00:00
|
|
|
either = "1.9.0"
|
2023-12-18 13:53:11 +00:00
|
|
|
expect-test = "1.4.0"
|
2023-12-07 10:48:58 +00:00
|
|
|
hashbrown = { version = "0.14", features = [
|
2024-01-19 10:50:12 +00:00
|
|
|
"inline-more",
|
2023-12-07 10:48:58 +00:00
|
|
|
], default-features = false }
|
2023-11-15 11:21:34 +00:00
|
|
|
indexmap = "2.1.0"
|
2023-11-15 10:53:56 +00:00
|
|
|
itertools = "0.12.0"
|
2023-11-16 19:48:49 +00:00
|
|
|
libc = "0.2.150"
|
2023-12-07 09:57:51 +00:00
|
|
|
nohash-hasher = "0.2.0"
|
|
|
|
rayon = "1.8.0"
|
2024-01-18 02:27:38 +00:00
|
|
|
rust-analyzer-salsa = "0.17.0-pre.6"
|
2023-12-07 09:57:51 +00:00
|
|
|
rustc-hash = "1.1.0"
|
2023-12-19 11:53:10 +00:00
|
|
|
semver = "1.0.14"
|
2023-12-07 09:57:51 +00:00
|
|
|
serde = { version = "1.0.192", features = ["derive"] }
|
|
|
|
serde_json = "1.0.108"
|
2023-05-06 07:51:25 +00:00
|
|
|
smallvec = { version = "1.10.0", features = [
|
2024-01-19 10:50:12 +00:00
|
|
|
"const_new",
|
|
|
|
"union",
|
|
|
|
"const_generics",
|
2023-05-06 07:51:25 +00:00
|
|
|
] }
|
2024-01-16 10:07:45 +00:00
|
|
|
smol_str = "0.2.1"
|
2023-12-07 09:57:51 +00:00
|
|
|
text-size = "1.1.1"
|
2023-11-15 11:00:32 +00:00
|
|
|
tracing = "0.1.40"
|
2023-11-15 19:07:31 +00:00
|
|
|
tracing-tree = "0.3.0"
|
2023-11-15 11:04:39 +00:00
|
|
|
tracing-subscriber = { version = "0.3.18", default-features = false, features = [
|
2024-01-18 02:27:38 +00:00
|
|
|
"registry",
|
|
|
|
"fmt",
|
|
|
|
"tracing-log",
|
2023-11-15 11:04:39 +00:00
|
|
|
] }
|
2023-11-28 15:27:17 +00:00
|
|
|
triomphe = { version = "0.1.10", default-features = false, features = ["std"] }
|
2023-12-07 09:57:51 +00:00
|
|
|
xshell = "0.2.5"
|
|
|
|
|
2023-12-18 13:53:11 +00:00
|
|
|
|
2023-12-07 10:48:58 +00:00
|
|
|
# We need to freeze the version of the crate, as the raw-api feature is considered unstable
|
|
|
|
dashmap = { version = "=5.5.3", features = ["raw-api"] }
|
2023-12-29 14:22:29 +00:00
|
|
|
|
2024-01-19 10:50:12 +00:00
|
|
|
[workspace.lints.rust]
|
|
|
|
rust_2018_idioms = "warn"
|
|
|
|
unused_lifetimes = "warn"
|
|
|
|
semicolon_in_expressions_from_macros = "warn"
|
|
|
|
|
2023-12-29 14:22:29 +00:00
|
|
|
[workspace.lints.clippy]
|
2024-01-19 10:55:47 +00:00
|
|
|
# FIXME Remove the tidy test once the lint table is stable
|
2024-01-19 10:50:12 +00:00
|
|
|
|
2024-01-19 10:55:47 +00:00
|
|
|
## lint groups
|
2024-01-19 10:50:12 +00:00
|
|
|
complexity = { level = "warn", priority = -1 }
|
|
|
|
correctness = { level = "deny", priority = -1 }
|
|
|
|
perf = { level = "deny", priority = -1 }
|
|
|
|
restriction = { level = "allow", priority = -1 }
|
|
|
|
style = { level = "warn", priority = -1 }
|
|
|
|
suspicious = { level = "warn", priority = -1 }
|
|
|
|
|
2024-01-19 10:55:47 +00:00
|
|
|
## allow following lints
|
2024-01-19 10:50:12 +00:00
|
|
|
# () makes a fine error in most cases
|
|
|
|
result_unit_err = "allow"
|
|
|
|
# We don't expose public APIs that matter like this
|
|
|
|
len_without_is_empty = "allow"
|
|
|
|
# We have macros that rely on this currently
|
|
|
|
enum_variant_names = "allow"
|
|
|
|
# Builder pattern disagrees
|
|
|
|
new_ret_no_self = "allow"
|
|
|
|
|
2024-01-19 10:55:47 +00:00
|
|
|
## Following lints should be tackled at some point
|
|
|
|
borrowed_box = "allow"
|
|
|
|
borrow_deref_ref = "allow"
|
|
|
|
derivable_impls = "allow"
|
2024-01-19 12:06:08 +00:00
|
|
|
derived_hash_with_manual_eq = "allow"
|
2024-01-19 10:55:47 +00:00
|
|
|
field_reassign_with_default = "allow"
|
|
|
|
forget_non_drop = "allow"
|
|
|
|
format_collect = "allow"
|
|
|
|
large_enum_variant = "allow"
|
|
|
|
needless_doctest_main = "allow"
|
|
|
|
new_without_default = "allow"
|
2024-01-19 12:06:08 +00:00
|
|
|
non_canonical_clone_impl = "allow"
|
|
|
|
non_canonical_partial_ord_impl = "allow"
|
2024-01-19 10:55:47 +00:00
|
|
|
self_named_constructors = "allow"
|
2024-01-19 10:50:12 +00:00
|
|
|
too_many_arguments = "allow"
|
|
|
|
type_complexity = "allow"
|
2024-01-19 10:55:47 +00:00
|
|
|
useless_conversion = "allow"
|
|
|
|
useless_format = "allow"
|
|
|
|
wildcard_in_or_patterns = "allow"
|
|
|
|
wrong_self_convention = "allow"
|
|
|
|
|
|
|
|
## warn at following lints
|
2024-01-19 10:50:12 +00:00
|
|
|
dbg_macro = "warn"
|
|
|
|
todo = "warn"
|
2024-01-19 10:55:47 +00:00
|
|
|
unimplemented = "allow"
|
2024-01-19 10:50:12 +00:00
|
|
|
rc_buffer = "warn"
|
|
|
|
# FIXME enable this, we use this pattern a lot so its annoying work ...
|
|
|
|
# str_to_string = "warn"
|