enforce no app re-exports for engines #846
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
setting an explicit treeForApp to an no-op function will ensure that no engine components leak into host app
some context for this PR:
the way to scaffold files in an engine is the same as an addon which is the conventional way to
ember generate component|helper|util ...
this has the effect of adding files to the app re-export folder
because this doesn't cause an obvious failure in the app everything still works it's likely to be missed by users and committed to the repository
the immediate non-obvious effect of this is that engine components will be directly usable in a host app no matter the type of engine
this can lead to the re-exports being included twice in the build
This change makes it so there is no way for those files to make it into the build and brings the functionality in line with the documentation which states and so anything placed into the
app
directory of an Engine Addon will not be included in the build.This change is important for the embroider initiative with its static analysis of the all components in an app/engines/addons as we try to split the build into the correct bundles as we follow what ember-engines does today and to keep correctness of what the build does under the classic pipeline we adhere to the app-re-exports if any are present