< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事(スレッド移動)
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Issue #15912 has been updated by ko1 (Koichi Sasada).
> But then I thought that we could even allow events of the same type, as l=
ong as we forbid handlers currently being run from being triggered.
> So in my example, line_handler2 executions in lines 5 and 7 would not run=
line_handler1, but the execution in line 8 would run it (twice, actually).
...
> The idea is running any possible relevant event handler as long as it's n=
ot already in the stack of event handlers currently being run.
Why line 5, line 7 would not invoked? I can't understand the rule.
And how about line 10, 12?
----------------------------------------
Feature #15912: Allow some reentrancy during TracePoint events
https://bugs.ruby-lang.org/issues/15912#change-80738
* Author: deivid (David Rodr=EDguez)
* Status: Assigned
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* Target version: =
----------------------------------------
I got a report in byebug about byebug being incompatible with zeitwerk. Thi=
s one: https://github.com/deivid-rodriguez/byebug/issues/564. This is a pro=
blem because zeitwerk is the default Rails code loader, and byebug is the d=
efault Rails debugger.
Both of these tools rely on the TracePoint API:
* Byebug uses a bunch of TracePoint events to stop execution at certain poi=
nts in your program.
* Zeitwek uses `:class` events to be able to resolve some circular edge cas=
es.
I investigated the problem and I think the issue is that while stopped at t=
he byebug prompt, we're actually in the middle of processing a TracePoint e=
vent. That means that further TracePoint events triggered at the byebug's p=
rompt will be ignored, because otherwise we could get into an infinite loop=
where the handling of events would trigger more events that trigger themse=
lves the execution of handlers again.
I understand why the TracePoint API does this, but if we could allow some l=
evel of reentrancy here, we could probably make these tools play nice toget=
her. I figure if we kept a stack of TracePoint event handlers being run, an=
d check that the current event type is not already in the stack, we would a=
llow :class events to be triggered from :line events, and I think that woul=
d allow Zeitwerk to work within byebug.
What do you think about this, @ko1?
-- =
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=3Dunsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>