st0012 / ruby-lsp-rspec

A Ruby LSP addon for RSpec tests
MIT License
127 stars 7 forks source link

Is there any way to use this without modifying project's Gemfile? #32

Closed r7kamura closed 5 months ago

r7kamura commented 5 months ago

I find ruby-lsp-rspec very useful for me. But unlike ruby-lsp-rails, this plugin requires modifications to the project's Gemfile, which makes it difficult to use outside of my personal projects.

So, are you going to provide a way to use this without modifying the project's Gemfile? For example, it could be possible to have this recognized as an official plugin for ruby-lsp, so that when rspec is detected, this plugin is also installed automatically.

st0012 commented 5 months ago

Thank you for the kind words!

For example, it could be possible to have this recognized as an official plugin for ruby-lsp, so that when rspec is detected, this plugin is also installed automatically.

As the author of this addon AND a maintainer of ruby-lsp itself, I don't feel comfortable proposing making my own project "official". However, you can definitely open an issue there to make that case, especially if you can find some statistics to prove that it'll benefit a big portion of the community 🙂

r7kamura commented 5 months ago

I see. Indeed, there are aspects that are opinionated whether or not to even use RSpec as a testing library, and there are some difficulties in providing a plugin for RSpec as an official one for ruby-lsp. I agree with that decision.

My concern in creating this Issue was the following point: Since ruby-lsp now uses the .ruby-lsp/Gemfile that is automatically generated by default, I believe that not only this plugin, but also other unofficial plugins will have the same installation problems. So I was wondering how everyone else has solved this problem, or if there is a solution that only those in the know know would know.

Anyway, thank you very much for your kind attention. I will try to find some solution 👍

st0012 commented 5 months ago

The main challenge is that, by automatically installing any addon, ruby-lsp will ultimately be responsible for any issues the addons create. For example, what if one of them fell into the hands of attackers and became malicious? A solution may be to allow addons be configured from the VS Code extension so users can modify settings instead of Gemfile. But some users may still find it hard to add VS Code specific settings to the project...etc.

MaicolBen commented 1 month ago

If I include this gem in my Gemfile, now I have 2 definitions on everything, how do people solve this? Or am I the only one?