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

Remove verbose or debug environment variables from Ruby env #1889

Merged
merged 2 commits into from
Apr 5, 2024

Conversation

vinistock
Copy link
Member

Motivation

Closes #1397

It looks like we may have finally discovered what causes Bundler to print stuff to STDOUT. It seems that other extensions insert VERBOSE=1 or DEBUG=warn into the NodeJS process env, which then enables verbose mode on Bundler.

I'm still a bit confused as to why setting the Bundler.ui.level to silent doesn't prevent this, but I think we can sanitize the environment and remove these variables like we do for GC tuning variables.

Implementation

  1. Tests were a bit flaky, so I used stubs to improve the situation for Ruby and Debugger
  2. Added the sanitization

Automated Tests

Added a test to verify that we remove those variables.

@vinistock vinistock added bugfix This PR will fix an existing bug vscode This pull request should be included in the VS Code extension's release notes labels Apr 5, 2024
@vinistock vinistock self-assigned this Apr 5, 2024
@vinistock vinistock requested a review from a team as a code owner April 5, 2024 15:53
@vinistock vinistock requested review from Morriar and st0012 April 5, 2024 15:53
@vinistock vinistock force-pushed the vs/better_sanitize_activated_environment branch from 1dbf3b2 to 5332e02 Compare April 5, 2024 17:47
@vinistock vinistock merged commit c8a18d8 into main Apr 5, 2024
39 checks passed
@vinistock vinistock deleted the vs/better_sanitize_activated_environment branch April 5, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This PR will fix an existing bug vscode This pull request should be included in the VS Code extension's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot seem to get Ruby LSP to work in a Rails 7 app at all
2 participants