-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Separate red_knot
into CLI and red_knot_workspace
crates
#12623
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
We may want to move the watch/*
modules into the CLI but we can wait with doing that until we know what file watching strategy to use in the LSP. I learned that typescrit now uses the VS code watcher:
15db000
to
b046757
Compare
becc5d7
to
c61fd84
Compare
Summary
This PR separates the current
red_knot
crate into two crates:red_knot
- This will be similar to theruff
crate, it'll act as the CLI cratered_knot_workspace
- This includes everything except for the CLI functionality from the existingred_knot
crateNote that the code related to the file watcher is in
red_knot_workspace
for now but might be required to extract it out in the future.The main motivation for this change is so that we can have a
red_knot server
command. This makes it easier to test the server out without making any changes in the VS Code extension. All we need is to specify thered_knot
executable path inruff.path
extension setting.Question: Currently, the integration tests are still kept in thered_knot
crate but I'm happy to move them into thered_knot_workspace
crate if that's a better place for them to be in.Test Plan
cargo build
cargo clippy --workspace --all-targets --all-features
cargo shear --fix