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

[Tapioca Add-on] Use gradual rollout API #2083

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ gem "irb"
gem "rubocop-shopify"
gem "rubocop-sorbet", ">= 0.4.1"
gem "rubocop-rspec" # useful even though we use minitest/spec
gem "ruby-lsp", ">= 0.19.1"
gem "ruby-lsp", ">= 0.22.1"
gem "ruby-lsp-rails", ">= 0.3.18"

group :deployment, :development do
Expand Down
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,13 @@ GEM
rubocop (~> 1.51)
rubocop-sorbet (0.8.7)
rubocop (>= 1)
ruby-lsp (0.19.1)
ruby-lsp (0.22.1)
language_server-protocol (~> 3.17.0)
prism (>= 1.1, < 2.0)
prism (>= 1.2, < 2.0)
rbs (>= 3, < 4)
sorbet-runtime (>= 0.5.10782)
ruby-lsp-rails (0.3.18)
ruby-lsp (>= 0.19.0, < 0.20.0)
ruby-lsp-rails (0.3.27)
ruby-lsp (>= 0.22.0, < 0.23.0)
ruby-progressbar (1.13.0)
securerandom (0.3.1)
shopify-money (3.0.0)
Expand Down Expand Up @@ -396,7 +396,7 @@ DEPENDENCIES
rubocop-rspec
rubocop-shopify
rubocop-sorbet (>= 0.4.1)
ruby-lsp (>= 0.19.1)
ruby-lsp (>= 0.22.1)
ruby-lsp-rails (>= 0.3.18)
shopify-money
sidekiq
Expand Down
7 changes: 3 additions & 4 deletions lib/ruby_lsp/tapioca/addon.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# typed: strict
# frozen_string_literal: true

RubyLsp::Addon.depend_on_ruby_lsp!(">= 0.20", "< 0.22")
RubyLsp::Addon.depend_on_ruby_lsp!(">= 0.22.1", "< 0.23")

begin
# The Tapioca add-on depends on the Rails add-on to add a runtime component to the runtime server. We can allow the
Expand Down Expand Up @@ -32,8 +32,7 @@ def initialize
sig { override.params(global_state: RubyLsp::GlobalState, outgoing_queue: Thread::Queue).void }
def activate(global_state, outgoing_queue)
@global_state = global_state
# TODO: Uncomment
# return unless @global_state.experimental_features
return unless @global_state.enabled_feature?(:tapioca_addon)
Copy link
Member

Choose a reason for hiding this comment

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

This is camel case because it comes from the JSON settings and we don't convert it to snake case.

Suggested change
return unless @global_state.enabled_feature?(:tapioca_addon)
return unless @global_state.enabled_feature?(:tapiocaAddon)


@index = @global_state.index
Thread.new do
Expand Down Expand Up @@ -67,7 +66,7 @@ def version
sig { params(changes: T::Array[{ uri: String, type: Integer }]).void }
def workspace_did_change_watched_files(changes)
# TODO: Uncomment
# return unless T.must(@global_state).experimental_features
return unless T.must(@global_state).enabled_feature?(:tapioca_addon)
Copy link
Member

Choose a reason for hiding this comment

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

Need to also remove the TODO comment above.

Suggested change
return unless T.must(@global_state).enabled_feature?(:tapioca_addon)
return unless T.must(@global_state).enabled_feature?(:tapiocaAddon)

return unless @rails_runner_client # Client is not ready

constants = changes.flat_map do |change|
Expand Down
Loading
Loading