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

Allow injecting tasks as dependents #188

Closed
arcivanov opened this Issue Sep 12, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@arcivanov
Contributor

arcivanov commented Sep 12, 2015

Currently when you add a @task you're limited in flexibility in where you can add it.

Unless the new task follows core plugin graph and extends a particular existing task or is invoked as a top-level task, there is no way to do this:

  • Given a graph of B->A and top-level B I want C to be dependent on A and become a dependency of B.

This would allow 3rd party plugins to augment the build graph (such as header check plugin) without the user having to add top-level tasks. I.e. pyb publish with an injection of a header check plugin will result in a header check plugin executing a task without having to specify pyb check_headers publish.

All circularity/resolution check enforcements should, naturally, stay in force.

A new construct such as @dependent("task_a", "task_b", optional("task_c", "task_d")) will be introduced.

@arcivanov arcivanov self-assigned this Sep 12, 2015

@arcivanov

This comment has been minimized.

Show comment
Hide comment
@arcivanov

arcivanov Sep 12, 2015

Contributor

@mriehl review please

Contributor

arcivanov commented Sep 12, 2015

@mriehl review please

@mriehl

This comment has been minimized.

Show comment
Hide comment
@mriehl

mriehl Sep 12, 2015

Member

Neat idea, bear with me for a few hours. I'll review today.

Member

mriehl commented Sep 12, 2015

Neat idea, bear with me for a few hours. I'll review today.

@mriehl

This comment has been minimized.

Show comment
Hide comment
@mriehl

mriehl Sep 12, 2015

Member

I'd change the name though, I think @needed_by('task_a') is more readable. Very much 👍 on the general idea, this would improve the dependency capabilities for sure.

Member

mriehl commented Sep 12, 2015

I'd change the name though, I think @needed_by('task_a') is more readable. Very much 👍 on the general idea, this would improve the dependency capabilities for sure.

@arcivanov

This comment has been minimized.

Show comment
Hide comment
@arcivanov

arcivanov Sep 12, 2015

Contributor

I was thinking of it as:

@task
@depends("task_a", optional("task_b"))
@dependent("task_c", optional("task_d"))
def new_plugin_task():
     pass

I.e. create depends / dependent cadence.

Contributor

arcivanov commented Sep 12, 2015

I was thinking of it as:

@task
@depends("task_a", optional("task_b"))
@dependent("task_c", optional("task_d"))
def new_plugin_task():
     pass

I.e. create depends / dependent cadence.

@arcivanov arcivanov modified the milestone: v0.11.2 Sep 23, 2015

@mriehl mriehl modified the milestones: v0.11.3, v0.11.2 Oct 21, 2015

arcivanov added a commit to arcivanov/pybuilder that referenced this issue Nov 20, 2015

@arcivanov arcivanov closed this in #258 Nov 20, 2015

@arcivanov arcivanov removed the in progress label Nov 20, 2015

@arcivanov arcivanov reopened this Nov 20, 2015

arcivanov added a commit to arcivanov/pybuilder that referenced this issue Nov 20, 2015

arcivanov added a commit to arcivanov/pybuilder that referenced this issue Nov 20, 2015

arcivanov added a commit to arcivanov/pybuilder that referenced this issue Nov 20, 2015

arcivanov added a commit to arcivanov/pybuilder that referenced this issue Nov 20, 2015

arcivanov added a commit to arcivanov/pybuilder that referenced this issue Nov 20, 2015

@arcivanov arcivanov closed this in #260 Nov 20, 2015

@arcivanov arcivanov removed the in progress label Nov 20, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment