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

Use Bundler CLI directly and send errors to telemetry #2774

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

vinistock
Copy link
Member

Motivation

This PR starts invoking the Bundler CLI objects for install and update directly on the new launcher strategy instead of shelling out.

This will provide us with two benefits: one is performance since we don't have to start a whole new process to start running Bundler commands. The second is that we can now rescue the errors and send them to telemetry, so that we can understand what are the common failures to bundle install and start making it more robust.

Implementation

The idea is to invoke Bundler::CLI::{Install,Update} as needed, rescue errors and report them to the editor as telemetry.

I'm also enabling YJIT in the child process that sets up the composed bundle, since it speeds up both install and update.

Automated Tests

Added tests.

@vinistock vinistock added enhancement New feature or request server This pull request should be included in the server gem's release notes labels Oct 24, 2024
@vinistock vinistock self-assigned this Oct 24, 2024
@vinistock vinistock requested a review from a team as a code owner October 24, 2024 17:59
@vinistock vinistock force-pushed the vs-invoke-bundler-cli branch 2 times, most recently from d34d293 to 6976d2b Compare October 24, 2024 18:36
Base automatically changed from vs-add-launch-integrations to main October 24, 2024 18:42
@vinistock vinistock force-pushed the vs-invoke-bundler-cli branch 23 times, most recently from 8311af8 to 35ad8ab Compare October 26, 2024 18:20
test/setup_bundler_test.rb Outdated Show resolved Hide resolved
lib/ruby_lsp/setup_bundler.rb Outdated Show resolved Hide resolved
test/setup_bundler_test.rb Outdated Show resolved Hide resolved
test/setup_bundler_test.rb Show resolved Hide resolved
lib/ruby_lsp/setup_bundler.rb Show resolved Hide resolved
@vinistock vinistock force-pushed the vs-invoke-bundler-cli branch from bbc0a44 to 0c4392b Compare October 30, 2024 17:46
@vinistock vinistock requested a review from andyw8 October 30, 2024 18:02
@vinistock vinistock merged commit 29c434b into main Oct 30, 2024
38 checks passed
@vinistock vinistock deleted the vs-invoke-bundler-cli branch October 30, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server This pull request should be included in the server gem's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants