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
The new definitions of winsymlink and winreadlinkvolume godebugs in package os are missing calls to IncNonDefault to record when they change the behavior of the program. See go doc internal/godebug for details.
Note that to be a useful metric, IncNonDefault has to be called only when the result is actually different, not just when new code is executing that does the same thing old code would have done for a given input. That means checking the input and understanding when a deviation is happening.
This means that
if winsymlink.Value() == "0" {
return fs.modePreGo1_23()
}
is not a viable implementation strategy on its own. However, one possibility is to rename the current Mode to mode and then do
func (fs *fileStat) Mode() FileMode {
m := fs.mode()
if winsymlink.Value() == "0" {
old := fs.modePreGo1_23()
if old != m {
winsymlink.IncNonDefault()
m = old
}
}
return m
}
A few recent godebugs are missing IncNonDefault uses.
Test for that, so that people remember to do it.
Filed bugs for the missing ones.
For #66215.
For #66216.
For #66217.
Change-Id: Ia3fd10fd108e1b003bb30a8bc2f83995c768fab6
Reviewed-on: https://go-review.googlesource.com/c/go/+/570275
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
The new definitions of winsymlink and winreadlinkvolume godebugs in package os are missing calls to IncNonDefault to record when they change the behavior of the program. See
go doc internal/godebug
for details.Note that to be a useful metric, IncNonDefault has to be called only when the result is actually different, not just when new code is executing that does the same thing old code would have done for a given input. That means checking the input and understanding when a deviation is happening.
This means that
is not a viable implementation strategy on its own. However, one possibility is to rename the current Mode to mode and then do
/cc @qmuntal
The text was updated successfully, but these errors were encountered: