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

[Feature] Add MU support for model and model-test blueprints #5491

Merged
merged 2 commits into from
Sep 26, 2018
Merged

[Feature] Add MU support for model and model-test blueprints #5491

merged 2 commits into from
Sep 26, 2018

Conversation

dcyriller
Copy link
Contributor

This PR aims at providing MU support for this ember-cli command: ember generate model foo.

It is a part of this quest issue: ember-cli/ember-cli#7530

Heavily inspired by #5476

@dcyriller dcyriller changed the title [Feature] Add model and model-test MU support [Feature] Add model and model-test blueprints MU support Jun 14, 2018
@dcyriller dcyriller changed the title [Feature] Add model and model-test blueprints MU support [Feature] Add MU support or model and model-test blueprints Jun 14, 2018
@dcyriller dcyriller changed the title [Feature] Add MU support or model and model-test blueprints [Feature] Add MU support for model and model-test blueprints Jun 14, 2018
@dcyriller
Copy link
Contributor Author

In CI, ember-canary scenario is failing. It seems related to an upgrade of ember-canary version as every recent PR is failing on this test:

112) [Chrome 67.0] integration/adapter/build-url-mixin - BuildURLMixin with RESTAdapter: buildURL - buildURL takes the records from findMany
     Died on test #1     at Module.callback (http://localhost:7357/assets/tests.js:967:19)
    at Module.exports (http://localhost:7357/assets/vendor.js:111:32)
    at requireModule (http://localhost:7357/assets/vendor.js:32:18)
    at TestLoader.<anonymous> (http://localhost:7357/assets/test-support.js:10412:11)
    at TestLoader.require (http://localhost:7357/assets/test-support.js:10402:27)
    at TestLoader.loadModules (http://localhost:7357/assets/test-support.js:10394:16)
    at loadTests (http://localhost:7357/assets/test-support.js:11447:22): snapshots.get is not a function
     TypeError: snapshots.get is not a function
         at Class.adapter.buildURL (http://localhost:7357/assets/tests.js:973:38)
         at Class.findMany (http://localhost:7357/assets/vendor.js:89663:22)
         at _findMany (http://localhost:7357/assets/vendor.js:83754:27)
         at http://localhost:7357/assets/vendor.js:85576:15
         at Class._flushPendingFetchForType (http://localhost:7357/assets/vendor.js:85581:15)
         at Map.forEach (<anonymous>)
         at MapWithDefault.forEach (http://localhost:7357/assets/vendor.js:74318:42)
         at Class.flushAllPendingFetches (http://localhost:7357/assets/vendor.js:85460:26)
         at invoke (http://localhost:7357/assets/vendor.js:37864:24)
         at Queue.flush (http://localhost:7357/assets/vendor.js:37784:25)

Not sure how to fix it though 😕

@runspired
Copy link
Contributor

The canary test failure is a known issue; however, I recently had to skip the adapter tests this is inspired by because it turns out that the emberNew() test helper for blueprint generation does not yet have a way to turn on the module-unification flag. Once canary of ember-cli offers this ability I will happily help move this forward :)

cc @thoover @rwjblue for ember-cli cleanup

@dcyriller
Copy link
Contributor Author

dcyriller commented Jul 5, 2018

@runspired do you think that something like this would solve our issue?

It allows to do: emberNew({ isModuleUnification: true }).

@runspired
Copy link
Contributor

@dcyriller yes! Thanks for taking that on :)

@dcyriller
Copy link
Contributor Author

I'll update the PRs once it has been merged :)

package.json Outdated Show resolved Hide resolved
@dcyriller dcyriller changed the title [Feature] Add MU support for model and model-test blueprints [Feature] WIP: Add MU support for model and model-test blueprints Sep 22, 2018
@dcyriller dcyriller changed the title [Feature] WIP: Add MU support for model and model-test blueprints [Feature] Add MU support for model and model-test blueprints Sep 23, 2018
@dcyriller
Copy link
Contributor Author

@runspired this one should be ready too

@runspired runspired merged commit 67c123d into emberjs:master Sep 26, 2018
@dcyriller dcyriller deleted the mu-model-blueprint branch September 27, 2018 08:02
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