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

Add exclude list to addon dedupe logic #804

Merged
merged 1 commit into from
Apr 28, 2022

Conversation

nlfurniss
Copy link
Contributor

The following is cobbled together from a JIRA ticket, so it is a bit fragmented.

Summary

When addons try to access ember-cli-babel during the build stage, EMBER_ENGINES_ADDON_DEDUPE=true can cause this.addons to be empty. Instead of requiring addons to do something like this.addons.find(...) || this.project.addons.find(...), we should exclude ember-cli-babel from dedupe logic so it's available.

Related code in ember-engines:

mergeTrees(this.nonDuplicatedAddonInvoke('treeFor', ['vendor']), {

let trees
try {
deeplyNonDuplicatedAddon(hostAddons, this, treeName);
trees = this.addons
.filter(addon => {
if (!addon[methodName]) {
// no method to call
return false;
}
return true;
})
.map(addon => {
return addon[methodName].apply(addon, invokeArguments);
});
} finally {
restoreOriginalAddons(this);
}
return trees

cc: @rwjblue @brendenpalmer

@rwjblue rwjblue merged commit fff2f01 into ember-engines:master Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants