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

[bugfix] Ensure TS blueprints are always used #253

Merged
merged 2 commits into from
Sep 7, 2018
Merged

Conversation

dfreeman
Copy link
Member

@dfreeman dfreeman commented Sep 6, 2018

This should be a quick 1.4.2 fix on the heels of 1.4.1 that just went out, which doesn't consistently emit .ts files from ember generate. It turns out init is not a safe place to do our project.addons munging, and ember-cli really isn't set up to make it simple to expose blueprints from another addon while also having your own.

Essentially:

  • we can't sneak in the blueprints addon in init, because the project's own addons array is set after all its addons have been initialized
  • we can't sneak in an additional blueprintsPath value because we need to also include our own, and every addon is allowed to return at most one
  • the includedCommands hook is a convenient (if unfortunate) spot for us to use, as we know the addons will already have been initialized (so project.addons is populated) but it has to execute before blueprint paths are actually resolved (available commands are all loaded before any one is executed)

I've also added a test case to ensure this continues working with future releases of the CLI (though the codepaths involved have been pretty stable for some time). This isn't a beautiful solution, but I'm hoping to focus efforts on moving to 2.0 where we won't need to do this at all.

Copy link
Member

@jamescdavis jamescdavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💙

@dfreeman dfreeman merged commit 61888cb into master Sep 7, 2018
@dfreeman dfreeman deleted the blueprint-setup branch September 7, 2018 02:22
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.

None yet

2 participants