You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(On julia v1.2) I'm trying snoopcompile out for the first time. When snooping while running the tests of my package, the generated precompile file contains a lot of code with getfield(Main, Symbol("##xx#xx")), like this
julia> using MonteCarloMeasurements
[ Info: Recompiling stale cache file /local/home/fredrikb/.julia/compiled/v1.2/MonteCarloMeasurements/tHYBD.ji for MonteCarloMeasurements [0987c9cc-fe09-11e8-30f0-b96dd679fdca]
ERROR: Error while loading expression starting at /local/home/fredrikb/.julia/dev/MonteCarloMeasurements/src/MonteCarloMeasurements.jl:89
caused by [exception 1]
UndefVarError: ##28#95 not defined
Stacktrace:
[1] _precompile_() at /local/home/fredrikb/.julia/dev/MonteCarloMeasurements/src/precompile_MonteCarloMeasurements.jl:11
I guess that the line in runtests.jl that lead to this is somewhere here
Am I doing something wrong?
For reference, the code used to generate the precompile file is below
using SnoopCompile
SnoopCompile.@snoopc"/tmp/robust_opt_compiles.log"beginusing MonteCarloMeasurements, Pkg
include(joinpath(dirname(dirname(pathof(MonteCarloMeasurements))), "test", "runtests.jl"))
end
data = SnoopCompile.read("/tmp/robust_opt_compiles.log")
pc = SnoopCompile.parcel(reverse!(data[2]))
SnoopCompile.write("/tmp/precompile", pc)
The text was updated successfully, but these errors were encountered:
baggepinnen
changed the title
UndefVarError from ##xx##xx symbols not defined
UndefVarError from getfield(Main, Symbol("##xx#xx")) symbols not defined
May 11, 2019
When I first wrote this package, I didn't realize that precompilation only saves inference time. So the @snoopc mechanism, while seemingly more sophisticated, is prioritizing the wrong stuff. If you're on Julia 1.2, I highly recommend @snoopi. Personally, I then write the corresponding precompile statements manually. Note that because of the issue diagnosed in JuliaLang/julia#31466 (which is also partway towards a fix), many things fail to precompile (unfortunately).
But I will try to fix this. Those ##28##95 objects correspond to anonymous functions, and the numbering is not consistent from session to session.
(On julia v1.2) I'm trying snoopcompile out for the first time. When snooping while running the tests of my package, the generated precompile file contains a lot of code with
getfield(Main, Symbol("##xx#xx"))
, like thiswhich causes
I guess that the line in
runtests.jl
that lead to this is somewhere hereAm I doing something wrong?
For reference, the code used to generate the precompile file is below
The text was updated successfully, but these errors were encountered: