Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kick off Red-knot #10849

Merged
merged 59 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
2bfbb59
Exploration of a salsa like compilation model (does not compile)
MichaReiser Apr 9, 2024
1be5cbc
Use Salsa, do some syntax and physical line checking
MichaReiser Apr 10, 2024
eb71fe5
Rewrite `AstNodeIds` to use `NodeKey`
MichaReiser Apr 10, 2024
19999b4
add a couple simple tests for Files
carljm Apr 11, 2024
51e0f03
Don't use Files::intern in Database
MichaReiser Apr 11, 2024
2afc455
Use pre-computed hash
MichaReiser Apr 11, 2024
ca1cf13
Add AstIds to Salsa DB and add logic for resolving NodeKey's
MichaReiser Apr 11, 2024
489a09e
Extract AstIds into its own module
MichaReiser Apr 11, 2024
94aa9f0
Introduce HasAstId trait
MichaReiser Apr 11, 2024
bd4535e
Type AstId, a partial HIR
MichaReiser Apr 11, 2024
b37b6a9
Add StatementRef and example how to query a function definition
MichaReiser Apr 11, 2024
39352e7
remove obsolete TODO
carljm Apr 12, 2024
8fa2a5c
Use official salsa repository instead of a fork
MichaReiser Apr 12, 2024
a8c9184
'Improve' NodeKey and AstId naming
MichaReiser Apr 12, 2024
b980c22
A basic definition lowering
MichaReiser Apr 12, 2024
102d26f
Remove debug assertion because it results in test failures
MichaReiser Apr 12, 2024
4486ff5
Start module resolver
MichaReiser Apr 17, 2024
ed5066d
add bare-bones SymbolTable representation
carljm Apr 18, 2024
e186f8f
Add tests to module resolver, add support for symlinks
MichaReiser Apr 18, 2024
e37e96f
Clippy
MichaReiser Apr 18, 2024
9d0fdc3
Use Files in 'ModulesResolver'
MichaReiser Apr 18, 2024
fb23bf8
Use `DashMap` and `Arc` for better API
MichaReiser Apr 18, 2024
6811bb0
no Default for SymbolTable
carljm Apr 18, 2024
5780c5a
use SmolStr for names instead of String
carljm Apr 18, 2024
8674874
make module tests pass when TMPDIR is symlink
carljm Apr 19, 2024
64217bc
build basic symbol tables from AST
carljm Apr 19, 2024
97d8398
Address module feedback, support namespace and regular packages
MichaReiser Apr 19, 2024
2bf2ced
move child scopes off of symbols
carljm Apr 19, 2024
53371e6
better SymbolIterator
carljm Apr 19, 2024
f5cbc89
clippy-clean on symbols.rs
carljm Apr 19, 2024
7cb5b0f
add imports to symbol table
carljm Apr 19, 2024
876e3a8
support PEP 695 generics in symbol table
carljm Apr 19, 2024
27d1611
clean up unused imports in symbols.rs
carljm Apr 19, 2024
c749bca
Track definitions of symbols
carljm Apr 22, 2024
ac9b322
Failing test for resolving import cross-module
carljm Apr 22, 2024
8f2f738
Remove salsa, introduce Db trait
MichaReiser Apr 22, 2024
7b411a5
Salsa like Database
MichaReiser Apr 22, 2024
acdec51
clean up some clippy in symbols.rs
carljm Apr 22, 2024
d190c6f
Fix more clippy lints, allow pedantic
MichaReiser Apr 22, 2024
2d0f81f
a bit more on analyze_imports
carljm Apr 22, 2024
d3ccb4d
clean up symbol table API a bit
carljm Apr 22, 2024
e5e0832
remove analyze_imports
carljm Apr 22, 2024
c9f3929
initial type environment
carljm Apr 23, 2024
ebcd5df
Caching cleanups
MichaReiser Apr 23, 2024
b19cb89
Remove unused dependencies
MichaReiser Apr 23, 2024
0444ef1
[red-knot] Adjust node sizes test so red-knot can pass CI (#11110)
carljm Apr 23, 2024
274519f
review comments on initial type env (#11113)
carljm Apr 23, 2024
6240613
[red-knot] re-organize code in symbols.rs (#11116)
carljm Apr 23, 2024
7f7c2e0
Store symbol definitions using NodeKey (#11121)
carljm Apr 24, 2024
163b261
red-knot: Add tracing (#11130)
MichaReiser Apr 24, 2024
ee0f174
[red-knot] remove layer of indirection from SymbolTable (#11132)
carljm Apr 24, 2024
bedee31
red-knot: Cache symbol tables (#11106)
MichaReiser Apr 24, 2024
14b089f
Red knot: Add file watching and cancellation (#11127)
MichaReiser Apr 25, 2024
9beb681
[red-knot] add more types (#11135)
carljm Apr 25, 2024
27e68ad
[red-knot] per-module arenas (#11152)
carljm Apr 26, 2024
8554cf3
[red-knot] implement eval_symbol for from-import and class-def (#11157)
carljm Apr 26, 2024
4d7d3b2
[red-knot] Remove support for resolving modules by package directory …
MichaReiser Apr 27, 2024
d3620e4
Change ImportDefinition level to `u32`
MichaReiser Apr 27, 2024
dd4748b
Enable pedantic lints and fix violations
MichaReiser Apr 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 135 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ console_log = { version = "1.0.0" }
countme = { version = "3.0.1" }
criterion = { version = "0.5.1", default-features = false }
crossbeam-channel = { version = "0.5.12" }
dashmap = { version = "5.5.3" }
dirs = { version = "5.0.0" }
drop_bomb = { version = "0.1.5" }
env_logger = { version = "0.11.0" }
Expand All @@ -39,10 +40,12 @@ filetime = { version = "0.2.23" }
fs-err = { version = "2.11.0" }
glob = { version = "0.3.1" }
globset = { version = "0.4.14" }
hashbrown = "0.14.3"
hexf-parse = { version = "0.2.1" }
ignore = { version = "0.4.22" }
imara-diff = { version = "0.1.5" }
imperative = { version = "1.0.4" }
indexmap = { version = "2.2.6" }
indicatif = { version = "0.17.8" }
indoc = { version = "2.0.4" }
insta = { version = "1.35.1", feature = ["filters", "glob"] }
Expand All @@ -68,6 +71,7 @@ once_cell = { version = "1.19.0" }
path-absolutize = { version = "3.1.1" }
path-slash = { version = "0.2.1" }
pathdiff = { version = "0.2.1" }
parking_lot = "0.12.1"
pep440_rs = { version = "0.6.0", features = ["serde"] }
pretty_assertions = "1.3.0"
proc-macro2 = { version = "1.0.79" }
Expand Down
45 changes: 45 additions & 0 deletions crates/red_knot/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[package]
name = "red_knot"
version = "0.1.0"
edition.workspace = true
rust-version.workspace = true
homepage.workspace = true
documentation.workspace = true
repository.workspace = true
authors.workspace = true
license.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
ruff_python_parser = { path = "../ruff_python_parser" }
ruff_python_ast = { path = "../ruff_python_ast" }
ruff_python_trivia = { path = "../ruff_python_trivia" }
ruff_text_size = { path = "../ruff_text_size" }
ruff_index = { path = "../ruff_index" }
ruff_notebook = { path = "../ruff_notebook" }

anyhow = { workspace = true }
bitflags = { workspace = true }
ctrlc = "3.4.4"
crossbeam-channel = { workspace = true }
dashmap = { workspace = true }
hashbrown = { workspace = true }
indexmap = { workspace = true }
log = { workspace = true }
notify = { workspace = true }
parking_lot = { workspace = true }
rayon = { workspace = true }
rustc-hash = { workspace = true }
smallvec = { workspace = true }
smol_str = "0.2.1"
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
tracing-tree = { workspace = true }

[dev-dependencies]
textwrap = "0.16.1"
tempfile = { workspace = true }

[lints]
workspace = true
Loading
Loading