You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IMO, if someone is using the -race tagged builds, they are looking for fast feedback on the first data race encountered. Setting GORACE=halt_on_error=1 will cause the program to exit with code 66 on the first data race encountered, whereas the default value will continue execution to the end and probably exit 0.
I think the feedback would be clearer if defaulting to halt on error, and the user is always free to override it back to GORACE=halt_on_error=0 if they do want execution to continue past the first encountered data race.
The text was updated successfully, but these errors were encountered:
jonathanpberger
changed the title
Add defaultGORACE environment variable to race-detector enabled builds
Add default GORACE environment variable to race-detector enabled builds
May 8, 2023
Per https://go.dev/doc/articles/race_detector, by default, a race-detector-enabled build will print data races to stderr and continue execution.
IMO, if someone is using the
-race
tagged builds, they are looking for fast feedback on the first data race encountered. SettingGORACE=halt_on_error=1
will cause the program to exit with code 66 on the first data race encountered, whereas the default value will continue execution to the end and probably exit 0.I think the feedback would be clearer if defaulting to halt on error, and the user is always free to override it back to
GORACE=halt_on_error=0
if they do want execution to continue past the first encountered data race.The text was updated successfully, but these errors were encountered: