Skip to content
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 subclasses to add additional input nodes. #146

Merged
merged 1 commit into from
Jun 10, 2021
Merged

Conversation

rwjblue
Copy link
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.

None yet

1 participant