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

Doesn't work when the ruby project is in a subfolder of the main project #3

Closed
fazo96 opened this issue Oct 26, 2023 · 2 comments · Fixed by #5
Closed

Doesn't work when the ruby project is in a subfolder of the main project #3

fazo96 opened this issue Oct 26, 2023 · 2 comments · Fixed by #5

Comments

@fazo96
Copy link

fazo96 commented Oct 26, 2023

This notification appears when I try using the plugin: Sorbet: Sorbet's language server requires a single input directory. However, 0 are configured: []

Taking a look at the code of the extension, it seems that it will run srb tc --lsp on the root directory of the RubyMine project.

In my case unfortunately the ruby project is in a subfolder called backend of the main project. I was able to work around this by creating a sorbet config file for the root folder of the project, and it seems to work, but it's not ideal

Would it be possible to expose an option for this plugin to run in a subfolder?

@fazo96 fazo96 changed the title Error: Sorbet's language server requires a single input directory. Doesn't work when the ruby project is in a subfolder of the main project Oct 26, 2023
@simoleone
Copy link
Owner

Hey! I'll look into it! I'd like to have the plugin "just work" for the most common cases, and it's probably not that unusual to have in a subdirectory like you're describing. Just to check - the subdirectory in this case is showing up as a ruby project/module/whatever already, as in IntelliJ or RubyMine has already figured out that it's a separate ruby project root?

@simoleone simoleone linked a pull request Dec 10, 2023 that will close this issue
@simoleone
Copy link
Owner

Hey @fazo96 ! I finally got a chance to look at this. Instead of using the project root we'll use the directory we found the module's Gemfile in. At least this worked for a dummy project I mocked up to try it out.

I just pushed version 1.6 of the plugin with this fix in it. It'll appear as an update as soon as Jetbrains approves it. Let me know if it works for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants