-
Notifications
You must be signed in to change notification settings - Fork 172
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
FIX: make sure to specify sorbet-runtime version #1027
FIX: make sure to specify sorbet-runtime version #1027
Conversation
f9e91ec
to
f2112c3
Compare
f2112c3
to
8fe6190
Compare
ruby-lsp.gemspec
Outdated
@@ -18,7 +18,7 @@ Gem::Specification.new do |s| | |||
s.require_paths = ["lib"] | |||
|
|||
s.add_dependency("language_server-protocol", "~> 3.17.0") | |||
s.add_dependency("sorbet-runtime") | |||
s.add_dependency("sorbet-runtime", "~> 0.5.11026") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about going this route and if we did, we'd have to specify a minimum version (>)
and we'd have to find an earlier version that fixed this change. I took a quick look through issues on Sorbet repo but nothing jumped out.
Also you were using sorbet-runtime of 3 and a half years ago so a minimum version can possibly cause more annoyance to users than good. I assume not many people will run into this problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, we should, at worst, have a minimum version as @KaanOzkan states above, but one that is not super recent so that folks are inconvenienced by it.
We definitely don't want to lock the LSP into a specific I don't fully understand the issue. Why would an old The |
The last |
older versions, e.g 0.5.5510 result in "Server initialization failed" error Refs: https://github.com/Shopify/vscode-ruby-lsp/issues/778
8fe6190
to
635a122
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still unsure as to why the bug happens, but given that version 0.5.5685
is quite old, I think we can move forward
@@ -3,7 +3,7 @@ PATH | |||
specs: | |||
ruby-lsp (0.11.0) | |||
language_server-protocol (~> 3.17.0) | |||
sorbet-runtime | |||
sorbet-runtime (>= 0.5.5685) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for reference: https://rubygems.org/gems/sorbet-runtime/versions/0.5.5685
Motivation
I ran into an issue when older version of sorbet-runtime in my project's Gemfile.lock caused an error described here
Implementation
The error stack trace pointed to sorbet-runtime
Automated Tests
I believe there are no tests covering this
Manual Tests
You should have a Gemfile.lock with older sorbet-runtime version specified. In my case it was
0.5.5510
. Manually upgrading it to0.5.11010
solved the issue for me. I see multiple versions specified in your Gemfile.lock, so this commit upgrades it to the latest one specified