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

BROCCOLI_VIZ=1 ember build is broken #6579

Closed
rwjblue opened this issue Dec 17, 2016 · 1 comment
Closed

BROCCOLI_VIZ=1 ember build is broken #6579

rwjblue opened this issue Dec 17, 2016 · 1 comment

Comments

@rwjblue
Copy link
Member

rwjblue commented Dec 17, 2016

Currently, when linking against master and running BROCCOLI_VIZ=1 ember build the following error is triggered:

Build failed.
Cannot read property 'type' of undefined
TypeError: Cannot read property 'type' of undefined
    at Class._computeVizInfo (/Users/rjackson/src/open-source/ember-cli/lib/models/builder.js:96:31)
    at /Users/rjackson/src/open-source/ember-cli/lib/models/builder.js:315:26
    at tryCatch (/Users/rjackson/src/open-source/ember-cli/node_modules/rsvp/dist/rsvp.js:538:12)
    at invokeCallback (/Users/rjackson/src/open-source/ember-cli/node_modules/rsvp/dist/rsvp.js:553:13)
    at publish (/Users/rjackson/src/open-source/ember-cli/node_modules/rsvp/dist/rsvp.js:521:7)
    at flush (/Users/rjackson/src/open-source/ember-cli/node_modules/rsvp/dist/rsvp.js:2373:5)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

This was broken when we landed #6546. In #6546 we added code that assumes that resultAnnotation is passed to our Builder.prototype.build method (lib/models/builder.js#L96). This is true when our build is triggered by ember-cli-broccoli-sane-watcher due to changes upstream in ember-cli/broccoli-sane-watcher#8.

The fundamental issue is that when running ember build we do not go through ember-cli-broccoli-sane-watcher at all, and we manually invoke our Builder.prototype.build method in the build task (lib/tasks/build.js#L22) but pass in no options.

We either need to make all builds funnel through ember-cli-broccoli-sane-watcher (which seems somewhat odd when we don't want a watcher) or make our build task emit the correct result annotation.

@rwjblue
Copy link
Member Author

rwjblue commented Dec 17, 2016

Note: This does not affect BROCCOLI_VIZ=1 ember serve, which still works properly (since the .build method is invoked by ember-cli-broccoli-sane-watcher).

@rwjblue rwjblue changed the title Fix BROCCOLI_VIZ=1 ember build. BROCCOLI_VIZ=1 ember build is broken Dec 17, 2016
homu added a commit that referenced this issue Dec 19, 2016
Fix `BROCCOLI_VIZ=1 ember build`.

Ensure an annotation is passed into `Builder.prototype.build` from the build task (even when not using the watcher).

Fixes #6579.
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

1 participant