You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to open a discussion about an idea I've been mulling over regarding the Rust development experience, specifically focusing on the integration of incremental checking into cargo check and cargo clippy and the Rust Analyzer. This enhancement aims to tackle the delays that can sometimes occur when getting function recommendations in an IDE after saving changes to a file.
The Concept
Here's how I envision this working:
Global Cargo Check: This would remain as it currently is.
Incremental Check: In addition to the global check, there would be a mechanism that allows for an incremental check to run specifically on the file currently being edited. This check would be triggered before the global check is executed.
Threading Support: while the incremental check is running, a separate thread would handle running the global check in the background (This would cause a deadlock for a little while). The results from both checks would then be combined and replace the existing cached results.
Cache Mechanism: If the global check does not yield any new errors, warnings or indexed results since the last check, the current state and recommendations can simply be maintained. This caching approach would allow the user to receive relevant function suggestions without waiting for the entire global check to complete. I would add here that on initialization, the cache would have to be built every time you re-open the project.
Expected Benefits
The primary goal of this feature would be to enhance the overall user experience in the IDE by minimizing wait times when requesting code completions. Often, when I save a file and immediately press Ctrl + Space for suggestions, I find myself waiting for a while before I get them, which can disrupt the flow of development and lead to long wait times in large projects.
I imagine the immediate results would be:
Faster Recommendations: With access to cached results from previous checks, users would receive suggestions almost instantaneously, allowing for a smoother coding experience.
Improved Workflow: Developers can continue working in their IDE without interruption, while background processes handle more extensive project checks.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone,
I wanted to open a discussion about an idea I've been mulling over regarding the Rust development experience, specifically focusing on the integration of incremental checking into
cargo check
andcargo clippy
and the Rust Analyzer. This enhancement aims to tackle the delays that can sometimes occur when getting function recommendations in an IDE after saving changes to a file.The Concept
Here's how I envision this working:
Global Cargo Check: This would remain as it currently is.
Incremental Check: In addition to the global check, there would be a mechanism that allows for an incremental check to run specifically on the file currently being edited. This check would be triggered before the global check is executed.
Threading Support: while the incremental check is running, a separate thread would handle running the global check in the background (This would cause a deadlock for a little while). The results from both checks would then be combined and replace the existing cached results.
Cache Mechanism: If the global check does not yield any new errors, warnings or indexed results since the last check, the current state and recommendations can simply be maintained. This caching approach would allow the user to receive relevant function suggestions without waiting for the entire global check to complete. I would add here that on initialization, the cache would have to be built every time you re-open the project.
Expected Benefits
The primary goal of this feature would be to enhance the overall user experience in the IDE by minimizing wait times when requesting code completions. Often, when I save a file and immediately press Ctrl + Space for suggestions, I find myself waiting for a while before I get them, which can disrupt the flow of development and lead to long wait times in large projects.
I imagine the immediate results would be:
Looking forward to your feedback!
Beta Was this translation helpful? Give feedback.
All reactions