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

@code_expr fails (?) with a method from IntervalArithmetic.jl #86

Closed
dpsanders opened this issue Jul 30, 2021 · 6 comments
Closed

@code_expr fails (?) with a method from IntervalArithmetic.jl #86

dpsanders opened this issue Jul 30, 2021 · 6 comments

Comments

@dpsanders
Copy link

julia> using CodeTracking, Revise

julia> using IntervalArithmetic

julia> Revise.track(IntervalArithmetic)

julia> @code_expr +(0.1, 0.2, RoundDown)
┌ Warning: Tuple{typeof(+), T, T, RoundingMode} where T<:AbstractFloat was not found
└ @ Revise ~/.julia/packages/Revise/9lZUE/src/packagedef.jl:1083
@timholy
Copy link
Owner

timholy commented Aug 4, 2021

Sadly, Revise can't handle @eval statements hidden within function bodies, only those at top-level. I think that accounts for fewer than 20 of the >18k methods in Base, so it's never been a priority.

@timholy
Copy link
Owner

timholy commented Aug 4, 2021

BTW you don't need that track statement; all your using and import packages get tracked automatically.

@dpsanders
Copy link
Author

OK, I see, thanks. Unfortunately that's pretty key to the functioning of the package as it's currently written.

@KristofferC
Copy link
Collaborator

🏴‍☠️

@timholy
Copy link
Owner

timholy commented Aug 4, 2021

I don't think there's even a safe & comprehensive fix for this without moving Revise's core method-tracking functionality into julia proper; otherwise Revise would have to go around executing random functions with random arguments just to see if they happen to define methods.

Interestingly, I actually think the time for such a move may have come; there just seem to be an endless list of things that would benefit from having cached "fenced" source code and expressions a la JuliaLang/julia#31162. It would fix most of Julia's usability gaps (stacktraces, debugger, integration of type inference results into IDEs) as well as the main source of Revise bugs (lowering always generates new gensyms). So I'm not saying it will never be supported, but it's a monumental change.

I'll close this as a won't fix because this basically can't be tackled as an independent step.

@timholy timholy closed this as completed Aug 4, 2021
@timholy
Copy link
Owner

timholy commented Aug 4, 2021

I don't think there's even a safe & comprehensive fix for this without moving Revise's core method-tracking functionality into julia proper; otherwise Revise would have to go around executing random functions with random arguments just to see if they happen to define methods.

Interestingly, I actually think the time for such a move may have come; there just seem to be an endless list of things that would benefit from having cached "fenced" source code and expressions a la JuliaLang/julia#31162. It would fix most of Julia's usability gaps (stacktraces, debugger, integration of type inference results into IDEs) as well as the main source of Revise bugs (lowering always generates new gensyms). So I'm not saying it will never be supported, but it's a monumental change.

I'll close this as a won't fix because this basically can't be tackled as an independent step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants