Skip to content

Phase final necessity and ability for phases to expose providers for downstream targets #917

Closed
@ittaiz

Description

@ittaiz

@borkaehw @andyscott while working on #916 I started wondering about the motivation behind run_phases returning the global provider and then having the rules call .final?
The cons I see are that every rule needs to "remember" to call .final and additionally custom external phases cannot expose providers for downstream targets.
Is the latter by design?

I have a hunch that if we change the phase return value contract to be 2 dicts where one is of "internal providers" (similar to today but more typed and explicit) and a dict of "external providers" and then run_phases just returns the values of this dict then rules can just return the output from run_phases (one less thing to remember) and additionally we'll be allowing phases to expose providers (currently this isn't an option). WDYT?
I'm saying dict to allow phases to override providers of previous phases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions