jez / bask

:sunglasses: Bask in the convenience of a task runner for bash
Other
58 stars 4 forks source link

Run dependency-tasks only once #5

Closed Nebukadneza closed 6 years ago

Nebukadneza commented 6 years ago

In a scenario where running A depends on B and C, and B depends on C, bask would run C, B, C, A. This commit introduces a very naïve dependency-task-tracking that runs tasks only once if they’re run as a dependency.

jez commented 6 years ago

Hey @Nebukadneza! Thanks for opening this.

The thing I like about bask is that tasks map 1-to-1 with functions that will run. Skipping tasks would break this invariant.

If you're starting to need actual dependency management, you might want to look into a more fully-featured build system (i.e., one that actually constructs a dependency graph of the targets to run). make in particular is really good at this.

Best of luck!