Skip to content

restore addon-import logic#7731

Merged
rwjblue merged 1 commit intoember-cli:masterfrom
GavinJoyce:gj/restore-addon-import-login
Apr 3, 2018
Merged

restore addon-import logic#7731
rwjblue merged 1 commit intoember-cli:masterfrom
GavinJoyce:gj/restore-addon-import-login

Conversation

@GavinJoyce
Copy link
Contributor

@GavinJoyce GavinJoyce commented Apr 3, 2018

Fixes #7726

In my attempt to simplify a quite complex piece of code while adding an additional condition, I inadvertently modified the logic such that mainBlueprint.supportsAddon() was called in more cases that before my change. It seems that calling blueprint.supportsAddon() has some side-effects (as it calls blueprint.files()) which resulted in some blueprint code executing without having a reference to this.project: #7726

Here is the original logic:

if (noAddonBlueprint.indexOf(name) < 0 && !addonBlueprint && (mainBlueprint && mainBlueprint.supportsAddon()) && options.args[1]) {
  addonBlueprint = this.lookupBlueprint('addon-import', true);
}

This is all quite brittle, but as this code will be removed once MU takes over the world, I think it's ok to leave as is.

@GavinJoyce
Copy link
Contributor Author

CI seems to be an unrelated timeout:

screen shot 2018-04-03 at 16 53 48

screen shot 2018-04-03 at 16 54 16

@rwjblue
Copy link
Member

rwjblue commented Apr 3, 2018

Restarted that CI job

@rwjblue rwjblue merged commit def3978 into ember-cli:master Apr 3, 2018
@GavinJoyce GavinJoyce deleted the gj/restore-addon-import-login branch April 3, 2018 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants