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 stderr for tracing output #14

Merged
merged 1 commit into from
May 1, 2024
Merged

Use stderr for tracing output #14

merged 1 commit into from
May 1, 2024

Conversation

filiptibell
Copy link
Collaborator

@filiptibell filiptibell commented Apr 23, 2024

Rokit currently uses stdout for tracing output - this includes error messages such as when Rokit fails to run a tool.

This PR sets the tracing subscriber to use stderr, under the assumption that it is only used for warnings and hard errors, not regular output. Searching for the info! macro shows no matches so this should hold true.

Fixes #17

@filiptibell
Copy link
Collaborator Author

Turns out that this is actually more important than I originally thought - I had this happen:

  1. Install StyLua in a specific project
  2. Set the VSCode extension to try to use the Rokit-installed binary
  3. Switch to a different project that does not use StyLua
  4. Save a file after editing, it then formats on save, and the entire file gets wiped (!!) and replaced with an error message from Rokit saying StyLua does not exist for the project

I'll be merging this PR and making a new Rokit release with the fix.

@filiptibell filiptibell merged commit c0da3d9 into main May 1, 2024
10 checks passed
@filiptibell filiptibell deleted the use-stderr-tracing branch June 18, 2024 20:17
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.

Rokit does not use stderr for errors properly
1 participant