CodeTracking.jl
CodeTracking.jl copied to clipboard
It's editing-time, do you know where your methods are?
- improve coverage, simplify some tests; - update `ci.yml` (use `action@latest` where possible, and `julia-actions/cache@v1`); - julia: drop `1.0`, min is now `1.6` LTS (`JuliaInterpreter`, `Cthulhu`, `Debugger`, `Revise` ✔: this...
``` macro makefn(name) name = Symbol(name) quote $(esc(name))() = print("hello") end end julia> @makefn f f (generic function with 1 method) julia> f() hello julia> @code_string f() " \$(esc(name))() =...
When calling `definition` in a Jupyter notebook: ```julia f(x,y) = x^2 + y^2 definition(String, @which(f(Int,Int))) ``` I get the following error: `SystemError: opening file "In[52]": No such file or directory`...
Hey, this seemed nifty so I made a variant macro `@code_src` that prints a syntax-highlighted `@code_string` using OhMyREPL. I have no idea if optional dependencies are easy, or if this...
> CodeTracking [...] provides an interface for obtaining: > > the strings and expressions of method definitions > How does `CodeTracking` do the above? using CodeTracking, Revise f = x...
If a method definition occurs inside a macro, or if one uses `whereis(lineinfo, method)` and `lineinfo` corresponds to lines added by a macro, CodeTracking relies on the information in the...
```julia julia> m = which(Base.get_preferences, Tuple{Base.UUID}) get_preferences(uuid::Union{Nothing, Base.UUID}) in Base at loading.jl:2006 julia> CodeTracking.definition(String, m) ERROR: MethodError: no method matching +(::Nothing, ::Int64) Closest candidates are: +(::Any, ::Any, ::Any, ::Any...) at...
The method is defined as ```jl @eval function (P::Type{Pair{A, B}})(@nospecialize(a), @nospecialize(b)) where {A, B} @inline return $(Expr(:new, :P, :(convert(A, a)), :(convert(B, b)))) end ``` ```julia (CodeTracking) julia> method = @which...
It seems that Revise doesn't have the ability track changes functions to in CodeTracking.jl. Is this is fundamental limitation of the architecture due to CodeTracking relying on Revise, or something...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4. Release notes Sourced from codecov/codecov-action's releases. v4.0.0 v4 of the Codecov Action uses the CLI as the underlying upload. The CLI has helped to...