Closed GoogleCodeExporter closed 9 years ago
The NPE needs to be fixed, but running the linker in your non-gadgets module is
to be
expected. Inheriting the "Gadgets" module in your normal entry point causes the
gadget linker to be invoked (there's an <add-linker> line in that module)
Original comment by galgwt.reviews@gmail.com
on 7 Dec 2008 at 9:49
But, from a conceptual viewpoint, is it correct to have the gadget linker added
unconditionally as soon as the gadgets module is inherited? I mean it looks
unnecessary to me to invoke the gadget linker in some cases (like the case that
the
NPE occurs). I would think that a better decision point whether the gadget
linker
should be invoked or not would be based on whether the entrypoint extends the
Gadget
class or not (again conceptually; don't know about the technical feasibility)
Original comment by rintc...@gmail.com
on 8 Dec 2008 at 2:18
When you compile a GWT module, there is only one linker used to generate your
output
classes. If you want 2 different outputs, then you'll have to compile two
different
modules.
An EntryPoint class just a class that gets invoked when the module is loaded.
There
can be many of them in a module. The Gadget class and Gadget linker is invoked
to
create output files that are suitable for uploading as a gadgets. When you
inherit
the Gadget module, the assumption is made that you are are compiling a gadget.
The
Gadget class is completely useless otherwise.
Original comment by galgwt.reviews@gmail.com
on 8 Dec 2008 at 2:47
Ok, that's clear, apart from the sentence "When you inherit the Gadget module,
the
assumption is made that you are are compiling a gadget". I assumed that fixing
the
NPE would automatically support my use case (which I think is the simplest
solution
when several linkers need to be invoked), but that sentence makes me doubt about
this. In my project setup I am forced to inherit the Gadget module also from my
non-gadget module, otherwise the compiler fails (both modules share the same
source
roots).
After this bug is fixed, can I keep this project setup or do I need to change
it?
Original comment by rintc...@gmail.com
on 8 Dec 2008 at 3:30
Unfortunately, currently you cannot keep this setup, because the GWT compiler
can
only invoke one linker. You could move your Gadget specific code to a separate
source path, and then add the gadget specific sources into a second module
using a
<source> tag in your module gwt.xml. Then, you could compile 2 different
modules,
with the second inheriting the "Gadgets" module and overriding the standard
linker
with the gadgets linker.
Original comment by galgwt.reviews@gmail.com
on 8 Dec 2008 at 4:02
Oh, that's a pity. But thanks for your explanation.
Original comment by rintc...@gmail.com
on 9 Dec 2008 at 8:24
http://galgwt-reviews.appspot.com/1220/show
Original comment by galgwt.reviews@gmail.com
on 11 Dec 2008 at 8:01
Original comment by galgwt.reviews@gmail.com
on 11 Dec 2008 at 9:23
Fixed in gwt-gadgets-1.0.2
Original comment by galgwt.reviews@gmail.com
on 21 Feb 2009 at 1:33
Original issue reported on code.google.com by
rintc...@gmail.com
on 5 Dec 2008 at 6:03