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

Production builds for addon and consuming apps are broken #64

Closed
kybishop opened this issue Dec 3, 2017 · 2 comments
Closed

Production builds for addon and consuming apps are broken #64

kybishop opened this issue Dec 3, 2017 · 2 comments

Comments

@kybishop
Copy link
Owner

kybishop commented Dec 3, 2017

@pzuraq I've bisected this down to #61:

V0.7.3

➜  ember-popper git:(5d031c5) ember b -prod
WARNING: ember-legacy-class-transform: this transform is not needed for Ember >= 2.13.0
ember-hash-helper-polyfill is not required for Ember 2.3.0 and later, please remove from your `package.json`.
ember-hash-helper-polyfill is not required for Ember 2.3.0 and later, please remove from your `package.json`.
ember-hash-helper-polyfill is not required for Ember 2.3.0 and later, please remove from your `package.json`.
ember-hash-helper-polyfill is not required for Ember 2.3.0 and later, please remove from your `package.json`.
ember-hash-helper-polyfill is not required for Ember 2.3.0 and later, please remove from your `package.json`.
ember-hash-helper-polyfill is not required for Ember 2.3.0 and later, please remove from your `package.json`.
cleaning up...
Built project successfully. Stored in "dist/".
File sizes:
 - dist/assets/dummy-0498d5344068281ae25a84205deabf7c.js: 8.63 KB (2.55 KB gzipped)
 - dist/assets/dummy-04ad0b8807db6a44a4fbc070768fcf27.css: 1.39 KB (432 B gzipped)
 - dist/assets/dummy-fastboot-5bad6a103a3f7783d3db00e9f1787319.js: 1.32 KB (677 B gzipped)
 - dist/assets/vendor-9cd6ee7f80b6324e550180c1c094ec30.js: 546.9 KB (138.52 KB gzipped)
 - dist/assets/vendor-d41d8cd98f00b204e9800998ecf8427e.css: 0 B

v0.8.0

➜  ember-popper git:(5751335) ember b -prod
WARNING: ember-legacy-class-transform: this transform is not needed for Ember >= 2.13.0
ember-hash-helper-polyfill is not required for Ember 2.3.0 and later, please remove from your `package.json`.
ember-hash-helper-polyfill is not required for Ember 2.3.0 and later, please remove from your `package.json`.
ember-hash-helper-polyfill is not required for Ember 2.3.0 and later, please remove from your `package.json`.
ember-hash-helper-polyfill is not required for Ember 2.3.0 and later, please remove from your `package.json`.
ember-hash-helper-polyfill is not required for Ember 2.3.0 and later, please remove from your `package.json`.
ember-hash-helper-polyfill is not required for Ember 2.3.0 and later, please remove from your `package.json`.
cleaning up...
Build failed.
The Broccoli Plugin: [BroccoliMergeTrees: Addon#compileAddon(ember-popper) ] failed with:
Error: ember-popper/components/ember-popper-base.js: Cannot find the path for removal, please open issue with code example and the stack trace on Github: https://github.com/ember-cli/babel-plugin-filter-imports
    at findReferenceRemovalPath (/Users/kybishop/github/ember/ember-popper/node_modules/babel-plugin-filter-imports/lib/findReferenceRemovalPath.js:19:9)
    at /Users/kybishop/github/ember/ember-popper/node_modules/babel-plugin-filter-imports/lib/removeReferences.js:34:62
    at arrayEach (/Users/kybishop/github/ember/ember-popper/node_modules/lodash/lodash.js:537:11)
    at Function.forEach (/Users/kybishop/github/ember/ember-popper/node_modules/lodash/lodash.js:9359:14)
    at removeReferences (/Users/kybishop/github/ember/ember-popper/node_modules/babel-plugin-filter-imports/lib/removeReferences.js:33:20)
    at /Users/kybishop/github/ember/ember-popper/node_modules/babel-plugin-filter-imports/lib/index.js:51:49
    at arrayEach (/Users/kybishop/github/ember/ember-popper/node_modules/lodash/lodash.js:537:11)
    at Function.forEach (/Users/kybishop/github/ember/ember-popper/node_modules/lodash/lodash.js:9359:14)
    at PluginPass.ImportDeclaration (/Users/kybishop/github/ember/ember-popper/node_modules/babel-plugin-filter-imports/lib/index.js:50:26)
    at newFn (/Users/kybishop/github/ember/ember-popper/node_modules/babel-traverse/lib/visitors.js:276:21)

The broccoli plugin was instantiated at:
    at BroccoliMergeTrees.Plugin (/Users/kybishop/github/ember/ember-popper/node_modules/broccoli-plugin/index.js:7:31)
    at new BroccoliMergeTrees (/Users/kybishop/github/ember/ember-popper/node_modules/ember-cli/node_modules/broccoli-merge-trees/index.js:16:10)
    at Function.BroccoliMergeTrees [as _upstreamMergeTrees] (/Users/kybishop/github/ember/ember-popper/node_modules/ember-cli/node_modules/broccoli-merge-trees/index.js:10:53)
    at mergeTrees (/Users/kybishop/github/ember/ember-popper/node_modules/ember-cli/lib/broccoli/merge-trees.js:85:33)
    at Class.compileAddon (/Users/kybishop/github/ember/ember-popper/node_modules/ember-cli/lib/models/addon.js:1092:12)
    at Class.treeForAddon (/Users/kybishop/github/ember/ember-popper/node_modules/ember-cli/lib/models/addon.js:746:26)
    at Class.treeForAddon (/Users/kybishop/github/ember/ember-popper/index.js:111:37)
    at Class.superWrapper [as treeForAddon] (/Users/kybishop/github/ember/ember-popper/node_modules/core-object/lib/assign-properties.js:34:20)
    at Class._treeFor (/Users/kybishop/github/ember/ember-popper/node_modules/ember-cli/lib/models/addon.js:557:33)
    at Class.treeFor (/Users/kybishop/github/ember/ember-popper/node_modules/ember-cli/lib/models/addon.js:517:21)

I'll dig into this tomorrow if you don't snag it first.

I feel like we've been bitten by this kind of thing before, but don't end up seeing it because it is contained in production-only code. I'll see about having some kind of clever test that sets a specific env which just makes sure production builds don't error.

@pzuraq
Copy link
Collaborator

pzuraq commented Dec 3, 2017

Should be fixed by ember-decorators/argument#44. Shouldn't require a patch from us since we pinned to the correct version 😄

I'll submit a PR to add the production tests too, we do it with ember-try in @ember-decorators/argument so that's probably the easiest way to do it

@kybishop
Copy link
Owner Author

kybishop commented Dec 3, 2017

fixed by #67. Thanks @pzuraq!

@kybishop kybishop closed this as completed Dec 3, 2017
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

No branches or pull requests

2 participants