Skip to content

Loading…

removed lang dependencies from binders. #597

Closed
wants to merge 2 commits into from

3 participants

@diervo

The langs are already dependencies of the controller so we dont need it
here. It's causing the langs to get deployed always to the client.

@diervo diervo removed lang dependencies from binders.
The langs are already dependencies of the controller so we dont need it
here. It's causing the langs to get deployed always to the client.
8ce3829
@caridy

@drewfish can you comment on this?

@drewfish
Yahoo Inc. member

I agree with the idea, but the proposed code isn't quite right, since without calling _setYUIDependencies() calling _precomputeYUIDependencies() is wasted effort.

Whether we need to call _precomputeYUIDependencies() or not depends on whether we intend to keep support for dependencyCalculations:precomputed.

@diervo

But still, whatever calculation we do, the langs are not dependencies of the binder but the controller right? We should only need to ship those when the controller gets deployed.

@drewfish
Yahoo Inc. member

Yes, I agree. However, the code in this pull request isn't right.

@diervo

Ok, anyway with the Caridy changes that may be refactored somewhere else. So just to raise the error!

@diervo diervo closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 5, 2012
  1. @diervo

    removed lang dependencies from binders.

    diervo committed
    The langs are already dependencies of the controller so we dont need it
    here. It's causing the langs to get deployed always to the client.
Commits on Oct 9, 2012
  1. @diervo
Showing with 11 additions and 8 deletions.
  1. +11 −2 lib/app/addons/ac/composite.common.js
  2. +0 −6 lib/app/addons/rs/yui.server.js
View
13 lib/app/addons/ac/composite.common.js
@@ -312,16 +312,25 @@ callback({
child = children[childName];
// Create a buffer for the child
buffer[childName] = {name: childName, data: '', meta: {}};
-
// Make a new "command" that works in the context of this
// composite
newCommand = {
- instance: child,
+ instance: {
+ id: child.id,
+ action: child.action
+ },
// use action in child spec or default to index
action: child.action || 'index',
context: command.context,
params: child.params || command.params
};
+ if (child.base) {
+ newCommand.instance.base = child.base;
+ } else if (child.type) {
+ newCommand.instance.type = child.type;
+ } else {
+ throw new Error('No type or base founded');
+ }
childAdapter = new AdapterBuffer(buffer, childName,
callback);
View
6 lib/app/addons/rs/yui.server.js
@@ -427,12 +427,6 @@ YUI.add('addon-rs-yui', function(Y, NAME) {
required = Y.merge(required, viewEngineRequired);
sorted = this._precomputeYUIDependencies(langName, env, mojit, modules, required);
- for (l = 0; l < langNames.length; l += 1) {
- langName = langNames[l];
- langSorted = Y.mojito.util.copy(sorted);
- this._addLangsToSorted(env, langSorted, langName, langRess);
- this._setYUIDependencies(env, poslKey, langName, binder.yui.name, langSorted);
- }
}
}
}
Something went wrong with that request. Please try again.