Skip to content

scheduleBuilder should send a target when called with a context with a target #15053

Closed
@FrozenPandaz

Description

@FrozenPandaz

🚀 scheduleBuilder should send a target in the context when available

Command (mark with an x)

- [ ] new
- [x] build
- [x] serve
- [x] test
- [x] e2e
- [ ] generate
- [ ] add
- [ ] update
- [x] lint
- [x] xi18n
- [x] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Description

Scheduling a child builder through a parent builder does not pass in the target of the parent builder

Describe the solution you'd like

The child builder should receive the target of the parent builder when available.

.ie

ng build app1 uses Builder: @awesome/example:parent.

@awesome/example:parent calls scheduleBuilder('@awesome/example:child', {})

@awesome/example:child should have target: { project: 'app1', target: null } in context.

Note: Target.target is required at the moment. It could also be the target which the parent was called with but this is actually false. I can't think of a reason why someone would pass context.target into things like scheduleTarget or getBuilderName etc. but it is the same type. I guess those methods would need to handle the case where Target.target is falsy.

Describe alternatives you've considered

Have you considered any alternative solutions or workarounds?

Perhaps we could add Context.project as that's all we really want?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions