-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 all of DS is initialized together #4823
Conversation
strange the failure seems to be uglify related... |
@stefanpenner the build seems to pass with |
More debugging has lead me to believe this line is what uglify is chocking on. https://github.com/ember-cli/loader.js/blob/master/lib/loader/loader.js#L7 I'm not sure why its getting run on the unprocessed loader.js thought. I think I'll lock Ember Data to using |
@bmac im not sure what script is running that causes that issue (haven't had a chance to look). My guess is it is pulling in loader.js directly, rather then letting the addon provide it. |
Looks like you are right. I've opened a pr with a temporary fix #4824. |
* DS object will always present fully. Today during initialization it remains partially initializers for a period (missing everything from https://github.com/emberjs/data/blob/master/addon/index.js#L91-L154) * this also fixes the (unknown mixin) stuff for all DS classes Although this does force the entire DS namespaces to be initialized immediately. This shouldn’t cause a performance issue, as it the full namespace was always initialized, just in two phases.
9f99405
to
d8f6c4d
Compare
@bmac rebased on-top of your fix. |
The global build of ember-data has been broken since emberjs#4823. When `ember-data.js is loaded, the following error is occured: ``` Uncaught Error: Could not find module `ember-data/index` imported from `ember-data/initializers/ember-data` ``` A reproduction code is just simple: ``` <!DOCTYPE html> <html> <head> <script src="http://builds.emberjs.com/tags/v2.13.1/ember.prod.js"></script> <script src="http://builds.emberjs.com/tags/v2.14.3/ember-data.js"></script> </head> <body> <h1>Hello, Ember!</h1> </body> </html> ``` The reason of this error is that the broccoli builds the module named "*/index" into `*` for global build. But loader.js couldn't resolve `ember-data/index` as `ember-data`. So the `ember-data/index` module should be to as just `ember-data` to be compatible with NPM package and global.
The global build of ember-data has been broken since emberjs#4823. When `ember-data.js` is loaded, the following error is occured: ``` Uncaught Error: Could not find module `ember-data/index` imported from `ember-data/initializers/ember-data` ``` A reproduction code is just simple: ``` <!DOCTYPE html> <html> <head> <script src="http://builds.emberjs.com/tags/v2.13.1/ember.prod.js"></script> <script src="http://builds.emberjs.com/tags/v2.14.3/ember-data.js"></script> </head> <body> <h1>Hello, Ember!</h1> </body> </html> ``` The reason of this error is that the broccoli builds the module named "*/index" into `*` for global build. But loader.js couldn't resolve `ember-data/index` as `ember-data`. So the `ember-data/index` module should be to as just `ember-data` to be compatible with NPM package and global.
The global build of ember-data has been broken since emberjs#4823. When `ember-data.js` is loaded, the following error is occured: ``` Uncaught Error: Could not find module `ember-data/index` imported from `ember-data/initializers/ember-data` ``` A reproduction code is just simple: ``` <!DOCTYPE html> <html> <head> <script src="http://builds.emberjs.com/tags/v2.13.1/ember.prod.js"></script> <script src="http://builds.emberjs.com/tags/v2.14.3/ember-data.js"></script> </head> <body> <h1>Hello, Ember!</h1> </body> </html> ``` The reason of this error is that the broccoli builds the module named "*/index" into `*` for global build. But loader.js couldn't resolve `ember-data/index` as `ember-data`. So the `ember-data/index` module should be to as just `ember-data` to be compatible with NPM package and global.
The global build of ember-data has been broken since #4823. When `ember-data.js` is loaded, the following error is occured: ``` Uncaught Error: Could not find module `ember-data/index` imported from `ember-data/initializers/ember-data` ``` A reproduction code is just simple: ``` <!DOCTYPE html> <html> <head> <script src="http://builds.emberjs.com/tags/v2.13.1/ember.prod.js"></script> <script src="http://builds.emberjs.com/tags/v2.14.3/ember-data.js"></script> </head> <body> <h1>Hello, Ember!</h1> </body> </html> ``` The reason of this error is that the broccoli builds the module named "*/index" into `*` for global build. But loader.js couldn't resolve `ember-data/index` as `ember-data`. So the `ember-data/index` module should be to as just `ember-data` to be compatible with NPM package and global.
The global build of ember-data has been broken since #4823. When `ember-data.js` is loaded, the following error is occured: ``` Uncaught Error: Could not find module `ember-data/index` imported from `ember-data/initializers/ember-data` ``` A reproduction code is just simple: ``` <!DOCTYPE html> <html> <head> <script src="http://builds.emberjs.com/tags/v2.13.1/ember.prod.js"></script> <script src="http://builds.emberjs.com/tags/v2.14.3/ember-data.js"></script> </head> <body> <h1>Hello, Ember!</h1> </body> </html> ``` The reason of this error is that the broccoli builds the module named "*/index" into `*` for global build. But loader.js couldn't resolve `ember-data/index` as `ember-data`. So the `ember-data/index` module should be to as just `ember-data` to be compatible with NPM package and global. (cherry picked from commit 17bf1b7)
The global build of ember-data has been broken since #4823. When `ember-data.js` is loaded, the following error is occured: ``` Uncaught Error: Could not find module `ember-data/index` imported from `ember-data/initializers/ember-data` ``` A reproduction code is just simple: ``` <!DOCTYPE html> <html> <head> <script src="http://builds.emberjs.com/tags/v2.13.1/ember.prod.js"></script> <script src="http://builds.emberjs.com/tags/v2.14.3/ember-data.js"></script> </head> <body> <h1>Hello, Ember!</h1> </body> </html> ``` The reason of this error is that the broccoli builds the module named "*/index" into `*` for global build. But loader.js couldn't resolve `ember-data/index` as `ember-data`. So the `ember-data/index` module should be to as just `ember-data` to be compatible with NPM package and global. (cherry picked from commit 17bf1b7)
Although this does force the entire DS namespaces to be initialized immediately. This shouldn’t cause a performance issue, as it the full namespace was always initialized, just in two phases.