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

Prevent bundle check from printing to stdout #942

Merged
merged 2 commits into from
Aug 28, 2023

Conversation

vinistock
Copy link
Member

Motivation

The command bundle check || bundle install 1>&2 only redirects the output of bundle install, we need parenthesis to prevent any output from going to stdout. Because it's currently printing that the dependencies are satisfied, the client incorrectly treats that as the initial handshake and the LSP can't be started.

Implementation

Added parenthesis around the command.

Automated Tests

Added a test to ensure we don't regress.

@vinistock vinistock added the bugfix This PR will fix an existing bug label Aug 28, 2023
@vinistock vinistock added this to the 2023-Q3 milestone Aug 28, 2023
@vinistock vinistock self-assigned this Aug 28, 2023
@vinistock vinistock requested a review from a team as a code owner August 28, 2023 20:14
@vinistock vinistock enabled auto-merge (squash) August 28, 2023 20:20
@vinistock vinistock merged commit 5cb9407 into main Aug 28, 2023
31 checks passed
@vinistock vinistock deleted the vs/prevent_bundle_check_from_printing_to_stdout branch August 28, 2023 20:24
@github-actions
Copy link
Contributor

Benchmark results in seconds (slowest at top)

          textDocument/completion average: 0.208322 std_dev: 0.003541
          textDocument/diagnostic average: 0.039123 std_dev: 0.010102
          textDocument/definition average: 0.004795 std_dev: 0.002789
      textDocument/selectionRange average: 0.003954 std_dev: 0.000447
   textDocument/documentHighlight average: 0.002499 std_dev: 0.000198
        textDocument/documentLink average: 0.002476 std_dev: 0.000181
            textDocument/codeLens average: 0.002474 std_dev: 0.000229
      textDocument/documentSymbol average: 0.002423 std_dev: 0.000176
 textDocument/semanticTokens/full average: 0.002423 std_dev: 0.00034
        textDocument/foldingRange average: 0.002253 std_dev: 0.000152
textDocument/semanticTokens/range average: 0.001619 std_dev: 0.000132
               codeAction/resolve average: 0.00139 std_dev: 0.000104
           textDocument/inlayHint average: 0.001384 std_dev: 0.00012
               textDocument/hover average: 0.001336 std_dev: 9.2e-05
    textDocument/onTypeFormatting average: 0.000826 std_dev: 9.0e-05
          textDocument/formatting average: 0.000822 std_dev: 0.000272
          textDocument/codeAction average: 0.000803 std_dev: 6.8e-05


================================================================================
Comparison with main branch:

 textDocument/semanticTokens/full unchanged
textDocument/semanticTokens/range unchanged
      textDocument/documentSymbol unchanged
        textDocument/foldingRange unchanged
          textDocument/formatting unchanged
          textDocument/diagnostic unchanged
        textDocument/documentLink unchanged
           textDocument/inlayHint unchanged
      textDocument/selectionRange unchanged
   textDocument/documentHighlight unchanged
               textDocument/hover unchanged
          textDocument/codeAction unchanged
    textDocument/onTypeFormatting unchanged
               codeAction/resolve unchanged
          textDocument/completion slower by 3.4 %
            textDocument/codeLens unchanged
          textDocument/definition unchanged


At least one benchmark is slower than the main branch.


================================================================================
Missing benchmarks:

RubyLsp::Requests::ShowSyntaxTree

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants