Task method dependencies

Description

Most major task runners have the concept of target dependencies. It would be great if we supported this via an annotation. All it is is a list of methods to call before the actual target method is called.

We already have an implicit dependency: init(), how about adding a depends annotation

This will call build(), then compile() and then if success, call all()

Activity

Show:

Luis Majano August 29, 2018 at 6:04 PM

You can but adding them to the task definition seems very elegant.

I siuld pass all arguments passed via the original target. Also you can use the variables scope as well for state.

Brad Wood August 25, 2018 at 6:45 PM

I like this idea. How would we handle a dependency that has a required non-defaulted parameter that needs passed in? Would that just not be allowed? Perhaps the parameters to the main target would get passed to all of them? I suppose the variables scope in the CFC could also just serve as a place to put variables that you wanted to "pass around" to the rest of the task.

I'll also add that a user could easily do this without an annotation by simply calling the methods:

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Assignee

Reporter

Fix versions

Priority

Components

Created August 25, 2018 at 3:54 PM
Updated September 22, 2018 at 3:21 AM
Resolved September 22, 2018 at 3:21 AM