Issue #7815 has been updated by mame (Yusuke Endoh).


zzak (Zachary Scott) wrote:
> In my opinion Kernel#set_trace_func is obsolete, because it's an older and outdated API for TracePoint. We should recommend users try TracePoint instead, but it's not an officially deprecated feature. Ok?

I don't know.  It is officially deprecated only if matz approve the deprecation.  Ko1, do you know?

Also, I'm afraid if TracePoint is not mature enough to deprecate Kernel#set_trace_func immediately.
So I think it would be good to include both in 2.0.0.


> > In addition, Thread#set_trace_func should not refer the obsolete method
> There is a bug in TracePoint spec where you cannot specify listen for a target thread, so Thread#set_trace_func is still acceptable API and preferred method for doing this. In this case, referring to Kernel#set_trace_func still applies because it carries additional api on _this_ API. Until TracePoint spec is fixed, we can still cross-reference #set_trace_func.

Yes I know.  My opinion is just a matter of form; it looks strange to me that the rdoc of a method that is not deprecated yet depends on a deprecated method's.


> If you'd like I can supply a patch only for warning on TracePoint events, it's up to you.

I prefer this, unless matz officially deprecated only Kernel#set_trace_func.  Thanks!

-- 
Yusuke Endoh <mame / tsg.ne.jp>
----------------------------------------
Bug #7815: Backport: Warning about TracePoint events to 2.0.0
https://bugs.ruby-lang.org/issues/7815#change-36109

Author: zzak (Zachary Scott)
Status: Open
Priority: Normal
Assignee: mame (Yusuke Endoh)
Category: DOC
Target version: 2.0.0
ruby -v: -


Can we please backport r39168 to 2_0_0 branch?

https://github.com/ruby/ruby/commit/810516e
and
https://github.com/ruby/ruby/commit/810516e.patch


-- 
http://bugs.ruby-lang.org/