JuliaDiff/Diffractor.jl

Diffractor broken on Julia nightly due to https://github.com/JuliaLang/julia/pull/49113

Closed this issue · 3 comments

Running the tests gives

Diffractor.jl: Error During Test at /home/oscardssmith/.julia/dev/Diffractor/test/runtests.jl:30
  Test threw exception
  Expression: tup2(my_tuple) == (ZeroTangent(), 4)
  MethodError: no method matching replace_code_newstyle!(::Core.CodeInfo, ::Core.Compiler.IRCode, ::Int64)
  
  Closest candidates are:
    replace_code_newstyle!(::Core.CodeInfo, ::Core.Compiler.IRCode)
     @ Core compiler/ssair/legacy.jl:67
  
  Stacktrace:
    [1] transform!(ci::Core.CodeInfo, meth::Method, nargs::Int64, sparams::Core.SimpleVector, N::Int64)
      @ Diffractor ~/.julia/dev/Diffractor/src/stage1/recurse.jl:284
    [2] perform_optic_transform(ff::Type{Diffractor.∂⃖recurse{1}}, args::Any)
      @ Diffractor ~/.julia/dev/Diffractor/src/stage1/generated.jl:25
    [3] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any})
      @ Core ./boot.jl:602
    [4] ∂⃖
      @ ~/.julia/dev/Diffractor/src/stage1/generated.jl:216 [inlined]
    [5] ∂⃖
      @ ~/.julia/dev/Diffractor/src/stage1/generated.jl:66 [inlined]
    [6] (::var"#tup2#77")(f::var"#my_tuple#78")
      @ Main ~/.julia/dev/Diffractor/test/runtests.jl:20
    [7] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.10/Test/src/Test.jl:478 [inlined]
    [8] macro expansion
      @ ~/.julia/dev/Diffractor/test/runtests.jl:30 [inlined]
    [9] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.10/Test/src/Test.jl:1504 [inlined]
   [10] top-level scope
      @ ~/.julia/dev/Diffractor/test/runtests.jl:16

ok, on the very latest nightly Diffractor won't even precompile.

Precompiling environment...                                                                          
  ✗ Diffractor                                                                                       
  0 dependencies successfully precompiled in 3 seconds. 40 already precompiled.                      
                                                                                                     
ERROR: The following 1 direct dependency failed to precompile:                                       
                                                                                                     
Diffractor [9f5e2b26-1114-432f-b630-d3fe2085c51c]                                                    
                                                                                                     
Failed to precompile Diffractor [9f5e2b26-1114-432f-b630-d3fe2085c51c] to "/home/oxinabox/.julia/comp
iled/v1.10/Diffractor/jl_DZH0f0".                                                                    
ERROR: LoadError: invalid struct allocation                                                          
Stacktrace:                                                                                          
  [1] top-level scope                                                                                
    @ none:1                                                                                         
  [2] top-level scope                                                                                
    @ ~/.julia/packages/Diffractor/hsZKS/src/stage1/generated.jl:407
  [3] eval
    @ ./boot.jl:370 [inlined]
  [4] reload()
    @ Diffractor ~/.julia/packages/Diffractor/hsZKS/src/stage1/generated.jl:406
  [5] top-level scope
    @ ~/.julia/packages/Diffractor/hsZKS/src/stage1/generated.jl:422
  [6] include(mod::Module, _path::String)
    @ Base ./Base.jl:468
  [7] include(x::String)
    @ Diffractor ~/.julia/packages/Diffractor/hsZKS/src/Diffractor.jl:1
  [8] top-level scope
    @ ~/.julia/packages/Diffractor/hsZKS/src/Diffractor.jl:15
  [9] include
    @ ./Base.jl:468 [inlined]
 [10] 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, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2043
 [11] top-level scope
    @ stdin:2
in expression starting at /home/oxinabox/.julia/packages/Diffractor/hsZKS/src/stage1/generated.jl:422
in expression starting at /home/oxinabox/.julia/packages/Diffractor/hsZKS/src/Diffractor.jl:1
in expression starting at stdin:2

I may have to go back a few days.
Julia@master 5 days ago precompiles fine (tests fail with #124)

Keno commented

ok, on the very latest nightly Diffractor won't even precompile.

#123