Skip to content

Allow subclasses to add additional input nodes.#146

Merged
rwjblue merged 1 commit intomasterfrom
subclassing-tests
Jun 10, 2021
Merged

Allow subclasses to add additional input nodes.#146
rwjblue merged 1 commit intomasterfrom
subclassing-tests

Conversation

@rwjblue
Copy link
Copy Markdown
Member

@rwjblue rwjblue commented Jun 10, 2021

Subclassing broccoli-funnel has become somewhat common (e.g. Embroider and ember-css-modules both do it). This adds a basic test to confirm that it generally works.

Additionally, this adds the ability for the subclass to add additional nodes to be considered as part of the broccoli tree graph. This ensures that if you happen to subclass and need to read from another tree to know where to write, you can add that other tree to your inputs and be guaranteed that they will have been built before you are called. Without this change, it might seem to work sometimes but it is absolutely not guaranteed to work.

Subclassing broccoli-funnel has become somewhat common (e.g. Embroider
and ember-css-modules both do it). This adds a basic test to confirm
that it generally works.

Additionally, this adds the ability for the subclass to add additional
nodes to be considered as part of the broccoli tree graph. This ensures
that if you happen to subclass and need to read from another tree to
know where to write, you can add that other tree to your inputs and be
*guaranteed* that they will have been built before you are called.
Without this change, it _might_ seem to work **sometimes** but it is
absolutely not guaranteed to work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant