Skip to content

Restore lsp-rust-analyzer-cargo-all-targets #3974

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

Merged
merged 2 commits into from
Feb 26, 2023

Conversation

ia0
Copy link
Contributor

@ia0 ia0 commented Feb 25, 2023

This partially reverts #3893.

The rust-analyzer.checkOnSave.allTargets configuration still exists, although it is internally renamed by rust-analyzer to rust-analyzer.check.allTargets which is the new version. Maybe the intent was to remove lsp-rust-all-targets which is indeed unused by lsp-rust.

This partially reverts emacs-lsp#3893.

The rust-analyzer.checkOnSave.allTargets configuration still exists, although it
is internally renamed by rust-analyzer to rust-analyzer.check.allTargets which
is the new version. Maybe the intent was to remove lsp-rust-all-targets which is
indeed unused by lsp-rust.
@github-actions github-actions bot added client One or more of lsp-mode language clients rust labels Feb 25, 2023
@yyoncho yyoncho requested a review from brotzeit February 25, 2023 17:25
"Cargo watch all targets or not."
:type 'boolean
:group 'lsp-rust-analyzer
:package-version '(lsp-mode . "6.2.2"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version should be 8.0.2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if it's a revert? The flag only disappeared for a month or so.

If it counts as a new flag then I'd like to change the name to lsp-rust-analyzer-check-all-targets to match the new naming of rust-analyzer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it counts as a new flag then I'd like to change the name to lsp-rust-analyzer-check-all-targets to match the new naming of rust-analyzer.

Probably better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Done.

@brotzeit
Copy link
Member

Maybe the intent was to remove lsp-rust-all-targets which is indeed unused by lsp-rust.

I think yes, but it's possible that they changed the path and I didn't realize it https://github.com/rust-lang/rust-analyzer/blame/87d57f51bcf07eb364fcf835f9be987006158961/editors/code/package.json#L705

And then they changed it again rust-lang/rust-analyzer@d2bb62b#diff-00784dde03b1be151004f435a4ca74754cb674a9e789840e12760d8f3ac1728fR564

I currently don't use rust so this is really annoying. Hopefully they stop changing the paths all the time.

@@ -747,6 +753,7 @@ or JSON objects in `rust-project.json` format."
:checkOnSave (:enable ,(lsp-json-bool lsp-rust-analyzer-cargo-watch-enable)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

although it is internally renamed by rust-analyzer to rust-analyzer.check.allTargets which is the new version

So we also have to replace checkonsave with check right ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But keep this line for rust-analyzer.checkOnSave

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to rename checkOnSave (just yet), they do the renaming internally currently (for backward compatibility). However, eventually we probably want to go over all flags and try to follow the newest convention.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, so it's probably the best solution to wait until they are happy and stop changing it =)

@ia0
Copy link
Contributor Author

ia0 commented Feb 25, 2023

I currently don't use rust so this is really annoying. Hopefully they stop changing the paths all the time.

Yes, I didn't follow all the reasoning behind those renamings, but I know it generated quite some discussions on their side.

I might get some time starting from April to try to go over all flags in lsp-rust if that would be something useful to do.

@ia0 ia0 force-pushed the restore-check-all-targets branch from fb54638 to f8fc437 Compare February 25, 2023 19:26
@brotzeit
Copy link
Member

brotzeit commented Feb 25, 2023

I might get some time starting from April to try to go over all flags in lsp-rust if that would be something useful to do.

Sure, thanks! rls was also deprecated a few months ago so it probably makes sense to remove the rls related code completely ?

@yyoncho
Copy link
Member

yyoncho commented Feb 25, 2023

I might get some time starting from April to try to go over all flags in lsp-rust if that would be something useful to do.

Sure, thanks! rls was also deprecated a few months ago so it probably makes sense to remove the rls related code completely ?

I think we can move rls in lsp-rls.el and not load it by default.

@brotzeit brotzeit merged commit b45dea4 into emacs-lsp:master Feb 26, 2023
@ia0 ia0 deleted the restore-check-all-targets branch April 22, 2023 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client One or more of lsp-mode language clients rust
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants