tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Kemnade (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TAP5-2217) JS modules from stack are not added when COMBINE_SCRIPTS is false
Date Wed, 13 Nov 2013 07:54:23 GMT

    [ https://issues.apache.org/jira/browse/TAP5-2217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13821044#comment-13821044

Jochen Kemnade commented on TAP5-2217:

> No, the Tapestry component should always express its AMD module dependencies via @Import(module=)
or via JavaScriptSupport.require(). It can also, optionally, indicate that the module should
be loaded via a stack.

Yes, that's basically what I meant. I have to "configure" multiple things:
1. C requires M1 (via {{@Import module="C1"}})
2. M1 requires M2 (via {{require[...]}}  in the module)
3. S consists of M1 and M2 (via contribution to the {{JavaScriptStackSource}})
4. M1 can be loaded via S (via {{@Import stack="S"}})

I think the 4th step should not be inferable from the others, which leads us to ...

> Possibly we should apply the same logic that goes for libraries: if you import a module
that is part of a stack, the entire stack is imported as well.

I must admit I never really liked that behavior, but that would indeed make the 4th step redundant.

> JS modules from stack are not added when COMBINE_SCRIPTS is false
> -----------------------------------------------------------------
>                 Key: TAP5-2217
>                 URL: https://issues.apache.org/jira/browse/TAP5-2217
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.4
>            Reporter: Jochen Kemnade
>            Assignee: Howard M. Lewis Ship
>            Priority: Blocker
> When COMBINE_SCRIPTS is set to {{false}}, a stack's modules are not added. The problem
is that {{org.apache.tapestry5.internal.services.javascript.JavaScriptStackPathConstructorImpl.constructPathsForJavaScriptStack(String)}}
only adds the stack's libraries if {{combineScripts}} is {{false}}.
> The problem was introduced in `65d31852d8b4a0691a19736c672fedea9e3179e0}}, by the removal
> {code:java}
>         for (String moduleName : stack.getModules())
>         {
>             require(moduleName);
>         }
> {code}
> in {{org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.addAssetsFromStack(String)}}.

This message was sent by Atlassian JIRA

View raw message