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

feat: move debug logging behind a debug flag that is disabled by default #972

Merged
merged 1 commit into from
Feb 25, 2024

Conversation

amaanq
Copy link
Contributor

@amaanq amaanq commented Feb 24, 2024

Closes #970
Closes #971

@amaanq amaanq changed the title feat: move some debug logging behind a debug flag that is disabled by default feat: move debug logging behind a debug flag that is disabled by default Feb 24, 2024
Copy link
Collaborator

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

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

Sorry I forgot to post my comment 😂

src/command_helpers.rs Outdated Show resolved Hide resolved
@NobodyXu
Copy link
Collaborator

Would cut a new release soon once this PR is merged.

@amaanq
Copy link
Contributor Author

amaanq commented Feb 25, 2024

Sorry I forgot to post my comment 😂

No worries, github ux isn't exactly the most clear with that ;)

@amaanq amaanq force-pushed the debug-print branch 5 times, most recently from 66b9fa1 to cb22cde Compare February 25, 2024 07:56
src/command_helpers.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/command_helpers.rs Outdated Show resolved Hide resolved
src/command_helpers.rs Show resolved Hide resolved
src/command_helpers.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

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

Looks good, can you try setting the env locally and see if it prints the debug output as expected please?

@amaanq
Copy link
Contributor Author

amaanq commented Feb 25, 2024

Okay so I tried it in 2 spots, I think it's good

1 is building tree-sitter with cargo build/install, that seems to show the appopriate output when the env var is set with -vv tacked on.

2 is when tree-sitter builds and runs cc at runtime to compile parsers, setting the env var correctly displays the output that was previously force printed always.

So I think it's good now, this is much better than before

@NobodyXu NobodyXu merged commit 8bda250 into rust-lang:main Feb 25, 2024
21 checks passed
@NobodyXu
Copy link
Collaborator

Thank you!

@amaanq
Copy link
Contributor Author

amaanq commented Feb 25, 2024

Thanks a ton for guiding me with this! Really helps :)

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.

cc 1.0.87 cause build error with warning cc 1.0.87 produces tons of warnings on cargo check
2 participants