Skip to content

Conversation

@pd93
Copy link
Member

@pd93 pd93 commented Feb 22, 2025

Call doesn't belong in the taskfile/ast package. It's not a part of the Taskfile schema. It was previously used, but has since been refactored out. Since a Call is something that the tool does, I feel it should be a part of the main task package.

In order to do this, there are a couple of other small refactors that need to be done so that we don't get circular dependency issues:

  1. Compiler needs moving into the main task package instead of being in its own internal package. Historically, Compiler was an interface with multiple implementations, but this is no longer the case, so I don't think there is a need for package anymore.
  2. FindMatchingTasks also needs to be moved from the taskfile/ast package into the main task package, but this makes sense to me anyway. The taskfile/ast package should be for the AST/paring code only, not for logic. I have moved this to a method on the Executor for now.

@pd93 pd93 requested review from andreynering and vmaerten and removed request for vmaerten February 22, 2025 18:15
@pd93 pd93 force-pushed the ast-call-to-task-package branch from 8ce72bf to d171f35 Compare February 23, 2025 18:22
@pd93 pd93 merged commit 60c8ee0 into main Feb 23, 2025
14 checks passed
@pd93 pd93 deleted the ast-call-to-task-package branch February 23, 2025 18:30
pd93 added a commit that referenced this pull request Feb 23, 2025
@pd93 pd93 added the area: package api Changes related to the usage of Task as a Go package. label Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: package api Changes related to the usage of Task as a Go package.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants