Skip to content

UndefVarError: rrule not defined in 0.9.30 #317

@knuesel

Description

@knuesel

Building DynamicPPL with ChainRulesCore 0.9.30 gives the following error:

julia> using DynamicPPL
[ Info: Precompiling DynamicPPL [366bfd00-2699-11ea-058f-f148b4cae6d8]
ERROR: LoadError: LoadError: UndefVarError: rrule not defined
Stacktrace:
  [1] top-level scope
    @ ~/.julia/packages/ChainRulesCore/EU7hk/src/rule_definition_tools.jl:364
  [2] include(mod::Module, _path::String)
    @ Base ./Base.jl:386
  [3] include(x::String)
    @ DynamicPPL ~/.julia/dev/DynamicPPL/src/DynamicPPL.jl:1
  [4] top-level scope
    @ ~/.julia/dev/DynamicPPL/src/DynamicPPL.jl:123
  [5] include
    @ ./Base.jl:386 [inlined]
  [6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1213
  [7] top-level scope
    @ none:1
  [8] eval
    @ ./boot.jl:360 [inlined]
  [9] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [10] top-level scope
    @ none:1
in expression starting at /root/.julia/dev/DynamicPPL/src/compat/ad.jl:2
in expression starting at /root/.julia/dev/DynamicPPL/src/DynamicPPL.jl:1
ERROR: Failed to precompile DynamicPPL [366bfd00-2699-11ea-058f-f148b4cae6d8] to /root/.julia/compiled/v1.6/DynamicPPL/jl_7R1HqT.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
   @ Base ./loading.jl:1360
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1306
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1021
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:914
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:901

(First reported at TuringLang/DynamicPPL.jl#218)

It seems that some generated code is missing a ChainRulesCore namespace qualification. Possibly due to #308 ?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions