dfdx/Espresso.jl

Espresso.jl can't be loaded on julia 0.7-DEV

Closed this issue · 4 comments

Hi, @dfdx! As @lbenet has already told you, we're using Espresso.jl for some performance-oriented improvements in TaylorIntegration.jl (see discussion in PerezHz/TaylorIntegration.jl#31). We're trying to test this PR on julia nightlies, but it seems that Espresso cannot be loaded in julia 0.7-DEV (see this comment). For reference, I will reproduce the relevant REPL output here. If I try to load Espresso on julia 0.7-DEV at the Julia REPL, I get the following:

              _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.7.0-DEV.2157 (2017-10-15 20:04 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 894b650 (0 days old master)
|__/                   |  x86_64-apple-darwin14.5.0

julia> using Espresso
INFO: Precompiling module Espresso.
WARNING: `isdefined(:symbol)` is deprecated, use `@isdefined symbol` instead
Stacktrace:
 [1] depwarn(::String, ::Symbol) at ./deprecated.jl:68
 [2] include_relative(::Module, ::String) at ./loading.jl:533
 [3] include at ./sysimg.jl:14 [inlined]
 [4] include(::String) at /Users/Jorge/.julia/v0.7/Espresso/src/Espresso.jl:4
 [5] include_relative(::Module, ::String) at ./loading.jl:533
 [6] include at ./sysimg.jl:14 [inlined]
 [7] include(::String) at /Users/Jorge/.julia/v0.7/Espresso/src/Espresso.jl:4
 [8] include_relative(::Module, ::String) at ./loading.jl:533
 [9] include(::Module, ::String) at ./sysimg.jl:14
 [10] anonymous at ./<missing>:2
 [11] eval(::Module, ::Expr) at ./sysimg.jl:53
 [12] process_options(::Base.JLOptions) at ./client.jl:307
 [13] _start() at ./client.jl:391
in expression starting at /Users/Jorge/.julia/v0.7/Espresso/src/utils.jl:4
ERROR: LoadError: LoadError: LoadError: syntax: unexpected "]"
Stacktrace:
 [1] include_relative(::Module, ::String) at ./loading.jl:533
 [2] include at ./sysimg.jl:14 [inlined]
 [3] include(::String) at /Users/Jorge/.julia/v0.7/Espresso/src/Espresso.jl:4
 [4] include_relative(::Module, ::String) at ./loading.jl:533
 [5] include at ./sysimg.jl:14 [inlined]
 [6] include(::String) at /Users/Jorge/.julia/v0.7/Espresso/src/Espresso.jl:4
 [7] include_relative(::Module, ::String) at ./loading.jl:533
 [8] include(::Module, ::String) at ./sysimg.jl:14
 [9] anonymous at ./<missing>:2
in expression starting at /Users/Jorge/.julia/v0.7/Espresso/src/to_einstein.jl:11
in expression starting at /Users/Jorge/.julia/v0.7/Espresso/src/core.jl:28
in expression starting at /Users/Jorge/.julia/v0.7/Espresso/src/Espresso.jl:115
ERROR: Failed to precompile Espresso to /Users/Jorge/.julia/lib/v0.7/Espresso.ji.
Stacktrace:
 [1] compilecache(::String) at ./loading.jl:661
 [2] _require(::Symbol) at ./loading.jl:472
 [3] require(::Symbol) at ./loading.jl:324

julia> 

Is this a known issue? Are there any workarounds?
Many thanks in advance!

dfdx commented

Hi and thanks for reporting. I haven't tested Espresso on Julia 0.7 yet, so most likely many features will be broken (especially these related to function body extraction since it heavily depends on Julia internals which seriously change in every major release). This concrete issue seems to be caused by incorrect macro expansion in (not very important) utilities. I'll try to fix it later today.

Are you on master of Espresso or some earlier commit?

Thank you for your reply! I'm on current latest master

dfdx commented

Fixed, tests are now passing on Julia 0.7-dev, though there's still a bunch of deprecation warnings.

Let me know if you have any further issues.

Many thanks!