JuliaLabs / Cassette.jl

Overdub Your Julia Code
Other
371 stars 35 forks source link

Something with tagging is broken in 1.4 #165

Closed KristofferC closed 4 years ago

KristofferC commented 4 years ago

The tests now fail on 1.4 with e.g.

@context VATupleCtx
x = rand(5)
ctx = enabletagging(VATupleCtx(), 1)
result = @run overdub(ctx, broadcast, sin, x)

with

ERROR: MethodError: no method matching iterate(::Tuple{Array{Float64,1}}, ::Tuple{Array{Float64,1},Int64})
Closest candidates are:
  iterate(::Core.SimpleVector, ::Any) at essentials.jl:603
  iterate(::ExponentialBackOff, ::Any) at error.jl:253
  iterate(::Base.MethodList, ::Any...) at reflection.jl:854
  ...
Stacktrace:
 [1] overdub(::Cassette.Context{nametype(VATupleCtx),Nothing,Cassette.Tag{nametype(VATupleCtx),0xfddc2783aa6f0228,Nothing},Cassette.var"##PassType#255",IdDict{Module,Dict{Symbol,Cassette.BindingMeta}},Nothing}, ::typeof(Core._apply_iterate), ::typeof(iterate), ::Tuple{typeof(Base.Broadcast.broadcasted),Tuple{typeof(sin)},Tuple{Array{Float64,1}}}) at /home/kc/JuliaPkgs/Cassette.jl/src/context.jl:264
 [2] overdub(::Cassette.Context{nametype(VATupleCtx),Nothing,Cassette.Tag{nametype(VATupleCtx),0xfddc2783aa6f0228,Nothing},Cassette.var"##PassType#255",IdDict{Module,Dict{Symbol,Cassette.BindingMeta}},Nothing}, ::Tuple{typeof(broadcast),typeof(sin),Array{Float64,1}}) at broadcast.jl:758

It seems this got introduced in https://github.com/jrevels/Cassette.jl/pull/158.

vchuravy commented 4 years ago

Fixed in #172, but also the reason why overdubbing iterate is not enabled yet.