Closed gerlero closed 1 year ago
I believe Ben, the original author, might not have the bandwidth to work on ResumableFunctions these days. Thus, I forked the repository into a new Semicoroutines.jl https://github.com/QuantumSavory/Semicoroutines.jl in order to support 1.10 and future julia versions.
@gerlero , could you consider making this pull request against the fork?
As this library is an important part of another project of mine, I plan to provide support at least for the next few years. I am certainly interested in having help from other contributors (and maybe merging things back here if ResumableFunctions.jl is revided).
A similar fork is being prepared for SimJulia
Sure enough. Thanks! I'll open the same PR against Semicoroutines.jl
Please resolve conflicts so that this can be merged.
@BenLauwens The same PR is currently open against Semicoroutines.jl (at https://github.com/QuantumSavory/Semicoroutines.jl/pull/8). If possible, I'd prefer to wait for that one to be merged there, to ensure both packages remain compatible.
@gerlero , give me a few hours to fix the tests, so we have JET and Aqua available. That might also already fix most of the merge conflicts.
@Krastanov Let me know when I can start working on the merge conflicts for this one.
Please go ahead! Tests and CI are already updated.
I guess we need to decide whether to drop support for Julia 1.2... The current LTS is 1.6, anything older is not really supported upstream either.
I support dropping it. I would go with LTS and up.
I couldn't easily figure out why that error occurs in Julia 1.2, and don't believe any additional effort would be really worth it with that Julia version. I'd be fine with dropping support for anything older than 1.6 LTS.
Let's wait until next week when we will have a more extended discussion with Ben and bring it up then. I am also in favor of dropping pre-1.6 versions.
In the meantime could you go ahead and modify the project.toml (to increase to julia 1.6 and to bump the version number for the package) and add a quick description to README in the change log section?
In the meantime could you go ahead and modify the project.toml (to increase to julia 1.6 and to bump the version number for the package) and add a quick description to README in the change log section?
Done. I've bumped just the patch component (to v0.6.3), pending/following discussion at #63, but it's up to you and others if you think this should get a different version number (e.g. 0.7 or 1.0).
all the cleanup from the move is now finished, so I am merging this. Thanks for the contribution!!!
@Krastanov thank you!
This is a basic implementation of delegation to a subgenerator inspired by PEP 380. Delegation with a plain
@yieldfrom iter
expression (i.e., no assignment on the left) should work for any iterable, whilearg = @yieldfrom f
requires thatf
is actually a@resumable
function, as I didn't find a standard mechanism for iterators to "return" values. Note that in the latter case,arg
will be assigned the return value off
: this also means that it now makes sense for a@resumable
function to also return a value, so I've removed the warning for this case.Closes #49
EDITS:
@yield_from
->@yieldfrom
(https://github.com/QuantumSavory/Semicoroutines.jl/pull/8), typo