wf icon indicating copy to clipboard operation
wf copied to clipboard

Drop usage of //go:notinheap pragma

Open cuonglm opened this issue 3 years ago • 1 comments

In go1.20, //go:notinheap pragma will be removed, see mode details at these CLs stack: https://go-review.googlesource.com/c/go/+/421878

//go:notinheap was first introduced for using internally in runtime package only, user code should not rely on this. There're number of places are using //go:notinheap in https://github.com/inetaf/wf/blob/2db5c3d6461ca87de5e8bb3644858c02ad0dae7a/types.go

We should remove them.

cuonglm avatar Aug 19 '22 08:08 cuonglm

This is pretty unfortunate. Lodged a complaint/plea at https://github.com/golang/go/issues/46731#issuecomment-1221008505 , as those annotations saved me multiple times from really hard to debug crashes and misbehaviors in this library.

In theory, there's no immediate consequence to removing the annotations from this code, other than reintroducing a footgun that the annotation completely eliminated. In practice that probably just means I'll start declining third-party PRs more due to the extra review burden.

danderson avatar Aug 19 '22 19:08 danderson