-
Notifications
You must be signed in to change notification settings - Fork 492
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
LS: Refactor DiagnosticsController
#6657
base: spr/main/bd1161e7
Are you sure you want to change the base?
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.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Arcticae, @Draggu, and @orizi)
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.
Reviewed 1 of 3 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Draggu and @orizi)
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.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Draggu and @orizi)
040b5e4
to
77e2b06
Compare
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.
Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @mkaput and @orizi)
crates/cairo-lang-language-server/src/lang/diagnostics/mod.rs
line 32 at r2 (raw file):
// Otherwise, the controller thread will never be requested to stop, and the controller's // JoinHandle will never terminate. trigger: trigger::Sender<StateSnapshot>,
How do you plan making multiple snapshots from this? salsa
snapshot is !Clone
and can only be made from db itself, not another snapshot, as so we must prepare N
snapshots on LS main thread so we can distribute them here.
77e2b06
to
b2b3f05
Compare
b6aab86
to
8cc5212
Compare
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.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @Draggu, @orizi, and @piotmag769)
crates/cairo-lang-language-server/src/lang/diagnostics/mod.rs
line 32 at r2 (raw file):
Previously, Draggu (Piotr Figiela) wrote…
How do you plan making multiple snapshots from this?
salsa
snapshot is!Clone
and can only be made from db itself, not another snapshot, as so we must prepareN
snapshots on LS main thread so we can distribute them here.
See how I did it in #6658
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.
Reviewable status: 2 of 3 files reviewed, all discussions resolved (waiting on @orizi and @piotmag769)
crates/cairo-lang-language-server/src/lang/diagnostics/mod.rs
line 32 at r2 (raw file):
Previously, mkaput (Marek Kaput) wrote…
See how I did it in #6658
Ok, I see, description is confusing.
-- commits
line 9 at r3:
If you are doing this in next PR please move it to mentioned PR.
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.
Reviewable status: 2 of 3 files reviewed, all discussions resolved (waiting on @orizi and @piotmag769)
Previously, Draggu (Piotr Figiela) wrote…
If you are doing this in next PR please move it to mentioned PR.
you mean moving the description?
i changed signature here because it breaks diff for next PR (marks too much code as diffing)
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.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @mkaput, @orizi, and @piotmag769)
you mean moving the description?
Yes, it states that making N
snapshots is done here while it is not.
This commit prepares `DiagnosticsController` for adding multithreaded processing. 1. `DiagnosticsController::refresh` takes shared reference to owned state and makes snapshots internally. It needs it to create `N` snapshots for many threads. 2. Encapsulated controller thread state into a struct. 3. `Notifier` and `file_diagnostics` are now stored in controller's state instead of being passed around. 4. Some minor renames and doc rewordings. commit-id:b9bb403e
b2b3f05
to
91e9c50
Compare
8cc5212
to
68c662d
Compare
This commit prepares
DiagnosticsController
for adding multithreaded processing.
DiagnosticsController::refresh
takes shared reference to ownedstate and makes snapshots internally. It needs it to create
N
snapshots for many threads.
Notifier
andfile_diagnostics
are now stored in controller'sstate instead of being passed around.
Stack:
DiagnosticsController
#6657 ⬅