ember-cli-deploy / ember-cli-deploy-revision-data

An ember-cli-plugin to create a unique revision key for the build
MIT License
21 stars 58 forks source link

Broken with broccoli-asset-rev 2.1.x #11

Closed lukemelia closed 9 years ago

lukemelia commented 9 years ago

This plugin has a dev dependency on broccoli-asset-rev, which means that the version of broccoli-asset-rev accessed at runtime will likely depend on the version used by the containing app. Something about broccoli-asset-rev 2.1.x results in:

+- didBuild
|  |
|  +- revision-key
|    - creating revision key using `file-hash`
|    - Error: broccoli-filter must be passed an inputNode, instead it received `undefined`
|
+- didFail
Error: broccoli-filter must be passed an inputNode, instead it received `undefined`
Error: broccoli-filter must be passed an inputNode, instead it received `undefined`
    at Fingerprint.Filter (/Users/chrislopresto/p/yappbox/projects/account/node_modules/broccoli-asset-rev/node_modules/broccoli-filter/index.js:17:11)
    at new Fingerprint (/Users/chrislopresto/p/yappbox/projects/account/node_modules/broccoli-asset-rev/lib/fingerprint.js:17:10)
    at /Users/chrislopresto/p/yappbox/projects/account/node_modules/ember-cli-deploy-lightning-pack/node_modules/ember-cli-deploy-revision-key/lib/key-generators/file-hash.js:32:23
    at lib$rsvp$$internal$$tryCatch (/Users/chrislopresto/p/yappbox/projects/account/node_modules/ember-cli-deploy-lightning-pack/node_modules/ember-cli-deploy-revision-key/node_modules/rsvp/dist/rsvp.js:493:16)
    at lib$rsvp$$internal$$invokeCallback (/Users/chrislopresto/p/yappbox/projects/account/node_modules/ember-cli-deploy-lightning-pack/node_modules/ember-cli-deploy-revision-key/node_modules/rsvp/dist/rsvp.js:50
5:17)
    at lib$rsvp$$internal$$publish (/Users/chrislopresto/p/yappbox/projects/account/node_modules/ember-cli-deploy-lightning-pack/node_modules/ember-cli-deploy-revision-key/node_modules/rsvp/dist/rsvp.js:476:11)
    at Object.lib$rsvp$asap$$flush [as _onImmediate] (/Users/chrislopresto/p/yappbox/projects/account/node_modules/ember-cli-deploy-lightning-pack/node_modules/ember-cli-deploy-revision-key/node_modules/rsvp/dist
/rsvp.js:1198:9)
    at processImmediate [as _immediateCallback] (timers.js:354:15)|
Pipeline aborted

My recommendation is that we pull in an isolated implementation of fingerprinting rather than depend broccoli-asset-rev.

achambers commented 9 years ago

Sounds fair @lukemelia. That would mean we could pluginerize it too. On Mon, 3 Aug 2015 at 17:13 Luke Melia notifications@github.com wrote:

This plugin has a dev dependency on broccoli-asset-rev, which means that the version of broccoli-asset-rev accessed at runtime will likely depend on the version used by the containing app. Something about broccoli-asset-rev 2.1.x results in:

+- didBuild +- revision-key - creating revision key using file-hash - Error: broccoli-filter must be passed an inputNode, instead it received undefined

+- didFail Error: broccoli-filter must be passed an inputNode, instead it received undefined Error: broccoli-filter must be passed an inputNode, instead it received undefined at Fingerprint.Filter (/Users/chrislopresto/p/yappbox/projects/account/node_modules/broccoli-asset-rev/node_modules/broccoli-filter/index.js:17:11) at new Fingerprint (/Users/chrislopresto/p/yappbox/projects/account/node_modules/broccoli-asset-rev/lib/fingerprint.js:17:10) at /Users/chrislopresto/p/yappbox/projects/account/node_modules/ember-cli-deploy-lightning-pack/node_modules/ember-cli-deploy-revision-key/lib/key-generators/file-hash.js:32:23 at lib$rsvp$$internal$$tryCatch (/Users/chrislopresto/p/yappbox/projects/account/node_modules/ember-cli-deploy-lightning-pack/node_modules/ember-cli-deploy-revision-key/node_modules/rsvp/dist/rsvp.js:493:16) at lib$rsvp$$internal$$invokeCallback (/Users/chrislopresto/p/yappbox/projects/account/node_modules/ember-cli-deploy-lightning-pack/node_modules/ember-cli-deploy-revision-key/node_modules/rsvp/dist/rsvp.js:50 5:17) at lib$rsvp$$internal$$publish (/Users/chrislopresto/p/yappbox/projects/account/node_modules/ember-cli-deploy-lightning-pack/node_modules/ember-cli-deploy-revision-key/node_modules/rsvp/dist/rsvp.js:476:11) at Object.lib$rsvp$asap$$flush as _onImmediate at processImmediate as _immediateCallback| Pipeline aborted

My recommendation is that we pull in an isolated implementation of fingerprinting rather than depend broccoli-asset-rev.

— Reply to this email directly or view it on GitHub https://github.com/zapnito/ember-cli-deploy-revision-key/issues/11.

dschmidt commented 9 years ago

Fwiw I locked the dependency down to 2.0.6 in my package.json and it works again. Maybe it's worth submitting that change until a proper fix lands?

lukemelia commented 9 years ago

I guess the solution would be to make broccoli-asset-rev a dependency of this plugin (instead of a devDependency) with a locked down version?

dschmidt commented 9 years ago

I don't know too well how npm/node handle these things but sounds about right

ghedamat commented 9 years ago

confirm that the fix from @dschmidt works for now but yeah, it's probably not good long term