-
Notifications
You must be signed in to change notification settings - Fork 4
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
Deprecate nextRunList(), new target platforms and more #20
Conversation
Hello @Myshkouski!
You can ignore Sonar warning except a one (related to this comment). |
Also, should we also deprecate |
@Myshkouski could you also change |
Changed getter implementation in 76f9e59. If you are not actually require I'll deprecate it in next pull requests. |
Updated in 238411f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting for build.gradle.kts
revert and version
and README
update.
deprecate 'nextRunList' method
So, I fixed the action.
CC: @Myshkouski |
Remaining steps:
CC: @Myshkouski |
Done:
|
@@ -102,6 +103,6 @@ builder.years(2021..2025) | |||
println(builder.expression) // 0/10 5-25 5,12 ? * SUN#5 2021-2025 | |||
``` | |||
### Current status | |||
This library is on beta version `0.8.0`. | |||
This library is on beta version `0.9.0`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -10,6 +10,7 @@ import io.kotest.matchers.shouldBe | |||
import kotlinx.datetime.* | |||
import kotlin.test.Test | |||
|
|||
@OptIn(DelicateIterableApi::class) | |||
class BuilderTests { | |||
|
|||
@Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add new test where expression will start from 2050
, for example, but asIterable()
will be called from 2060
.
@Myshkouski almost there. |
|
Approved! |
Changelog:
nextRunList()
returnsList<LocalDateTime>
and doesn't allow to specify datetime to start iterate with, so there is no way to get results for specific period (i.e. "return next run list for period starting from2050-01-01T10:00:00
to2050-01-01T11:00:00
").asIterable(start: LocalDateTime)
gives some advantages:- now you could specify start datetime to start iterate from and collect result untill some end date (i.e.
cronBuilder.asIterable(someStartDateTime).takeWhile { dateTime -> dateTime < someEndDateTime }
);- no need to store all values in a list by calling
cronBuilder.asIterable(someStartDateTime).asSequence()
;