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
I'd prefer to delay this until runtime.FuncForPC is deprecated, and even
then, given the go 1 contract I'm not sure there is an issue to be fixed
here.
With that said, if runtime.Callers can provide a simpler or more complete
API that the one we're currently hand rolling then that seems like a good
basis for switching too it.
It will probably be worth doing something for Go 1.9. From the draft release notes:
Tracebacks generated by the runtime and recorded in profiles are now accurate in the presence of inlining. To retrieve tracebacks programmatically, applications should use runtime.CallersFrames rather than directly iterating over the results of runtime.Callers.
Switching to runtime.CallersFrames will become critical once Go has mid-stack inlining, which seems likely in one of the next few releases. The proposal has been accepted.
On Sun, 18 Jun 2017, 01:59 Chris Hines ***@***.***> wrote:
It will probably be worth doing something for Go 1.9. From the draft
release notes:
Tracebacks generated by the runtime and recorded in profiles are now
accurate in the presence of inlining. To retrieve tracebacks
programmatically, applications should use runtime.CallersFrames rather than
directly iterating over the results of runtime.Callers.
Switching to runtime.CallersFrames will become critical once Go has
mid-stack inlining, which seems likely in one of the next few releases. The
proposal has been accepted.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#107 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAcAyxFgCbgrDDXtdm3JCQh1zY1LpC3ks5sE_fvgaJpZM4MVNSe>
.
Just saw the 1.9 release notes and thought to check on this library (I use it regularly and its awesome).
Mid-stack inlining has landed in 1.9. https://tip.golang.org/doc/go1.9#callersframes.
I believe this would be a good time to make the shift to runtime.CallersFrames.
Activity
alfred-landrum commentedon Mar 8, 2017
Here's a related golang issue, including the documentation change that recommends using CallersFrames:
golang/go#19426
Here's a closed experimental PR that uses CallersFrames, ignoring backwards compatibility, but passing for 1.7 and tip:
#108
davecheney commentedon Mar 8, 2017
ChrisHines commentedon Jun 15, 2017
We are exploring a similar migration over at go-stack/stack#13. Important links for reference:
davecheney commentedon Jun 15, 2017
Is there anything to do here, the method is depreciated, but it won't be going away any time soon.
ChrisHines commentedon Jun 17, 2017
It will probably be worth doing something for Go 1.9. From the draft release notes:
Switching to
runtime.CallersFrameswill become critical once Go has mid-stack inlining, which seems likely in one of the next few releases. The proposal has been accepted.davecheney commentedon Jun 17, 2017
agnivade commentedon Aug 2, 2017
Hi everyone,
Just saw the 1.9 release notes and thought to check on this library (I use it regularly and its awesome).
Mid-stack inlining has landed in 1.9. https://tip.golang.org/doc/go1.9#callersframes.
I believe this would be a good time to make the shift to
runtime.CallersFrames.alfred-landrum commentedon Aug 14, 2017
@davecheney - given the above rationale, would you be ready to consider a more polished version of my early PR, #108 ?
Switch to runtime.CallersFrames
Switch to runtime.CallersFrames (#183)