-
Notifications
You must be signed in to change notification settings - Fork 82
Implement our own LookupError #2772
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
base: main
Are you sure you want to change the base?
Conversation
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/src/utils.jl b/src/utils.jl
index c2dc83e9..f4980eb6 100644
--- a/src/utils.jl
+++ b/src/utils.jl
@@ -273,8 +273,8 @@ end
function Base.showerror(io::IO, e::LookupError)
print(io, "no method matching ")
Base.show_signature_function(io, e.ft)
- Base.show_tuple_as_call(io, :function, e.tt; hasfirst=false, kwargs=nothing)
- if Core._hasmethod(GPUCompiler.signature_type_by_tt(e.ft, e.tt))
+ Base.show_tuple_as_call(io, :function, e.tt; hasfirst = false, kwargs = nothing)
+ return if Core._hasmethod(GPUCompiler.signature_type_by_tt(e.ft, e.tt))
print(io, "\n(method exists but is not available in world age $(e.world))")
end
end |
Benchmark Results
Benchmark PlotsA plot of the benchmark results has been uploaded as an artifact at https://github.com/EnzymeAD/Enzyme.jl/actions/runs/19274222758/artifacts/4534799538. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2772 +/- ##
==========================================
- Coverage 68.92% 68.90% -0.02%
==========================================
Files 58 58
Lines 19861 19868 +7
==========================================
+ Hits 13690 13691 +1
- Misses 6171 6177 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
why? |
|
Because you can't throw a method error using only the type of the function? |
wsmoses
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we add a test with this to make sure it doesn't decay again?
|
@vchuravy ah, that makes sense then. |
No description provided.