Skip to content
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

Tracking issue fo RFC2912, transition to rust-analyzer as our official LSP #4224

Closed
3 of 7 tasks
matklad opened this issue Apr 30, 2020 · 33 comments
Closed
3 of 7 tasks
Assignees
Labels
S-unactionable Issue requires feedback, design decisions or is blocked on other work

Comments

@matklad
Copy link
Member

matklad commented Apr 30, 2020

Issues blocking providing rust-analyzer as an alternative
  • rust-analyzer should mostly conform to LSP protocol
    • specifically replace adHoc "rust-analyzer.applySourceChange" with less adHoc SnippetTextEdit
  • rust-analyzer should be packaged with rustup
  • rust-lang.rust extension should work with both rust-analyzer and rls
Issues blocking switching to rust-analyzer as the main implementation
  • rust-analyzer should fully conform to LSP protocol
Issues under discussion
  • on the fly checking
  • RAM usage
  • startup time
@eminence
Copy link
Contributor

Could someone briefly describe how RLS does on-the-fly checking? I know that rust-analyzer on-the-fly checking will be implemented in its own way, but knowing how RLS does it I think could be some useful background knowledge for this thread.

@bjorn3
Copy link
Member

bjorn3 commented Apr 30, 2020

RLS acts as a custom rustc driver and uses an internal compiler api (FileLoader) to provide sources directly to the parser without reading from the disk. The main problem with this, it that it is tied to a specific rustc version.

@puremourning

This comment has been minimized.

@bstaletic

This comment has been minimized.

@matklad

This comment has been minimized.

@bstaletic

This comment has been minimized.

@matklad

This comment has been minimized.

@puremourning

This comment has been minimized.

@Xanewok
Copy link
Member

Xanewok commented May 12, 2020

We can somewhat tick the blocking issue box:

rust-lang.rust extension should work with both rust-analyzer and rls

Implementation

Also posted it in the RFC thread: rust-lang/rfcs#2912 (comment)

It doesn't provide exact feature parity since it doesn't work yet with messages such as rust-analyzer.applySourceChange and other custom extensions that are not LSP-proposed.

@matklad
Copy link
Member Author

matklad commented May 18, 2020

#4494 implements code action snippet capability.

@matklad
Copy link
Member Author

matklad commented May 21, 2020

I've transitioned all code actions to use progressive enhancement, so code actions in next release should just work with any any editor which implements codeActionLiteralSupport. We do not implement command-based actions, as those require custom client-side plumbing or round-about workspace/applyEdit. This is conforming to the protocol (we just don't emit code actions without codeActionLiteralSupport) and i think should be fine in practice: if client supports workspace/applyEdit, it shouldnt't be problematic to support suppling edit directly with code-actions. I'll mark some comments in this thread as resolved.

I've also started documenting all our protocol extensions in this document.

At this point, although we are not fully confirming to the protocol yet, I believe we've solved all major practical conformance issues.

@matklad

This comment has been minimized.

@hannobraun

This comment has been minimized.

@matklad

This comment has been minimized.

@hannobraun

This comment has been minimized.

@mati865

This comment has been minimized.

hannobraun added a commit to hannobraun/inotify-rs that referenced this issue Jun 5, 2020
`inotify_init1` is not available in older versions of glibc. See[1] and
the related discussion for details.

[1] rust-lang/rust-analyzer#4224 (comment)
hannobraun added a commit to hannobraun/inotify-rs that referenced this issue Jun 5, 2020
`inotify_init1` is not available in older versions of glibc. See[1] and
the related discussion for details.

[1] rust-lang/rust-analyzer#4224 (comment)
@hannobraun
Copy link

I've made the change and released versions 0.8.3 and 0.7.1. Please let me know if it helps.

matklad added a commit to matklad/rust-analyzer that referenced this issue Jun 5, 2020
@matklad matklad mentioned this issue Jun 5, 2020
bors bot added a commit that referenced this issue Jun 5, 2020
4757: Update inotify r=matklad a=matklad

#4224 (comment)



bors r+
🤖

Co-authored-by: Aleksey Kladov <[email protected]>
@matklad
Copy link
Member Author

matklad commented Jun 6, 2020

That worked, thanks @hannobraun !

@matklad
Copy link
Member Author

matklad commented Jul 8, 2020

Current status:

15:04:42|~/projects/rust-analyzer/editors/code|master✓
λ rustup component add --toolchain nightly rust-analyzer-preview
info: component 'rust-analyzer-preview' for target 'x86_64-unknown-linux-gnu' is up to date

15:04:46|~/projects/rust-analyzer/editors/code|master✓
λ rustup run nightly rust-analyzer --version
rust-analyzer f5a4a4b

@tesuji

This comment has been minimized.

@matklad

This comment has been minimized.

@tesuji
Copy link

tesuji commented Jul 8, 2020

Also one could create a symlink for convenient reasons:

ln -s $(rustup which rust-analyzer ) ~/.local/bin/rust-analyzer

@lnicola
Copy link
Member

lnicola commented Jul 8, 2020

Should rustup have a rust-analyzer shim?

@matklad
Copy link
Member Author

matklad commented Jul 8, 2020

@lnicola I think we need to add something else for that.

I've opened rust-lang/vscode-rust#812 for the last bit we need to fix before we can start the "feedback govering" phase properly.

@llucax
Copy link

llucax commented Jan 6, 2021

Hi, on major blocker for me to adopting rust-analyzer (as a CoC plugin in (neo)vim) is the inability to update errors on the fly. This is already listed here but I didn't see any links to specific issues. Searching I found #6591, which looks like it is requesting the same. If this is correct, maybe it would be useful to link it in the TODO item in the issue description, so other people that want to monitor particular items on the TODO list can subscribe to the specific issues.

@lnicola lnicola added the S-unactionable Issue requires feedback, design decisions or is blocked on other work label Jan 22, 2021
@matklad matklad mentioned this issue Apr 12, 2021
5 tasks
@cuviper

This comment has been minimized.

@puremourning

This comment has been minimized.

@matklad

This comment has been minimized.

@matklad
Copy link
Member Author

matklad commented Sep 28, 2021

Note that the real blocker today is non-technical. We need to move rust-analyzer over to rust-lang project before it can be made official. We are slowly but steadily doing that with the rust-lang core team.

@cuviper

This comment has been minimized.

@Xanewok
Copy link
Member

Xanewok commented Mar 7, 2022

Since https://blog.rust-lang.org/2022/02/21/rust-analyzer-joins-rust-org.html has been announced and it seems that Rust Analyzer has joined the Rust org (does it mean that the repository will move?), I'd gladly move or replace the code for the current VSCode extension with the Rust Analyzer VSCode extension (maybe with an added option to run RLS if already installed by rustup) to quickly move things forward.

To give some more context from my side: I've obviously dropped the ball with the migration tracked at rust-lang/vscode-rust#812. I was and am still struggling with mental health issues and it became apparent that I cannot keep up with my existing open source obligations (at least I viewed them as such) and couldn't maintain the outlined pace of work nor even communicate that properly. I'm really sorry for that.

I'm very happy that the Rust IDE story is getting better and better with every week and I'll happily coordinate with adding new maintainers to the official Rust VSCode extension and with any work required to make the switch (should I CC any specific RA team?). Thanks for all your hard work on the Rust Analyzer and other IDE-related bits!

@digitarald
Copy link

I work on VS Code and a few team members also noted how much better Rust editing is with rust-analyzer. I dug deeper as VS Code had a built-in recommendation for the rust-lang extension and found this issue.

As one fix the upcoming VS Code 1.66 will start recommending rust-analyzer. Until the extensions are unified this seems the best experience for users. Feel free to contact me if you need help with the transitioning in VS Code or Marketplace.

bradjc added a commit to tock/tock that referenced this issue Mar 22, 2022
Rust is switching to rust-analyzer and deprecating rls
(rust-lang/rust-analyzer#4224). On Feb 23,
2022, rls broke on nightly, and a month later it was still not fixed
(rust-lang/rust#94284). It seems there is no
longer interest in RLS, so we drop support for it so we can continue to
update nightlies.
lschuermann pushed a commit to tock/tock that referenced this issue May 6, 2022
Rust is switching to rust-analyzer and deprecating rls
(rust-lang/rust-analyzer#4224). On Feb 23,
2022, rls broke on nightly, and a month later it was still not fixed
(rust-lang/rust#94284). It seems there is no
longer interest in RLS, so we drop support for it so we can continue to
update nightlies.
@Veykril Veykril self-assigned this Aug 29, 2022
@Veykril
Copy link
Member

Veykril commented Aug 29, 2022

As rust-analyzer has transitioned to the rust-lang org we can close this issue 🎉

There was a slight change of plans regarding the VSCode extensions, as instead of merging the two VSCode extensions as described in rust-lang/vscode-rust#812, https://github.com/rust-lang/vscode-rust is now being deprecated in favor of the rust-analyzer vscode extension which also has now moved publisher to rust-lang on the marketplace. Likewise RLS is being sunset rust-lang/rust#100863 now, although that was outlined in the RFC anyways.

@Veykril Veykril closed this as completed Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-unactionable Issue requires feedback, design decisions or is blocked on other work
Projects
None yet
Development

No branches or pull requests