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 release] Add blueprints to ember-data package. #6241

Merged
merged 2 commits into from
Jul 19, 2019

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Jul 11, 2019

In 3.11 ember-data migrated its blueprints to belong to the specific packages that they operate on. Unfortunately, ember-cli (at least as of 3.12) only supports discovering blueprints from addons that are direct dependencies or devDependencies of the project.

This adds re-exports for each of the blueprints from the top level ember-data package in order to make ember g model (and friends) work properly when the project depends on ember-data and not the individual @ember-data/* packages themselves.

@rwjblue rwjblue requested review from runspired and igorT July 11, 2019 04:13
@rwjblue
Copy link
Member Author

rwjblue commented Jul 11, 2019

The failures here seem related to my changes, will have to dig in and figure out whats going on...

In 3.11 ember-data migrated its blueprints to belong to the specific
packages that they operate on. Unfortunately, ember-cli (at least as of
3.12) only supports discovering blueprints from addons that are direct
dependencies or devDependencies of the project.

This adds re-exports for each of the blueprints from the top level
`ember-data` package in order to make `ember g model` (and friends) work
properly when the project depends on `ember-data` and not the individual
`@ember-data/*` packages themselves.
@runspired runspired force-pushed the top-level-blueprints branch from 262724b to c8d8c04 Compare July 18, 2019 22:22
@igorT
Copy link
Member

igorT commented Jul 19, 2019

I tested this locally, seems to work

@runspired
Copy link
Contributor

Created an issue since we are skipping the CI tests to unblock: #6263

@runspired runspired merged commit 4bb2c6c into emberjs:master Jul 19, 2019
@jelhan
Copy link
Contributor

jelhan commented Jul 22, 2019

This still seem to be broken in [email protected] . ember g model my-model, ember g adapter my-adapter, ember g serializer my-serializer aren't generating any file. Wasn't this one included in 3.11.2?

It's also broken in [email protected]. For that one it throws an Unknown blueprint: model error.

Have used [email protected] for both tests.

@runspired
Copy link
Contributor

@jelhan likely you aren't picking up 3.11.2 for some reason.

❯ yarn why ember-data                                             ~/Github/test-app  master ●
yarn why v1.15.2
[1/4] 🤔  Why do we have the module "ember-data"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "[email protected]"
info Has been hoisted to "ember-data"
info This module exists because it's specified in "devDependencies".
info Disk size without dependencies: "692KB"
info Disk size with unique dependencies: "9.23MB"
info Disk size with transitive dependencies: "72.33MB"
info Number of shared dependencies: 167
✨  Done in 1.41s.
❯ ember g model my-model                                          ~/Github/test-app  master ●
installing model
installing model-test
❯ ember g adapter my-adapter                                      ~/Github/test-app  master ●
installing adapter
installing adapter-test
❯ ember g serializer my-serializer                                ~/Github/test-app  master ●
installing serializer
installing serializer-test

@runspired
Copy link
Contributor

hrm, actually while the generators run successfully no files appear 🤔

@Gaurav0
Copy link
Contributor

Gaurav0 commented Jul 23, 2019

This should fix it: #6274

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.

5 participants