Skip to content

Commit

Permalink
Merge pull request #2591 from Shopify/ar/remove-experimental-flag
Browse files Browse the repository at this point in the history
Remove --experimental flag
  • Loading branch information
alexcrocha authored Sep 23, 2024
2 parents e079f05 + 6448d88 commit 54952fa
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 41 deletions.
7 changes: 0 additions & 7 deletions exe/ruby-lsp
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ parser = OptionParser.new do |opts|
options[:branch] = branch
end

opts.on(
"--experimental",
"Run pre-release versions of the Ruby LSP",
) do
options[:experimental] = true
end

opts.on("--doctor", "Run troubleshooting steps") do
options[:doctor] = true
end
Expand Down
2 changes: 0 additions & 2 deletions lib/ruby_lsp/setup_bundler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class BundleInstallFailure < StandardError; end
def initialize(project_path, **options)
@project_path = project_path
@branch = T.let(options[:branch], T.nilable(String))
@experimental = T.let(options[:experimental], T.nilable(T::Boolean))

# Regular bundle paths
@gemfile = T.let(
Expand Down Expand Up @@ -207,7 +206,6 @@ def run_bundle_install(bundle_gemfile = @gemfile)
command << "ruby-lsp " unless @dependencies["ruby-lsp"]
command << "debug " unless @dependencies["debug"]
command << "ruby-lsp-rails " if @rails_app && !@dependencies["ruby-lsp-rails"]
command << "--pre" if @experimental
command.delete_suffix!(" ")
command << ")"

Expand Down
32 changes: 0 additions & 32 deletions test/setup_bundler_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -301,38 +301,6 @@ def test_creates_custom_bundle_with_specified_branch
end
end

def test_install_prerelease_versions_if_experimental_is_true
Dir.mktmpdir do |dir|
Dir.chdir(dir) do
File.write(File.join(dir, "Gemfile"), <<~GEMFILE)
source "https://rubygems.org"
gem "rdoc"
GEMFILE

capture_subprocess_io do
Bundler.with_unbundled_env do
# Run bundle install to generate the lockfile
system("bundle install")

# Run the script once to generate a custom bundle
run_script(dir)
end
end

capture_subprocess_io do
Bundler.with_unbundled_env do
stub_bundle_with_env(
bundle_env(dir, ".ruby-lsp/Gemfile"),
"((bundle check && bundle update ruby-lsp debug --pre) || bundle install) 1>&2",
)

run_script(dir, experimental: true)
end
end
end
end
end

def test_returns_bundle_app_config_if_there_is_local_config
Dir.mktmpdir do |dir|
Dir.chdir(dir) do
Expand Down

0 comments on commit 54952fa

Please sign in to comment.