Skip to content

Use log trace instead of printing to stderr #461

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

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

vinistock
Copy link
Member

Changed all of our stderr prints to use proper log trace messages. As an added benefit, this change revealed a lot of brittleness in our tests, which I fixed by ensuring that we properly await the activation of the addon before trying to run any requests.

The tests are a touch slower, but it's significantly less likely to get into a weird state with orphan threads still running even after the tests are finished.

The output has also been cleared since we are no longer printing anything to stderr, so running the tests doesn't pollute the terminal.

Note

There are still a few prints in the Rails documentation client, but I think we should remove that feature altogether now that the Ruby LSP has better support for showing documentation on hover.

@vinistock vinistock self-assigned this Sep 23, 2024
@vinistock vinistock requested a review from a team as a code owner September 23, 2024 16:00
@vinistock vinistock force-pushed the vs-use-trace-instead-of-printing-to-stderr branch 3 times, most recently from 9cf869c to fcbc3a1 Compare September 23, 2024 17:41
Copy link
Contributor

@andyw8 andyw8 left a comment

Choose a reason for hiding this comment

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

(will need a rebase)

@vinistock vinistock force-pushed the vs-use-trace-instead-of-printing-to-stderr branch 2 times, most recently from 17fa3f4 to 572da64 Compare October 4, 2024 15:22
@vinistock vinistock force-pushed the vs-use-trace-instead-of-printing-to-stderr branch from 572da64 to 8002896 Compare October 4, 2024 15:47
@vinistock vinistock merged commit 2f9b081 into main Oct 4, 2024
28 checks passed
@vinistock vinistock deleted the vs-use-trace-instead-of-printing-to-stderr branch October 4, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants