-
-
Notifications
You must be signed in to change notification settings - Fork 763
feat: iterators #1798
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
feat: iterators #1798
Conversation
021b258 to
48788c9
Compare
9322d62 to
6d79903
Compare
taskfile/ast/graph.go
Outdated
| } | ||
|
|
||
| _ = rootVertex.Taskfile.Tasks.Range(func(name string, task *Task) error { | ||
| // TODO: I don't think this is necessary anymore |
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.
Do you want to resolve / check this TODO in another PR ?
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.
This was a note to myself and I just forgot to come back to it. Task.Task is populated when the Tasks parent type is decoded so this is no longer needed. I've rebased the PR and removed this section.
This is a follow-up to #1797 and #1972 which adds support for iterators in our codebase. This tidies up a lot of code (We have a lot of
Rangefunctions) and makes control-flow a bit easier in loops.I have also slightly refactored the
sortpackage to be slightly more generic and use a function type rather than an interface. The interface was not necessary and increased the code complexity.This is a Go 1.23 feature which requires a bump to our minimum Go version hence the draft PR (Obviously the tests will fail as Go 1.24 does not currently exist).Done.