-
Notifications
You must be signed in to change notification settings - Fork 11
Support anonymous functions #102
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
Conversation
Codecov ReportBase: 61.57% // Head: 95.25% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #102 +/- ##
===========================================
+ Coverage 61.57% 95.25% +33.68%
===========================================
Files 3 3
Lines 229 232 +3
===========================================
+ Hits 141 221 +80
+ Misses 88 11 -77
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Keyword dispatch methods went away in Julia 1.9, replaced by the generic `kwcall`. In #102 I disabled the corresponding test. That was misguided because we still want to be able to recover the source definition, regardless of the details of the underlying implementation.
Keyword dispatch methods went away in Julia 1.9, replaced by the generic `kwcall`. In #102 I disabled the corresponding test. That was misguided because we still want to be able to recover the source definition, regardless of the details of the underlying implementation.
While working on TypedSyntax.jl it became apparent that CodeTracking sometimes returns spurious results. At least some of these arise from the recent support of anonymous functions, #102, which might in retrospect have been ill-considered. Rather than back that change out, this adopts a different resolution: validate the hits more carefully. The primary mechanism introduced here is to match not just the function name, but also the argument names. This can work even for anonymous functions, so we do not need to drop support for them. This also adds quite a few new tests. These additions would have passed before, but they proved valuable to ensure that the new argname-matching works sufficiently well. On TypedSyntax's "exhaustive.jl" test, this brings the number of failed cases (specifically, the `badmis`) from either 460 or 94 (depending on whether you include a few fixes in TypedSyntax) to just 2.
While working on TypedSyntax.jl it became apparent that CodeTracking sometimes returns spurious results. At least some of these arise from the recent support of anonymous functions, #102, which might in retrospect have been ill-considered. Rather than back that change out, this adopts a different resolution: validate the hits more carefully. The primary mechanism introduced here is to match not just the function name, but also the argument names. This can work even for anonymous functions, so we do not need to drop support for them. This also adds quite a few new tests. These additions would have passed before, but they proved valuable to ensure that the new argname-matching works sufficiently well. On TypedSyntax's "exhaustive.jl" test, this brings the number of failed cases (specifically, the `badmis`) from either 460 or 94 (depending on whether you include a few fixes in TypedSyntax) to just 2.
Closes #80