Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLoops loop failing on no matching length method #21

Open
KEBO80 opened this issue May 13, 2022 · 0 comments
Open

FLoops loop failing on no matching length method #21

KEBO80 opened this issue May 13, 2022 · 0 comments

Comments

@KEBO80
Copy link

KEBO80 commented May 13, 2022

The following fails for me in julia 1.7 with relevan packages:

FGenerators v0.1.4
FLoops v0.2.0
Transducers v0.4.73

MWE:

julia> using FGenerators

julia> using FLoops

julia> @fgenerator function generate123()
                  @yield 1
                  @yield 2
                  @yield 3
              end;

julia> @floop for x in generate123()
                  @show x
              end
ERROR: MethodError: no method matching length(::Transducers.AdHocFoldable{var"##generate123#foldl#291#5", NamedTuple{(), Tuple{}}})
Closest candidates are:
  length(::Union{Base.KeySet, Base.ValueIterator}) at C:\Users\k.bouwman\AppData\Local\Programs\Julia-1.7.2\share\julia\base\abstractdict.jl:58
  length(::Union{LinearAlgebra.Adjoint{T, S}, LinearAlgebra.Transpose{T, S}} where {T, S}) at C:\Users\k.bouwman\AppData\Local\Programs\Julia-1.7.2\share\julia\stdlib\v1.7\LinearAlgebra\src\adjtrans.jl:171
  length(::Union{Tables.AbstractColumns, Tables.AbstractRow}) at C:\Users\k.bouwman\.julia\packages\Tables\PxO1m\src\Tables.jl:175
  ...
Stacktrace:
 [1] amount(xs::Transducers.AdHocFoldable{var"##generate123#foldl#291#5", NamedTuple{(), Tuple{}}})
   @ SplittablesBase.Implementations C:\Users\k.bouwman\.julia\packages\SplittablesBase\gpREK\src\implementations.jl:65
 [2] transduce_assoc(xform::Transducers.IdentityTransducer, step::Transducers.AdHocRF{var"#__##oninit_function#293", typeof(identity), var"#__##reducing_function#294", typeof(identity), typeof(identity), var"#__##combine_function#295"}, init::Transducers.InitOf{Transducers.DefaultInitOf}, coll0::Transducers.AdHocFoldable{var"##generate123#foldl#291#5", NamedTuple{(), Tuple{}}}; simd::Val{false}, basesize::Nothing, stoppable::Nothing, nestlevel::Nothing)
   @ Transducers C:\Users\k.bouwman\.julia\packages\Transducers\HBMTc\src\reduce.jl:108
 [3] transduce(xf::Transducers.IdentityTransducer, rf::Function, init::Transducers.InitOf{Transducers.DefaultInitOf}, coll::Transducers.AdHocFoldable{var"##generate123#foldl#291#5", NamedTuple{(), Tuple{}}}, exc::ThreadedEx{NamedTuple{(:simd,), Tuple{Val{false}}}})
   @ Transducers C:\Users\k.bouwman\.julia\packages\Transducers\HBMTc\src\executors.jl:152
 [4] transduce(xf::Transducers.IdentityTransducer, rf::Function, init::Transducers.InitOf{Transducers.DefaultInitOf}, coll::Transducers.AdHocFoldable{var"##generate123#foldl#291#5", NamedTuple{(), Tuple{}}}, exc::Transducers.PreferParallel{NamedTuple{(:simd,), Tuple{Val{false}}}})
   @ Transducers C:\Users\k.bouwman\.julia\packages\Transducers\HBMTc\src\executors.jl:164
 [5] _fold
   @ C:\Users\k.bouwman\.julia\packages\FLoops\3ZEuy\src\reduce.jl:851 [inlined]
 [6] _fold(rf::Transducers.AdHocRF{var"#__##oninit_function#293", typeof(identity), var"#__##reducing_function#294", typeof(identity), typeof(identity), var"#__##combine_function#295"}, coll::Transducers.AdHocFoldable{var"##generate123#foldl#291#5", NamedTuple{(), Tuple{}}}, #unused#::Nothing, simd::Val{false})
   @ FLoops C:\Users\k.bouwman\.julia\packages\FLoops\3ZEuy\src\reduce.jl:849
 [7] top-level scope
   @ C:\Users\k.bouwman\.julia\packages\FLoops\3ZEuy\src\reduce.jl:829
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant