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

Replace log.Fatalf with log.Exitf to avoid spamming stderr. #1284

Merged
merged 3 commits into from
Aug 27, 2024

Conversation

paulherman
Copy link
Contributor

The set of warnings is something that is changing over time. As scripts tend to hardcode these, they get out of date and we hit this unexpected warning code path. There's little benefit of having a stack trace from this issue. Thus, it's more convenient to just print the error itself and nothing else.

The set of warnings is something that is changing over time. As scripts tend to hardcode these, they get out of date and we hit this unexpected warning code path. There's little benefit of having a stack trace from this issue. Thus, it's more convenient to just print the error itself and nothing else.
@vladmos
Copy link
Member

vladmos commented Aug 7, 2024

Does it actually make a difference? According to the docs: Fatalf is equivalent to Printf followed by a call to os.Exit(1).

https://pkg.go.dev/log#Fatalf

Copy link

@lysliu lysliu left a comment

Choose a reason for hiding this comment

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

LGTM

@vladmos vladmos merged commit ec2ed9d into bazelbuild:main Aug 27, 2024
2 checks passed
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