Skip to content

fix build html5/hybrid bug for shared mojits #813

Merged
merged 1 commit into from Nov 30, 2012

2 participants

@isao
isao commented Nov 30, 2012

this change skips processing client mojit metadata without a url (url metadata for shared/app-level mojits is in a special mojit named "Shared", not via the mojit it was packaged in.). It fixes the mojito build failure for a app with shared resources; i.e. mojito build in ./tests/func/applications/frameworkapp/common before this patch threw an error like this:

error: (outputhandler.server): { [Error: Cannot expand instance [tunnelundefined.definition], or instance.controller is undefined] code: 500 }
@isao isao fix build html5/hybrid bug for shared mojits
url metadata for shared/app-level mojits is in a
special mojit named "Shared", not via the mojit it
was packaged in.
8ea135e
@isao
isao commented Nov 30, 2012

Travis: "Executing your script (./travis/script.sh) took longer than 30 minutes and was terminated."

@idearat idearat commented on the diff Nov 30, 2012
lib/app/commands/build/shared.js
@@ -39,10 +41,15 @@ function mapDefxUris(buildmap, conf, store) {
var mojits = store.getResources('client', conf.context, {type: 'mojit'});
mojits.forEach(function (mojit) {
- var uri = mojit.url + '/definition.json';
-
- buildmap[conf.tunnelpf + uri + conf.contextqs] = uri;
- mapSpecUris(buildmap, conf, mojit.name, store);
+ var uri;
+ /* [urls] note not all client mojits are url-addressable; resources in
+ "app-level" (aka shared) mojits get uris via a special RS mojit named
+ "Shared", not via the mojit they came in */
+ if (mojit.hasOwnProperty('url')) {
+ uri = mojit.url + '/definition.json';
@idearat
idearat added a note Nov 30, 2012

In general I prefer "builders" so we avoid the assumption about whether there's a / needed or not. But +1 :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@idearat
idearat commented Nov 30, 2012

+1

@isao isao merged commit c951b7f into yahoo:develop Nov 30, 2012

1 check failed

Details default The Travis build failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.