-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
feat(core): implement workspace plugin loading #5160
Conversation
d09de82
to
f52f06b
Compare
d01bdf7
to
0e97636
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.
I believe the LSP DX is missing. If the configuration has errors, we will notify the client with a message saying that only parsing will work until the configuration is fixed.
We should do the same if plugins couldn't be loaded or have errors. Ideally the message should be different, and mention that plugins are broken. Plus, we should print the diagnostics emitted by merge_with_configuration
in the LSP, possibly using the error!
tracing log.
crates/biome_cli/src/commands/mod.rs
Outdated
for diagnostic in result.diagnostics { | ||
console.log(markup! {{PrintDiagnostic::simple(&diagnostic)}}); | ||
} |
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.
Diagnostic errors should block the CLI. If a plugin is broken or can't be loaded, we risk running operations on files with something the user didn't want to. We already do this if the configuration has errors; we should do the same for plugins.
/// Normalizes the given `path` without requiring filesystem access. | ||
fn normalize_path(path: &Utf8Path) -> Utf8PathBuf { |
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.
The meaning of the term "normalize" varies greatly by context (normalize a path VS normalise a URL). We should document precisely what this normalisation does to the paths.
Thanks! If you don't mind I'll do the LSP DX in a separate PR, it sounds like that could be still a bit of work. |
CodSpeed Performance ReportMerging #5160 will not alter performanceComparing Summary
|
Summary
Implements the last remaining part of plugin loading for the 2.0 release: Most of it was already done, but plugins were not yet actually loaded by the workspace server. This is now done.
Test Plan
Test case added.