Skip to content
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

refactor: bits from the dag branch #1456

Merged
merged 7 commits into from
Jan 11, 2024
Merged

refactor: bits from the dag branch #1456

merged 7 commits into from
Jan 11, 2024

Conversation

pd93
Copy link
Member

@pd93 pd93 commented Jan 4, 2024

This PR is an assortment of cherry-picked changes from the dag branch. None of these are directly related to the dag functionality, but were made because they benefit its design. The idea being that when I (eventually) post the dag PR, the changes will be much easier to understand and only related to the dag functionality itself.

  • refactor: IncludedTaskfiles -> Includes
    • The idea of this is just that it keeps the consistency in naming with the key used in the Taskfile schema. It also means less use of variables with the word "taskfile" in them, which can get confusing because it's not actually a taskfile, but a reference to one.
  • feat: store namespace directly in Include
    • This has benefits in the dag code since the namespace is required when merging the taskfiles in the graph together and the complete Include struct can be easily stored on a graph edge. However, it also helps tidy up the code a bit without the dag code.
  • feat: Includes should use OrderedMap
    • Not really related to dag. Just a nice tidy up. No need for multiple ordered map implementations.
  • refactor: orderedmap package -> omap
    • More go-like package name IMO.
  • refactor: split read.go into taskfile.go and reader.go
    • This is very specific to the dag changes and is really only there because it will help with reading the diffs as there is a dedicated Reader in the dag branch and code was moved around.
  • refactor: move prompts into consts
  • fix: getSpecialVars

Copy link
Member

@andreynering andreynering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 👏 👏

@pd93 pd93 merged commit d2522a6 into main Jan 11, 2024
11 checks passed
@pd93 pd93 deleted the refactor branch January 11, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants