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

feat: add support for multiple includes on a graph edge #1607

Merged
merged 4 commits into from
Apr 24, 2024

Conversation

pd93
Copy link
Member

@pd93 pd93 commented Apr 21, 2024

Fixes #1606

Allows someone to create multiple includes to/from the same Taskfiles. This was restricted when we moved to the DAG reader implementation. The DAG library we use does not support adding multiple edges between nodes. However, the problem is easily solved by changing the edge data from *ast.Include to []*ast.Include. This also allows us to easily calculate the weight (number of connections) of any edge by calculating the length of the slice.

I've also undone the changes to some of the tests that used to use multiple includes that were changed when the DAG reader was implemented.

@pd93 pd93 requested a review from andreynering April 21, 2024 21:43
errors/errors.go Show resolved Hide resolved
@pd93 pd93 merged commit f75aa1f into main Apr 24, 2024
13 checks passed
@pd93 pd93 deleted the fix-multiple-includes branch April 24, 2024 17:33
pd93 added a commit that referenced this pull request Apr 24, 2024
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.

Cannot include multiple time the same Taskfile with differents namespaces
2 participants