-
Notifications
You must be signed in to change notification settings - Fork 153
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
Too many code lens options for running tests #2167
Comments
I'm going to move this to the ruby-lsp repo for discussion, since this isn't specific to the Rails addon. |
I actually really like 5, its how I use this exclusively. I guess I would use something else if it wasn't available but it is what I reach for first. |
FWIW, there's a similar request in I personally also use 5 most of the time, and IMO removing it will be a major breaking change that I strongly against. I think it's ok to make it opt-out-able though. |
We decided to not take any actions for now because:
|
@st0012 All of that sounds reasonable. Perhaps it'll be made optional in the future, when there is better support in VS Code and other editors. Other languagesIn the python issue below there is a screenshot purportedly showing a way to hide 5. I've looked around to find the original issue and reasoning, but it points to an internal issue tracker. For what it's worth, the Microsoft VS Code team thought it was a good idea to rely only on the gutter (4), and skip code lens for tests (5). I think this is the commits removing it: microsoft/vscode-python#16200 LinksFor future reference, here are some similar requests for other languages. In case anyone want to open an issue upstream. |
In case anyone else ends up here googling for a way to disable these popups for ruby-lsp, as they are very annoying when editing large spec files, here is the setting to disable: "rubyLsp.enabledFeatures": {
"codeLens": false, I'm not sure what else codeLens provides, but so far navigation / indexing all still work with ruby-lsp, and I never run things via vscode currently. So this works for me so far. edit after 5 minutes 😏 : codeLens provides all the line by line git info in VSCode, so it turns out this is not a great workaround. Could this issue be reopened to provide more granular control around this? |
Currently the test explorer functionality is entirely backed by code lens. The only way to have more granular control is to rethink how we're discovering tests and completely uncoupled the two. It's also an opportunity for us to experiment with surfacing all tests in the codebase, which we didn't try initially because of performance reasons. Another facet of this problem is that the Ruby LSP supports multiple test frameworks, both with internal integrations (Minitest and Test Unit) and through add-ons (RSpec). The solution has to be general to work for any test framework, decouple test discovery from code lens while at the same allowing code lens to be shown and be performant enough to avoid any slow downs in the editor - both during boot (in case the solution involves indexing) and regular operations. We do want to revisit all of this at some point, but it's a considerable amount of effort that we cannot prioritize right now. |
@vinistock Understandable! But would it make sense to keep it open? People are bound to google this, and you don't have to commit to it just because the issue if left open. |
The code lens feature to run tests is great! 🎉
But right now, there are triggers everywhere:
To be fair, 1-2 are different, but 3-5 are the same thing.
I find 5 quite annoying, because it makes the test file hard to read and difficult to work with visually (moving blocks of code around, quickly scanning code, etc), with every few lines being broken with this magic extra line, with controls.
Obviously subjective, but since 4 is just a few pixels away and 3 also easy to reach, I prefer both of them to 5.
Two suggestions (either would work)
A. Remove 5, and let people use 3 or 4 to run a test.
B. Make it configurable to remove/hide 5.
The text was updated successfully, but these errors were encountered: