## Summary This PR adds a new `user_configuration_directory` method to `System`. We need it to resolve where to lookup a user-level `knot.toml` configuration file. The method belongs to `System` because not all platforms have a convention of where to store such configuration files (e.g. wasm). I refactored `TestSystem` to be a simple wrapper around an `Arc<dyn System...>` and use the `System.as_any` method instead to cast it down to an `InMemory` system. I also removed some `System` specific methods from `InMemoryFileSystem`, they don't belong there. This PR removes the `os` feature as a default feature from `ruff_db`. Most crates depending on `ruff_db` don't need it because they only depend on `System` or only depend on `os` for testing. This was necessary to fix a compile error with `red_knot_wasm` ## Test Plan I'll make use of the method in my next PR. So I guess we won't know if it works before then but I copied the code from Ruff/uv, so I have high confidence that it is correct. `cargo test`
64 lines
1.8 KiB
TOML
64 lines
1.8 KiB
TOML
[package]
|
|
name = "red_knot_python_semantic"
|
|
version = "0.0.0"
|
|
publish = false
|
|
authors = { workspace = true }
|
|
edition = { workspace = true }
|
|
rust-version = { workspace = true }
|
|
homepage = { workspace = true }
|
|
documentation = { workspace = true }
|
|
repository = { workspace = true }
|
|
license = { workspace = true }
|
|
|
|
[dependencies]
|
|
ruff_db = { workspace = true }
|
|
ruff_index = { workspace = true }
|
|
ruff_macros = { workspace = true }
|
|
ruff_python_ast = { workspace = true }
|
|
ruff_python_parser = { workspace = true }
|
|
ruff_python_stdlib = { workspace = true }
|
|
ruff_source_file = { workspace = true }
|
|
ruff_text_size = { workspace = true }
|
|
ruff_python_literal = { workspace = true }
|
|
ruff_python_trivia = { workspace = true }
|
|
|
|
anyhow = { workspace = true }
|
|
bitflags = { workspace = true }
|
|
camino = { workspace = true }
|
|
compact_str = { workspace = true }
|
|
countme = { workspace = true }
|
|
drop_bomb = { workspace = true }
|
|
indexmap = { workspace = true }
|
|
itertools = { workspace = true }
|
|
ordermap = { workspace = true }
|
|
salsa = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
tracing = { workspace = true }
|
|
rustc-hash = { workspace = true }
|
|
hashbrown = { workspace = true }
|
|
schemars = { workspace = true, optional = true }
|
|
serde = { workspace = true, optional = true }
|
|
smallvec = { workspace = true }
|
|
static_assertions = { workspace = true }
|
|
test-case = { workspace = true }
|
|
memchr = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
ruff_db = { workspace = true, features = ["testing"] }
|
|
ruff_python_parser = { workspace = true }
|
|
red_knot_test = { workspace = true }
|
|
red_knot_vendored = { workspace = true }
|
|
|
|
anyhow = { workspace = true }
|
|
dir-test = { workspace = true }
|
|
insta = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
quickcheck = { version = "1.0.3", default-features = false }
|
|
quickcheck_macros = { version = "1.0.0" }
|
|
|
|
[features]
|
|
serde = ["ruff_db/serde", "dep:serde"]
|
|
|
|
[lints]
|
|
workspace = true
|