Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monkey patch Test.scrub_backtrace #287

Merged
merged 5 commits into from
Oct 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/ChainRulesTestUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@
export @maybe_inferred
export test_method_tables

__init__() = init_test_inferred_setting!()
function __init__()
init_test_inferred_setting!()

# Try to disable backtrace scrubbing so that full failures are shown
try
isdefined(Test, :scrub_backtrace) || error("Test.scrub_backtrace not defined")
@eval Test scrub_backtrace(bt, file_ts, file_t) = bt # make it do nothing
oxinabox marked this conversation as resolved.
Show resolved Hide resolved
catch err
@warn "Failed to monkey=patch scrub_backtrace. Code is functional but stacktraces may be less useful" exception=(err, catch_backtrace())

Check warning on line 28 in src/ChainRulesTestUtils.jl

View check run for this annotation

Codecov / codecov/patch

src/ChainRulesTestUtils.jl#L28

Added line #L28 was not covered by tests
oxinabox marked this conversation as resolved.
Show resolved Hide resolved
end
end

include("global_config.jl")

Expand All @@ -36,3 +46,4 @@
include("deprecated.jl")
include("global_checks.jl")
end # module

Loading