<div dir="ltr">Hi folks,<div><br></div><div>I'm experimenting with seq_trace which seems to be super powerful. However I've run into a case where the token gets unexpectedly cleared out...</div><div><br></div><div>I ran into it using Elixir, when calling a module that isn't yet loaded in a test. I tracked it down further and was able to reproduce it when simply calling `file:read_file`. Same thing happens if the file exists or not.</div><div><br></div><div>Example:</div><div><br></div><div><div>```</div><div>-module(seq_fail).</div><div>-include_lib("eunit/include/eunit.hrl").</div><div><br></div><div>seq_fail_test() -></div><div>  seq_trace:set_token(label, 123),</div><div>  ?assertMatch({_, 123, _, _, _}, seq_trace:get_token()),</div><div><br></div><div>  {error, enoent} = file:read_file('not_there'),</div><div>  ?assertMatch({_, 123, _, _, _}, seq_trace:get_token()).</div></div><div>```</div><div><br></div><div>Running the test fails the second match:</div><div><br></div><div>```</div><div><div>  1) seq_fail:seq_fail_test/0: module 'seq_fail'</div><div>     Failure/Error: ?assertMatch({ _ , 123 , _ , _ , _ }, seq_trace : get_token ( ))</div><div>       expected: = { _ , 123 , _ , _ , _ }</div><div>            got: []</div><div>     %% .../_build/test/lib/seq_fail/src/seq_fail.erl:9:in `seq_fail:-seq_fail_test/0-fun-1-/0</div><div>```<br></div></div><div><br></div><div>I dug into the code for `file:read_file` and came across some interesting things (like erlang:dt_spread_tag) but couldn't track it any further...</div><div><br></div><div>Anyone have ideas?</div><div><br></div><div><br></div></div>