-
-
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
Run through Ember Build Pipeline #2687
Conversation
This is currently a WIP in concert with emberjs/emberjs-build#39 |
Current blocker:
Ember Build can't accept additional ES6 modules (like those found here https://github.com/emberjs/emberjs-build/blob/6b68577851a92ab989754f93ad832c14b8a54cc9/lib/get-vendored-packages.js#L13-L17) |
Hey @seanpdoyle whats the current status on this pr. Are you still blocked on importing ember-inflector? |
@bmac yes, sort of. @twokul has recently refactored some of the emberjs-build project, so I have to catch up to the work he's done there. I might have some new issues stemming from his changes, but my biggest problem has been figuring out how to properly vendor / import / concat |
@seanpdoyle - I'd be happy to do a hangout early next week to make a plan on this. |
@rwjblue 👍 feel free to connect through email, hangouts, screenhero (all seandoyle at thoughtbot.com) |
ping @rwjblue: do you have availability this week? |
243efd1
to
b096ac7
Compare
I'm running against https://github.com/seanpdoyle/emberjs-build/compare/wip-get-vendored-packages and when I visit http://localhost:4200/tests/index.html and put a breakpoint on if (!registry[name]) {
throw new Error("Could not find module " + name);
}
|
@seanpdoyle - |
i will gladly merge any commits to ember-inflector for it. as for activemodel-adapter we have made plans to extract it into its own repository. We can start work on that and transfer it to the emberjs org later if that's more convenient. |
@rwjblue do you mean in a build step, or do you mean in the actual source code at stefanpenner/ember-inflector? |
@seanpdoyle - Build step. https://github.com/emberjs/emberjs-build/blob/master/lib/htmlbars-package.js does roughly what you want (but you need to supply a |
vendoredPackages: { | ||
'loader': vendoredPackage('loader'), | ||
'ember-inflector': vendoredES6Package('ember-inflector', { | ||
libPath: 'bower_components/ember-inflector/packages/ember-inflector/lib', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rwjblue I thought this did what you're talking about in #2687 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that https://github.com/emberjs/emberjs-build/blob/master/lib/es6-vendored-package.js does not move main.js
to <package-name.js>
like the section I linked. But we should probably consolidate the htmlbarsPackage
and vendoredES6Package
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rwjblue does this section https://github.com/emberjs/emberjs-build/blob/master/lib/htmlbars-package.js#L20-L28 do the renaming through the includes
option for Funnel
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crap, I'm making this as clear as mud. This is what you need to move main
up to the main package name: https://github.com/emberjs/emberjs-build/blob/master/lib/vendored-package.js#L28-L37
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5e0122a
to
5500641
Compare
"es6-module-transpiler": "^0.9.5", | ||
"es6-module-transpiler-amd-formatter": "^0.2.4", | ||
"es6-module-transpiler-package-resolver": "^1.0.1", | ||
"emberjs-build": "file:../emberjs-build", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rwjblue this needs to be replaced, obviously, but this PR depends on emberjs/emberjs-build#65
408dee3
to
9665fdb
Compare
I'll try and tidy up the git history to tell a clearer story. |
Heres the diff of |
@seanpdoyle no source maps? |
@rwjblue how does ember proper export source maps? |
2068829
to
86a2bf0
Compare
@seanpdoyle / @twokul - emberjs-build does not currently generate sourcemaps. I am nearly finished with the migration to esperanto as the module transpiler, and we should be able to support sourcemaps for both projects once that effort is finished. |
@rwjblue I'm using this version of Any ideas? |
}); | ||
testFunctions.push(function() { | ||
return run('dist=prod&emberchannel=' + emberChannel); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rwjblue I'm trying to setup npm test
to run against debug
, prod
and min
versions of the code.
ember build
is only outputting the ember-data.debug.js
. It's skipping the .prod
and .min
versions of both ember-data
and ember-data-tests
.
I'm using this version of ember-build
.
They exist when I run ember build --environment production
, which is fine for CI where broccoli's environment is production
, but locally only the first test run will work.
ember proper doesn't seem to be doing anything differently from the ember-build
perspective.
Any ideas?
@seanpdoyle - It only generates prod and min output when running against the production environment (this ensures that dev builds are MUCH faster). So |
Looks like this is failing against canary because of too many deprecation warnings logged. https://travis-ci.org/emberjs/data/jobs/48790205 Should this PR address that? |
@rwjblue also, I can't believe I've never asked this, but is the monkey patching a test-only fix? |
@rwjblue how would I go about changing Line 7 in 6990154
loads I tried adding |
@seanpdoyle - It is available at
|
67bc1eb
to
cf14655
Compare
@rwjblue this is green depending on emberjs/emberjs-build#89 being merged |
@seanpdoyle - I do not believe that an update to emberjs-build is needed (at least, not to get qunit to load). Did you see my comment above? |
@rwjblue I did, but ember data needs (wants?) the We could probably get by without it, but that means we'd pull from |
Which unfortunately is what is happening today. I agree that changes are needed, sorry for the quick reply without digging into the reasoning more. I commented on the emberjs-build pull request with some suggestions. |
@rwjblue this is green for https://travis-ci.org/emberjs/data/jobs/56345865#L229
This change is introduced in Is there a way to silence deprecations? |
@rwjblue @fivetanley @bmac ping |
@seanpdoyle the deprecations are fixed on master in #2961 but that is not what was causing it to fail. The actual issue which was causing the failure was fixed in #2959. Can you rebase to get these updates? |
858e674
to
80513c0
Compare
@rwjblue what a time to be alive |
Looks like the windows build is failing because it's using node |
Confirm that issue is being tracked in emberjs/emberjs-build#87, but I am unsure if @stefanpenner has had time to work on it more. |
649bd92
to
3ba24bc
Compare
71c3725
to
baef116
Compare
* Share build process found in [emberjs/emberjs-build][1] * Easiest approach was to copy paste from [emberjs/ember.js][2] * In the long term, we should move common build tasks / setup to [emberjs/emberjs-build][1] * Vendor `ember-inflector` ES6 package Silence Deprecations * Use `container._registry.has` instead of `container.has` * Use `env.registry` instead of `store.container` [1]: https://github.com/emberjs/emberjs-build [2]: https://github.com/emberjs/ember.js * Resolve JSCS infractions * Move `package-manager-files` for `emberjs-build` * Pass Bower Funnels into emberjs-build * Run appveyor against node `0.10`
baef116
to
dbd988f
Compare
note to self: squashed and force pushed over (function() {
+ window.EmberDev = window.EmberDev || {};
+ EmberDev.runningProdBuild = !!QUnit.urlParams.prod;
+ // hack qunit to not suck for Ember objects
+ var originalTypeof = QUnit.jsDump.typeOf;
+ QUnit.jsDump.typeOf = function(obj) {
+ if (Ember && Ember.Object && Ember.Object.detectInstance(obj)) {
+ return "emberObject";
+ }
+ return originalTypeof.call(this, obj);
+ };
+ // raises is deprecated, but we likely want to keep it around for our es3
+ // test runs.
+ QUnit.constructor.prototype.raises = QUnit['throws'];
+ window.raises = QUnit['throws'];
+ QUnit.jsDump.parsers.emberObject = function(obj) {
+ return obj.toString();
+ };
+ var EmberDevTestHelperAssert = window.Ember.__loader.require('ember-dev/test-helper/index')['default'];
+ var setupQUnit = window.Ember.__loader.require('ember-dev/test-helper/setup-qunit')['default'];
+ var testHelpers = new EmberDevTestHelperAssert(window.Ember, EmberDev.runningProdBuild);
+ setupQUnit(testHelpers, QUnit);
+ window.module = QUnit.module;
+ // Tests should time out after 5 seconds
+ QUnit.config.testTimeout = 5000;
+ // Hide passed tests by default
+ QUnit.config.hidepassed = true; |
@stefanpenner still getting the same node Has the landscape changed at all in the last few months since I've worked on this? |
@seanpdoyle - Not that I am aware of, but we did miss you. 😸 |
@rwjblue I would love to get this merged during this pre-June 12th push. |
@rwjblue @stefanpenner new and exciting failure: › node -v
v0.10.38
› ember test
Future versions of Ember CLI will not support v0.10.38. Please update to Node 0.12 or io.js.
version: 0.2.7
Built project successfully. Stored in "/Users/Sean/src/ember-data/tmp/class-tests_dist-PTuvffjr.tmp".
dyld: lazy symbol binding failed: Symbol not found: _node_module_register
Referenced from: /Users/Sean/src/ember-data/node_modules/ember-cli/node_modules/testem/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build/Release/bufferutil.node
Expected in: dynamic lookup
dyld: Symbol not found: _node_module_register
Referenced from: /Users/Sean/src/ember-data/node_modules/ember-cli/node_modules/testem/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build/Release/bufferutil.node
Expected in: dynamic lookup
zsh: trace trap ember test |
I'm gonna go ahead and close this since ED now has been addonified. @seanpdoyle Really appreciate your work on this even though it didn't get merged 👍 |
👏 I'm glad that's the direction this library has gone. |
emberjs/emberjs-build