• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaFolds / Transducers.jl / 315 / 1
93%
master: 93%

Build:
DEFAULT BRANCH: master
Ran 23 Jun 2019 10:38PM UTC
Files 10
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Jun 2019 06:55AM UTC coverage: 75.98% (-11.6%) from 87.544%
315.1

push

travis-ci-com

tkf
<a href="https://github.com/tkf/Transducers.jl/commit/<a class=hub.com/JuliaFolds/Transducers.jl/commit/74f8961fea97b746cb097b27aa5a5761e9bf4dae">74f8961fe<a href="https://github.com/JuliaFolds/Transducers.jl/commit/74f8961fea97b746cb097b27aa5a5761e9bf4dae">&quot;&gt;Do not call `complete` when reduced

Previously (&amp;lt;= v0.2.1), Transducers.jl was using

    val isa Reduced &amp;amp;&amp;amp; return reduced(complete(rf, unreduced(val)))

everywhere.  Or more precisely an equivalent macro:

    @​return_if_reduced complete(rf, val)

This actually was a bad idea because `complete` can call `next` hence
the reducing function at the &amp;quot;bottom.&amp;quot;  This violates the purpose of
`Reduced`; the reducing function must not be called after returning a
`Reduced`.  So, the correct way to do this is simply

    val isa Reduced &amp;amp;&amp;amp; return val

(I was initially doing this but it was changed to the v0.2.1 form
apparently to &quot;Improve PartitionBy&quot; </a><a class="double-link" href="https://github.com/tkf/Transducers.jl/commit/<a class="double-link" href="https://github.com/JuliaFolds/Transducers.jl/commit/12dd581158c449f23ca8b4d5d41409a83c96cf42">12dd58115</a>">12dd58115</a><a href="https://github.com/tkf/Transducers.jl/commit/74f8961fea97b746cb097b27aa5a5761e9bf4dae">.)

Fixing this requires some related changes:

* Previously, the private state of the transducers are `unwrap`&#39;ed
  during the `complete` phase.  However, now that `complete` will not
  be called always _by the transducible processes_ (e.g., `foldl`),
  the `unwrap`ping has to be done during the `next` call chain where
  the `Reduced` is created.

  This is treated by changing `wrap(rf, state, iresult::Reduced)`.

* Now that the transducible processes are not responsible for calling
  `complete`, aborting transducers must initiate `complete` for inner
  reducing functions (e.g., in `Take(4) |&gt; TakeLast(2)`, transducer
  `Take(4)` must call `complete` for `TakeLast(2)` to flush the buffer
  and invoke the downstream reducing functions).

  This change is introduced to `Take`, `TakeWhile`, and `Inject`.

620 of 816 relevant lines covered (75.98%)

70390.13 hits per line

Source Files on job 315.1
  • Tree
  • List 0
  • Changed 5
  • Source Changed 4
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 284
  • Travis Job 315.1
  • 74f8961f on github
  • Prev Job for on master (#309.2)
  • Next Job for on master (#320.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc