Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Conversation

@matklad
Copy link
Contributor

@matklad matklad commented Jun 24, 2018

Hi!

This is a proof of concept for #225, which, at least in my experience, is a huge productivity boost.

The current implementation approach here risks summoning Zalgo, I'll look into using save analysis data to detect available test and Cargo metadata to find out the proper cargo comman-line for this. OTOH, even this simplistic approach covers 80% of use-cases, so I think merging this almost as is (with some regex tweaking) might be a good idea as well.

},
"engines": {
"vscode": "^1.22.0"
"vscode": "^1.24.0"
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 need this for the new tasks API. What vscode compatability strategy do we follow?

Copy link
Member

Choose a reason for hiding this comment

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

Latest stable and insiders only for now

@matklad
Copy link
Contributor Author

matklad commented Jun 24, 2018

Here's how the UX looks: https://youtu.be/Lntgjpk18sk

@matklad
Copy link
Contributor Author

matklad commented Jun 24, 2018

Apparently, the proper VS Code UI for this is code lens. Looking into implementing it!

@matklad
Copy link
Contributor Author

matklad commented Jun 25, 2018

Seems to work:

image

:)

@matklad
Copy link
Contributor Author

matklad commented Jun 26, 2018

Updated.

matklad added 2 commits June 27, 2018 12:45
It is used by the CodeLens feature to run the tests.
@matklad
Copy link
Contributor Author

matklad commented Jun 29, 2018

The RLS-side of this has been merged

@nrc nrc merged commit 14c73fd into rust-lang:master Jun 30, 2018
@nrc
Copy link
Member

nrc commented Jun 30, 2018

Thanks!

@sfackler
Copy link
Member

sfackler commented Jul 7, 2018

The "Run test" button things have appeared in vscode with the latest nightly, but they don't seem to do anything at all - no debug logs from rls at all. Is there any explicit configuration that's needed?

@matklad
Copy link
Contributor Author

matklad commented Jul 7, 2018

No, no config should be necessary. If you see the lens, that means that RLS side of things works, and the problem is within VS Code extension.

@matklad matklad deleted the run-test branch July 7, 2018 07:23
@matklad
Copy link
Contributor Author

matklad commented Jul 7, 2018

This only happens on vscode 1.25. Curiously, the build-in cargo build/cargo check tasks are also missing in this version.

@matklad
Copy link
Contributor Author

matklad commented Jul 7, 2018

Looks like microsoft/vscode#53673

@matklad
Copy link
Contributor Author

matklad commented Jul 7, 2018

Fixed by #361

@MajorBreakfast
Copy link

Whoa! This is great! I just saw the "Run test" button appear under one of my #[test] annotations. Thx! Brilliant idea 🎉👍👍

@matklad
Copy link
Contributor Author

matklad commented Jul 8, 2018

@MajorBreakfast thanks! Thers’s still a ton of work to do to make this work properly :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants