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

Strip Salsa package line numbers out of user-declared functions using Salsa macros #35

Open
NHDaly opened this issue Oct 13, 2020 · 1 comment
Labels
enhancement New feature or request macros

Comments

@NHDaly
Copy link
Collaborator

NHDaly commented Oct 13, 2020

julia> using Salsa

julia> @derived foo(rt) = 2
mefoo (generic function with 1 method)

julia> methods(foo)
# 1 method for generic function "foo":
[1] foo(rt) in Main at /Users/nathandaly/work/Delve/packages/Salsa/src/Salsa.jl:619

This should not list Salsa.jl as its line number.

Same for inputs:

julia> @declare_input x(rt)::Int
(x, set_x!, delete_x!)

julia> methods(x)
# 1 method for generic function "x":
[1] x(rt) in Main at /Users/nathandaly/work/Delve/packages/Salsa/src/Salsa.jl:812

julia> methods(set_x!)
# 1 method for generic function "set_x!":
[1] set_x!(rt, value::Int64) in Main at /Users/nathandaly/work/Delve/packages/Salsa/src/Salsa.jl:816

julia> methods(delete_x!)
# 1 method for generic function "delete_x!":
[1] delete_x!(rt) in Main at /Users/nathandaly/work/Delve/packages/Salsa/src/Salsa.jl:820
@NHDaly NHDaly added enhancement New feature or request good first issue Good for newcomers macros and removed good first issue Good for newcomers labels Oct 13, 2020
@mbravenboer
Copy link
Contributor

Yeah, great, this has been a bit confusing to me too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request macros
Projects
None yet
Development

No branches or pull requests

2 participants