The problem I think with trying to unify generators and linkers is
coming up with a mechanism to order them. Linkers operate on output
artifacts, which means every generator for every permutation must have
been run before the linker. Linkers can be ordered, generators
currently cannot. Generators tend to be triggered, I would assume, in
AST processing order, but the same generator can be triggered multiple
times in a single permutation, and across permutations. I suppose
theoretically they could be unified, perhaps in some kind of DI/AOP
style system, but it strikes me a little like trying to unify the C
preprocessor with the C linker.

-Ray


On Mon, Nov 10, 2008 at 9:24 AM, Scott Blum <[EMAIL PROTECTED]> wrote:
> +bobv and gwtc
> This discussion needs broader distribution, guys.
>
> On Sat, Nov 8, 2008 at 10:41 AM, Toby Reyelts <[EMAIL PROTECTED]> wrote:
>>
>> I don't know much about the details of linkers, but yes, things that you
>> want to be able to read by your webapp, but not servable by your client,
>> should go under WEB-INF. That could be WEB-INF/lib or WEB-INF/classes if
>> you'd want to use the ClassLoader to get at them, or WEB-INF/<anything-else>
>> if you want to use the ServletContext to get at them.
>> Are there not larger issues here that need to also be resolved? For
>> example, don't generators need to be able to generate server code? I'm also
>> confused as to what really separates generators and linkers in terms of
>> being able to produce arbitrary content. Is the primary difference that a
>> linker can't generate new code that the GWT compiler operates on? What I'm
>> trying to get to here, is that it seems like, as the options get more
>> complex about what files you can generate and where, it might make sense to
>> unify that interface for generators and linkers (assuming they support
>> mostly the same functionality). For example, Java has a Filer API for
>> creating new files via annotation processors.
>> On Sat, Nov 8, 2008 at 2:23 AM, John Tamplin <[EMAIL PROTECTED]> wrote:
>>>
>>> Looking at the spec, it seems like the correct place for these would be a
>>> custom directory under WEB-INF, so that the servlet can obtain them but they
>>> can't be served directly to clients.
>>>
>>> As an example, LocaleListLinker produces a locale-list.txt file that I
>>> need to be able to load in my server in order to do server-side locale
>>> selection, but should not ever be served to clients.  If it were placed in
>>> WEB-INF/aux/LocaleListLinker/locale-list.txt I could load it with
>>> ServletContext.getResourceAsStream.
>>>
>>> Placing it outside the WAR directory means I have to manually copy it
>>> somewhere my servlet can get to it.
>>>
>>> --
>>> John A. Tamplin
>>> Software Engineer (GWT), Google
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to