[WIP] Access Task sources, generates, and task maps
#2615
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Do not merge, opening for discussion
This PR was created by taking fhofherr's PR and feeding it through Cursor's AI. I don't know golang, let alone this codebase, so I was more exploring if what I was looking for would even be possible.
Specifically, I'm looking for two features:
What I mean is, when writing a simple
gcc-based target, you'll find yourself repeating a lot of code. Right now this is how you would do it:By implementing the first feature, we could instead write something like this (using this PR):
TASK_GENERATESworks a little funny because the files don't exist yet. So any globs would have to be passed in as raw strings with the glob pattern.The other feature would allow me to re-use information already in the Taskfile in other targets, for example (and this is not implemented correctly in this PR):
This is partially implemented in this PR by exposing a Task's mapping in a for loop as such:
I'm very invested in this feature (my team is looking to migrate away from our Makefile-hell), so anything I can do to help out with this, I'm here for!