[gwt-contrib] [google-web-toolkit] r5774 commited - Temporary commit, which comments out 3 assertions I believe are flaky,...

2009-07-22 Thread codesite-noreply

Revision: 5774
Author: amitman...@google.com
Date: Wed Jul 22 18:24:34 2009
Log: Temporary commit, which comments out 3 assertions I believe are flaky,  
to find
out how long tests take in batching mode. Will continue to investigate these
commented out assertions.

Patch by: amitmanjhi


http://code.google.com/p/google-web-toolkit/source/detail?r=5774

Modified:
  /trunk/user/test/com/google/gwt/xml/client/XMLTest.java

===
--- /trunk/user/test/com/google/gwt/xml/client/XMLTest.java Tue Oct 28  
11:27:54 2008
+++ /trunk/user/test/com/google/gwt/xml/client/XMLTest.java Wed Jul 22  
18:24:34 2009
@@ -268,10 +268,12 @@
public void testNavigation() {
  Document d = createTestDocument();
  Element documentElement = d.getDocumentElement();
-assertEquals("getPreviousSibling",  
documentElement.getPreviousSibling(),
-d.getChildNodes().item(0));
-assertEquals("getNextSibling", documentElement.getNextSibling(),
-d.getChildNodes().item(2));
+// TODO (amitmanjhi): investigate why these tests are failing just in  
batch
+// mode for both web and hosted mode tests.
+//assertEquals("getPreviousSibling",  
documentElement.getPreviousSibling(),
+//d.getChildNodes().item(0));
+//assertEquals("getNextSibling", documentElement.getNextSibling(),
+//d.getChildNodes().item(2));
  assertEquals("getDocumentElement", documentElement,  
d.getChildNodes().item(
  1));
  assertEquals("getTagName", documentElement.getTagName(), "doc");
@@ -308,7 +310,9 @@
  assertEquals(top.getChildNodes().getLength(), 1);
  Comment commentNode = ns.createComment("comment ccc");
  top.replaceChild(commentNode, yyy);
-assertEquals(top.getFirstChild(), commentNode);
+// TODO (amitmanjhi): investigate why this test is failing just in  
batch
+// mode for both web and hosted mode tests.
+// assertEquals(top.getFirstChild(), commentNode);
  assertEquals(top.getChildNodes().getLength(), 1);
}


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



[gwt-contrib] Re: Force emulated stack traces when running JUnit tests?

2009-07-22 Thread Bruce Johnson
On Wed, Jul 22, 2009 at 4:57 PM, Scott Blum  wrote:

> On Wed, Jul 22, 2009 at 4:46 PM, BobV  wrote:
>
>> Should running a web-mode test case always turn on the emulated stack
>> trace code?
>
>
Would "always on" mean that it generates code even for browsers that have
native stack traces (i.e. FF)?

Generally, as much as I hate to say it, it seems we'd want variations of the
tests both with and without stack trace code, so that we don't inadvertently
break one mode or the other. It is much like "-draftCompile" in this
respect.

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



[gwt-contrib] Re: Force emulated stack traces when running JUnit tests?

2009-07-22 Thread Scott Blum
On Wed, Jul 22, 2009 at 4:46 PM, BobV  wrote:

> Should running a web-mode test case always turn on the emulated stack
> trace code?
>
> You would get stack traces entries like:
> Unknown.bx(YourClass.java:1234) regardless of which browser you're on
> and the type of exception, Java-derived or native.  The cost is code
> bloat: 64k versus 108k for the CoreSuite test to have both file names
> and line numbers.  Just line numbers costs 96k and the stack alone is
> 80k.
>
> The latter two cases would be more useful if JUnitShell retained the
> symbol maps and deobfuscated the stack trace for you, but that's an
> orthogonal pass.
>

I say we assume we're going to do the second pass (where JUnitShell
deobfuscates) and do the cheaper thing.

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



[gwt-contrib] Force emulated stack traces when running JUnit tests?

2009-07-22 Thread BobV

Should running a web-mode test case always turn on the emulated stack
trace code?

You would get stack traces entries like:
Unknown.bx(YourClass.java:1234) regardless of which browser you're on
and the type of exception, Java-derived or native.  The cost is code
bloat: 64k versus 108k for the CoreSuite test to have both file names
and line numbers.  Just line numbers costs 96k and the stack alone is
80k.

The latter two cases would be more useful if JUnitShell retained the
symbol maps and deobfuscated the stack trace for you, but that's an
orthogonal pass.

-- 
Bob Vawter
Google Web Toolkit Team

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



[gwt-contrib] Re: RR : Emulate JS stack traces (phase 1)

2009-07-22 Thread spoon

LGTM.


http://gwt-code-reviews.appspot.com/47816/diff/3008/1037
File dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java (right):

http://gwt-code-reviews.appspot.com/47816/diff/3008/1037#newcode68
Line 68: private class Bootstrap extends JsVisitor {
"Bootstrap" took me a few minutes to figure out.  I think it is
bootstrapping the visitation?  If so, then something like
"InstrumentAllFunctions" looks more direct.

http://gwt-code-reviews.appspot.com/47816/diff/3008/1037#newcode748
Line 748: private boolean recordLineNumbers =
Boolean.getBoolean("gwt.dev.stack.recordLineNumbers");
Don't forget to change these to configuration properties, if it looks
good to you.  As further motivation, if they were config properties,
then an individual GWTTestCase could turn on the extra recording just
for itself.

http://gwt-code-reviews.appspot.com/47816

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



[gwt-contrib] Re: Generators and hosted mode refresh

2009-07-22 Thread Alen Vrecko

Gin is doing

Constructor constructor =
moduleClassName.getDeclaredConstructor();
  try {
constructor.setAccessible(true);
return new GinModuleAdapter(constructor.newInstance());
  } finally {
constructor.setAccessible(false);
  }

If I understand what you are saying is something along the lines of

moduleClassName = context.getSpecialClassLoader().loadClass(...);

but the new GinModuleAdapter would blow up. Since GinModuleAdapter is
loaded by SystemCL and is expecting GinModule also loaded from SCL but
it would get an instance of GinModule from SpecialCL. What am I
missing?

On Jul 22, 7:30 pm, Scott Blum  wrote:
> Brian, do you know if Guice allows you to specify a ClassLoader other than
> the "active" one?
> In principle, I would be okay with GeneratorContext providing a special
> "other" ClassLoader to generators that contained only client code; it would
> have exactly what TypeOracle does.and just be another way to get the exact
> same information.
>
> I just think we need to separate the machine from the materials. :)
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: fix a buffer overflow in AsyncFragmentLoader

2009-07-22 Thread bobv

LGTM.

http://gwt-code-reviews.appspot.com/54803

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



[gwt-contrib] Re: RR : Emulate JS stack traces (phase 1)

2009-07-22 Thread bobv

Ready for another look.  Major changes:
   - No special handling for throw statements.
   - Force all try/finally to be try/catch/finally to ensure that a
caught JavaScriptException would have the correct stack data as well as
code running in the finally block.
   - Locations always record when execution order does not match
visitation order.
   - Add test case that always tests the JsStackEmulator.

http://gwt-code-reviews.appspot.com/47816

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



[gwt-contrib] fix a buffer overflow in AsyncFragmentLoader

2009-07-22 Thread spoon

Reviewers: bobv,

Description:
Freelend (fabbott) ran our test suite with assertions enabled, and found
an assertion failure in AsyncFragmentLoader.  Curiously, the code likely
works in a browser, due to arrays not being bounds checked when
compiling to JavaScript, but certainly the code is not behaving as
intended.

This patch adds a test case, fixes the bug, and gets RunAsyncFailureTest
to pass even with assertions enabled.


Please review this at http://gwt-code-reviews.appspot.com/54803

Affected files:
   user/src/com/google/gwt/core/client/impl/AsyncFragmentLoader.java
   user/test/com/google/gwt/core/client/impl/AsyncFragmentLoaderTest.java



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



[gwt-contrib] Re: Generators and hosted mode refresh

2009-07-22 Thread Scott Blum
Brian, do you know if Guice allows you to specify a ClassLoader other than
the "active" one?
In principle, I would be okay with GeneratorContext providing a special
"other" ClassLoader to generators that contained only client code; it would
have exactly what TypeOracle does.and just be another way to get the exact
same information.

I just think we need to separate the machine from the materials. :)

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



[gwt-contrib] Re: RR : Emulate JS stack traces (phase 1)

2009-07-22 Thread spoon


http://gwt-code-reviews.appspot.com/47816/diff/1/5
File dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java (right):

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode184
Line 184: * the stack depth.
Oh, right, the pop for a return has to be placed in the enclosing
finally, and it must only do a pop if there is an early exit.  Tricky
tricky!  That means that final block tracking is necessary, and also
that the early-exit variables are necessary.  Bummer.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode197
Line 197: * An exit block might be nested in another exit block.
I see what is up with this, now.  The comment explains why it's a map.
It would be worth commenting what is in the map: the JsName for each
generated "earlyExit" variable.  Whenever a return happens within a
try-finally statement, the return sets earlyExit to true rather than
immediately popping the emulated stack.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode204
Line 204: * arbitrary point.
Cool.

http://gwt-code-reviews.appspot.com/47816

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



[gwt-contrib] Re: Generators and hosted mode refresh

2009-07-22 Thread Alen Vrecko

Hey guys.

Imho having Generators in the "CCL club" is icing on the cake...very
cool but not really essential.

I can confirm using JavaRebel solves both problems (generator code
change, and gin module changes, @Inject added etc). For the time being
I think this is a reasonable compromise for people who want to change
gin code in hosted mode.

afaik you don't need to supply source code of the generator. Should we
want them fully in the CCL club this would break backwards
compatibility.

As Class loading goes. How about: Load generator and all its libraries
from SystemCL to a GeneratorClassLoader and load all gwt client code
from CCL into GeneratorClassLoader to. Like a hybrid space of SystemCL
and CCL.

I see 2 problems with this. Passing the TreeLogger and Context isn't
compatible since one is from GeneratorCL the other from SystemCL (with
some very heavy lifting this can be worked around). Afraid that super
source code from CCL would be picked up before the same stuff from
SystemCL(I don't see any way to get this info).

Other ways might require more comprehensive changes to gwt codebase.

imho this is starting to sound like one of those things that are more
trouble than they are worth.

Cheers
Alen

On Jul 22, 4:53 pm, Scott Blum  wrote:
> But there is no CCL when running the compiler.  We never go through the
> trouble of constructing a "client" class loader environment for generators
> to access, they just run in the system class loader.  Supposing we did build
> a client classloader and run the generators there, how would generators then
> access stuff outside the client space?  IE, how would the Gin generator
> access Guice since it wouldn't be in client space?
>
> On Wed, Jul 22, 2009 at 10:30 AM, Bruce Johnson  wrote:
> > @Scott: Hasn't there been a subtle shift in this regard? With GWT 1.5,
> > didn't we conclude that loading classes at least for annotations would make
> > the most sense?
> > I think now that we have enhanced the CCL, for deRPC, to delegate to "grey
> > area" classes that aren't strictly in the client space, maybe we actually
> > could run generators in the CCL.
>
> > On Wed, Jul 22, 2009 at 10:24 AM, Brian Stoler  wrote:
>
> >> Hi Scott,
> >> Gin uses reflection because it reuses the heavy lifting from Guice, which
> >> is not GWT-aware.
>
> >> Seems like both issues could be resolved if generators were loaded in the
> >> client code ClassLoader. Is there a technical or philosophical problem with
> >> doing so? I can understand it might not be at the top of the priority list
> >> right now, but wanted to know if it would be a bad thing if someone were to
> >> propose a patch.
>
> >> -brian
>
> >> On Wed, Jul 22, 2009 at 7:20 AM, Scott Blum  wrote:
>
> >>> Generally speaking, you do not want to use reflection inside a generator
> >>> to try to view the client code.  That's what TypeOracle is for, that's the
> >>> supported way of viewing client code.
> >>> As for the separate issue of modifying and recompiling a generator itself
> >>> while running, you're right in that we don't explicitly support it.  Using
> >>> unit tests during generator development as you suggest sounds like a good
> >>> strategy to me.  In some cases, you might also get your IDE to do a
> >>> hot-replace if you modify the code while debugging, but this can be flaky.
>
> >>> On Wed, Jul 22, 2009 at 6:45 AM, Alen Vrecko wrote:
>
>  Hi,
>
>  continuing from
> http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
>  . Sorry for the added garbage could have known better to post it here
>  in the first place.
>
>  I see generators as en extension to client code therefore I expect
>  them to behave a bit like client code namely refresh recompiles the
>  generator and client class code changes are visible to the generator.
>
>  As recompiling the generator feature goes maybe it is a bit like
>  fairytale i.e. not really needed. Will just write the unit tests for
>  generators in any case before running the hosted mode and not play
>  with the generator on the fly with change code shutdown-start hosted
>  mode repeat.
>
>  But seeing the latest class files inside generator is needed for
>  refresh to work in some cases. Sure you can do much with TypeOracle
>  but you can't instantiate the JType. Afaik there is no bridge between
>  a JType and Class type.
>
>  What do you think?
>
>  Cheers
>  Alen
>
>
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Problems after upgrading to trunk

2009-07-22 Thread dflorey

Hmmm, very strange. After deleting all the *.jdt.prefs* files in
my .settings directory everything works fine again.
No idea, never created these files but they seem to be harmful under
certain circumstances ;-)

On Jul 22, 5:37 pm, dflorey  wrote:
> Update:
> - When gwt-compiling using the Eclipse-plugin I get the error pasted
> above.
> - When starting hosted mode the browser page is empty with no errors
> - When compiling from hosted mode browser everything works fine
> - Launching compiled app in external browser works fine
>
> On Jul 22, 5:27 pm, dflorey  wrote:
>
>
>
> > I get this error when gwt-compiling my app. gwt trunk compiles just
> > fine.
>
> > On Jul 22, 4:13 pm, Scott Blum  wrote:
>
> > > This is after ant clean?
>
> > > On Wed, Jul 22, 2009 at 5:14 AM, dflorey  wrote:
>
> > > > After upgrading to trunk my app stopped working. In hosted mode in
> > > > don't get any error msg, but the hosted mode browser stays empty. When
> > > > compiling I get this error:
>
> > > > [ERROR] Unexpected
> > > > java.lang.NoSuchFieldError:
> > > > reportUnusedDeclaredThrownExceptionIncludeDocCommentReference
> > > >        at com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions
> > > > (JdtCompiler.java:208)
> > > >        at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.
> > > > (JdtCompiler.java:94)
> > > >        at 
> > > > com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:
> > > > 253)
> > > >        at com.google.gwt.dev.javac.CompilationState.compile
> > > > (CompilationState.java:338)
> > > >        at com.google.gwt.dev.javac.CompilationState.refresh
> > > > (CompilationState.java:247)
> > > >        at com.google.gwt.dev.javac.CompilationState.
> > > > (CompilationState.java:116)
> > > >        at com.google.gwt.dev.cfg.ModuleDef.getCompilationState
> > > > (ModuleDef.java:285)
> > > >        at com.google.gwt.dev.Precompile.precompile(Precompile.java:455)
> > > >        at com.google.gwt.dev.Precompile.precompile(Precompile.java:395)
> > > >        at com.google.gwt.dev.Compiler.run(Compiler.java:193)
> > > >        at com.google.gwt.dev.Compiler$1.run(Compiler.java:144)
> > > >        at
> > > > com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
> > > > 88)
> > > >        at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
> > > > (CompileTaskRunner.java:82)
> > > >        at com.google.gwt.dev.Compiler.main(Compiler.java:151)
>
> > > > Any ideas?
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: GWT emulation of HTML5/CSS3 features

2009-07-22 Thread dflorey

I think it is helpful if we distinguish between optional and mandatory
features.
If GWT would come with a set of widgets or library components that
behave slightly different on different browsers this might not be bad
in general. I'm aware that the general approach of GWT is to write
software once and run it almost everywhere with identical results.
But I can imagine several areas where it may be appropriate to have
e.g. widgets that look even better when the rendering engine supports
3d animations etc. If the developer can use the widget as is and will
get a "default" behavior on all browsers and an extended behavior on
top on some of them, this would be beneficial IMO.
Think of a TabPanel widget that takes advantage of the new funky 3D
animation and transition feature on WebKit and provides a working
default implementation for browsers not supporting CSS3 looking a
little bit more boring.
When it comes to libraries like Database storage it would be helpful
to have a dummy implementation that will do nothing in case when no
persistence is available and to provide some "isAvailable()" method
for each additional feature.

On Jul 22, 5:00 pm, Arthur Kalmenson  wrote:
> This would definitely be a killer feature.
>
> A common API for something like Web Workers and App Cache (maybe
> wrapper forhttp://code.google.com/p/webstorageportabilitylayer/) that
> can seamlessly switch talk to Gears or native HTML 5 implementation
> would be very nice. I think it's a lot easier to convince a company to
> install Gears then installing and using a completely new browser, so
> at least for enterprise settings some common API would be very useful.
>
> Regards,
> --
> Arthur Kalmenson
>
>
>
> On Mon, Jun 29, 2009 at 10:24 AM, dflorey wrote:
>
> > Hi,
> > I've been wondering how GWT should deal with upcoming new features in
> > HTML5/CSS3.
> > There are several areas where functionality that has been implemented
> > in GWT is now also available in the upcoming rendering engines.
>
> > GWT is creating highly optimized JavaScript and the JavaScript-engines
> > are getting better and better... but: My guess is that for example
> > animations will be smoother when using CSS3 animations instead of
> > JavaScript based animations.
> > Same about rounded corners/shadows and stuff alike. In GWT you'll
> > typically use DecoratedPanel to implement rounded corners with
> > shadows. But Firefox3.5 and the latest Safari and Chrome releases also
> > support css-based rounded borders and shadows.
>
> > So my proposal would be to use deferred binding to "emulate" these
> > features on browsers that do not support the latest features (IE8...)
> > and to use a lightweight css based impl on WebKit/Firefox 3.5.
>
> > In my example of DecoratedPanel the 9x9 approach should be kept for IE
> > and a null impl with css based rounded corners should be available for
> > Firefox (css have to match the given theme).
> > Animations that come with the standard widgets should also be able to
> > fallback to css based animations when available.
>
> > I've been also reading some posts about the new datagrid html
> > extension and thought it might be clever to have a look at the spec
> > when moving the tables from incubator to trunk to see how far the
> > concepts match. Would be very cool to have a native table
> > implementation on WebKit browsers while other fallback to gwt impls.
>
> > What do you think?
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: RR : Emulate JS stack traces (phase 1)

2009-07-22 Thread bobv

I don't think getting this thing wrapped up will take too much more
work.


http://gwt-code-reviews.appspot.com/47816/diff/1/5
File dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java (right):

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode132
Line 132: // $stack[$stackDepth = stackIndex] = currentFunction
The assignment into $stack is from an earlier version of the code.  It
should be unnecessary.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode184
Line 184: * the stack depth.
I think that popping in a finally block is necessary only when you have
a return statement in there.  Maybe the "exitingEarly" variable should
be called "exitBlockExitsFunctionNormally".  The amended pattern is that
a pop is necessary anywhere normal flow control might exit the function.

function foo() {
try {
   if (maybe) {
 return;
   }
} finally {
   // maybe function exits and pops here
}

otherCodePossiblyExecuted();
// definitely pop here
}


I agree that there is no real reason to have special handling for throw
statements since the code has to handle native exceptions anyway.  Both
catch and finally blocks should reset their stack depth.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode204
Line 204: * arbitrary point.
"exception" -> "unconditional flow control change"

"arbitrary" -> "within the associated try block"

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode360
Line 360: earlyExitNames.remove(exitBlock);
It should; this has no cleanup effect as written

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode400
Line 400: // Don't need a pop after a throw or break statement
This is an optimization and I am taking advantage of the looser JS
syntax.

This could be made better with a visitor that will find all reachable
code and then treating the implicit "return undefined" at the end of the
block as just another normal exit path.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode620
Line 620: // Same location; ignore
> To correct this, a simple way
> would be to add paranoid extra line-number updaters for for loops and
while
> statements.

Makes sense.

http://gwt-code-reviews.appspot.com/47816

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



[gwt-contrib] Re: Problems after upgrading to trunk

2009-07-22 Thread dflorey

Update:
- When gwt-compiling using the Eclipse-plugin I get the error pasted
above.
- When starting hosted mode the browser page is empty with no errors
- When compiling from hosted mode browser everything works fine
- Launching compiled app in external browser works fine

On Jul 22, 5:27 pm, dflorey  wrote:
> I get this error when gwt-compiling my app. gwt trunk compiles just
> fine.
>
> On Jul 22, 4:13 pm, Scott Blum  wrote:
>
>
>
> > This is after ant clean?
>
> > On Wed, Jul 22, 2009 at 5:14 AM, dflorey  wrote:
>
> > > After upgrading to trunk my app stopped working. In hosted mode in
> > > don't get any error msg, but the hosted mode browser stays empty. When
> > > compiling I get this error:
>
> > > [ERROR] Unexpected
> > > java.lang.NoSuchFieldError:
> > > reportUnusedDeclaredThrownExceptionIncludeDocCommentReference
> > >        at com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions
> > > (JdtCompiler.java:208)
> > >        at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.
> > > (JdtCompiler.java:94)
> > >        at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:
> > > 253)
> > >        at com.google.gwt.dev.javac.CompilationState.compile
> > > (CompilationState.java:338)
> > >        at com.google.gwt.dev.javac.CompilationState.refresh
> > > (CompilationState.java:247)
> > >        at com.google.gwt.dev.javac.CompilationState.
> > > (CompilationState.java:116)
> > >        at com.google.gwt.dev.cfg.ModuleDef.getCompilationState
> > > (ModuleDef.java:285)
> > >        at com.google.gwt.dev.Precompile.precompile(Precompile.java:455)
> > >        at com.google.gwt.dev.Precompile.precompile(Precompile.java:395)
> > >        at com.google.gwt.dev.Compiler.run(Compiler.java:193)
> > >        at com.google.gwt.dev.Compiler$1.run(Compiler.java:144)
> > >        at
> > > com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
> > > 88)
> > >        at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
> > > (CompileTaskRunner.java:82)
> > >        at com.google.gwt.dev.Compiler.main(Compiler.java:151)
>
> > > Any ideas?
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Problems after upgrading to trunk

2009-07-22 Thread Scott Blum
I'm suggesting that ant clean and recompiling trunk from scratch might fix
this.  Also, make sure you svn up your tools directory, just in case.

On Wed, Jul 22, 2009 at 11:27 AM, dflorey  wrote:

>
> I get this error when gwt-compiling my app. gwt trunk compiles just
> fine.
>
> On Jul 22, 4:13 pm, Scott Blum  wrote:
> > This is after ant clean?
> >
> >
> >
> > On Wed, Jul 22, 2009 at 5:14 AM, dflorey 
> wrote:
> >
> > > After upgrading to trunk my app stopped working. In hosted mode in
> > > don't get any error msg, but the hosted mode browser stays empty. When
> > > compiling I get this error:
> >
> > > [ERROR] Unexpected
> > > java.lang.NoSuchFieldError:
> > > reportUnusedDeclaredThrownExceptionIncludeDocCommentReference
> > >at com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions
> > > (JdtCompiler.java:208)
> > >at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.
> > > (JdtCompiler.java:94)
> > >at
> com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:
> > > 253)
> > >at com.google.gwt.dev.javac.CompilationState.compile
> > > (CompilationState.java:338)
> > >at com.google.gwt.dev.javac.CompilationState.refresh
> > > (CompilationState.java:247)
> > >at com.google.gwt.dev.javac.CompilationState.
> > > (CompilationState.java:116)
> > >at com.google.gwt.dev.cfg.ModuleDef.getCompilationState
> > > (ModuleDef.java:285)
> > >at com.google.gwt.dev.Precompile.precompile(Precompile.java:455)
> > >at com.google.gwt.dev.Precompile.precompile(Precompile.java:395)
> > >at com.google.gwt.dev.Compiler.run(Compiler.java:193)
> > >at com.google.gwt.dev.Compiler$1.run(Compiler.java:144)
> > >at
> > > com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
> > > 88)
> > >at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
> > > (CompileTaskRunner.java:82)
> > >at com.google.gwt.dev.Compiler.main(Compiler.java:151)
> >
> > > Any ideas?
> >
>

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



[gwt-contrib] Re: RR : Emulate JS stack traces (phase 1)

2009-07-22 Thread rice


http://gwt-code-reviews.appspot.com/47816/diff/1/5
File dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java (right):

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode174
Line 174: *   exitingEarly && $stackDepeth = stackIndex - 1;
There's a typo here: stackDep_e_th

On 2009/07/22 15:24:47, Lex wrote:
> There is no way to know for sure!  It could depend on whether the try
block
> throws an exception or simply fell off its end.  Further, the throw
might not be
> apparent in the code; it could have been thrown by some other function
that the
> try block calls.

> Maybe this pop code is not needed.  See my next comment.
> Is it even necessary to bother?  See my next comment.

http://gwt-code-reviews.appspot.com/47816

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



[gwt-contrib] Re: Problems after upgrading to trunk

2009-07-22 Thread dflorey

I get this error when gwt-compiling my app. gwt trunk compiles just
fine.

On Jul 22, 4:13 pm, Scott Blum  wrote:
> This is after ant clean?
>
>
>
> On Wed, Jul 22, 2009 at 5:14 AM, dflorey  wrote:
>
> > After upgrading to trunk my app stopped working. In hosted mode in
> > don't get any error msg, but the hosted mode browser stays empty. When
> > compiling I get this error:
>
> > [ERROR] Unexpected
> > java.lang.NoSuchFieldError:
> > reportUnusedDeclaredThrownExceptionIncludeDocCommentReference
> >        at com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions
> > (JdtCompiler.java:208)
> >        at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.
> > (JdtCompiler.java:94)
> >        at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:
> > 253)
> >        at com.google.gwt.dev.javac.CompilationState.compile
> > (CompilationState.java:338)
> >        at com.google.gwt.dev.javac.CompilationState.refresh
> > (CompilationState.java:247)
> >        at com.google.gwt.dev.javac.CompilationState.
> > (CompilationState.java:116)
> >        at com.google.gwt.dev.cfg.ModuleDef.getCompilationState
> > (ModuleDef.java:285)
> >        at com.google.gwt.dev.Precompile.precompile(Precompile.java:455)
> >        at com.google.gwt.dev.Precompile.precompile(Precompile.java:395)
> >        at com.google.gwt.dev.Compiler.run(Compiler.java:193)
> >        at com.google.gwt.dev.Compiler$1.run(Compiler.java:144)
> >        at
> > com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
> > 88)
> >        at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
> > (CompileTaskRunner.java:82)
> >        at com.google.gwt.dev.Compiler.main(Compiler.java:151)
>
> > Any ideas?
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: RR : Emulate JS stack traces (phase 1)

2009-07-22 Thread spoon

This patch took me hours to absorb.  It sounds simple to modify the
compiler to emulate stacks, but understanding precisely where the stack
updates need to happen is difficult!

The implementation is very clean.  There are just two nits in the
comments.

The line number recording looks like it should have a couple of
exceptions where it includes a line-number updating statement just to be
safe.

Most significantly, it looks to me like one thing is missing from the
finally block handling, and a great deal of the try-finally handling in
there could safely be omitted.  Please check out the comments on this
and see if you agree.



http://gwt-code-reviews.appspot.com/47816/diff/1/5
File dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java (right):

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode132
Line 132: // $stack[$stackDepth = stackIndex] = currentFunction
This is safe, but why is it necessary?  I would have thought that
$stackDepth = stackIndex is enough.  Shouldn't $stack[stackIndex] be the
same until this function decrements stackIndex and returns?

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode174
Line 174: *   exitingEarly && $stackDepeth = stackIndex - 1;
There is no way to know for sure!  It could depend on whether the try
block throws an exception or simply fell off its end.  Further, the
throw might not be apparent in the code; it could have been thrown by
some other function that the try block calls.

Maybe this pop code is not needed.  See my next comment.
Is it even necessary to bother?  See my next comment.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode184
Line 184: * the stack depth.
This is a clever approach, and would seem to mean that it's not
necessary at the *throw* site to update the emulated stack.  Instead, it
gets updated as soon as user code (as opposed to JSVM code or browser
API code) starts running again.

The only places user code can restart after an exception are catch
blocks and finally blocks.  Here you describe updating catch blocks.
Wouldn't finally blocks need the same treatment?

Going on from there, since catch and finally blocks reset the stack at
their entry, is it necessary any longer to bother popping in finally
blocks?  That looks like a vestige from an earlier approach where
exception throws did cause immediate stack updates.  The newer approach
appears to be that pushes happen at function entry, pops happen at
function exit, and just-in-case stack resets happen at the top of
finally and catch blocks.

As an added bonus, the code should be simpler, because exitBlock and
earlyExitName variables are no longer needed.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode204
Line 204: * arbitrary point.
It's not an "arbitrary" point.  If I understand correctly, it is if an
exception occurs at the currently visited location?  This variable then
gets updated by visit() methods so that it stays accurate.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode360
Line 360: earlyExitNames.remove(exitBlock);
This statement looks strange.  Is it supposed to happen before the
previous one?

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode400
Line 400: // Don't need a pop after a throw or break statement
There are other cases where a function might not fall off the end.  For
example, there might be an if statement, and both branches might end
with a return or a throw.

I think an extra pop would be fine, because JavaScript is looser than
Java about unreachable code.  However, it is worth at least commenting
that the point here is not to catch all cases, but to remove the excess
pops in the most common cases.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode604
Line 604: private String baseName(String x) {
The convention seems to be that "x" is an AST node.  This variable holds
a "fileName" or the like.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode620
Line 620: // Same location; ignore
This can give wrong line numbers for looping statements, because the
visitor order is a subset of the possible control-flow paths.  Here's an
example:

for (int i = 0; i < someFunction(); i++) {
   doStuff(i);
}

Suppose someFunction() throws an exception on its *second* invocation
but not its first:  The line numbers are then incorrect.  To correct
this, a simple way would be to add paranoid extra line-number updaters
for for loops and while statements.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode663
Line 663: private boolean recordLineNumbers =
Boolean.getBoolean("gwt.dev.stack.recordLineNumbers");
There is now a module CompilerParameters.gwt.xml that has misc. compiler
settings that most users won't touch.  While it's not a big deal, it
seems helpful to keep things to the smallest scope that makes sense.
Module scope is smaller than property scope.

http://gwt-code-reviews.appspot.com/47816

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

[gwt-contrib] Re: GWT emulation of HTML5/CSS3 features

2009-07-22 Thread Arthur Kalmenson

This would definitely be a killer feature.

A common API for something like Web Workers and App Cache (maybe
wrapper for http://code.google.com/p/webstorageportabilitylayer/) that
can seamlessly switch talk to Gears or native HTML 5 implementation
would be very nice. I think it's a lot easier to convince a company to
install Gears then installing and using a completely new browser, so
at least for enterprise settings some common API would be very useful.

Regards,
--
Arthur Kalmenson



On Mon, Jun 29, 2009 at 10:24 AM, dflorey wrote:
>
> Hi,
> I've been wondering how GWT should deal with upcoming new features in
> HTML5/CSS3.
> There are several areas where functionality that has been implemented
> in GWT is now also available in the upcoming rendering engines.
>
> GWT is creating highly optimized JavaScript and the JavaScript-engines
> are getting better and better... but: My guess is that for example
> animations will be smoother when using CSS3 animations instead of
> JavaScript based animations.
> Same about rounded corners/shadows and stuff alike. In GWT you'll
> typically use DecoratedPanel to implement rounded corners with
> shadows. But Firefox3.5 and the latest Safari and Chrome releases also
> support css-based rounded borders and shadows.
>
> So my proposal would be to use deferred binding to "emulate" these
> features on browsers that do not support the latest features (IE8...)
> and to use a lightweight css based impl on WebKit/Firefox 3.5.
>
> In my example of DecoratedPanel the 9x9 approach should be kept for IE
> and a null impl with css based rounded corners should be available for
> Firefox (css have to match the given theme).
> Animations that come with the standard widgets should also be able to
> fallback to css based animations when available.
>
> I've been also reading some posts about the new datagrid html
> extension and thought it might be clever to have a look at the spec
> when moving the tables from incubator to trunk to see how far the
> concepts match. Would be very cool to have a native table
> implementation on WebKit browsers while other fallback to gwt impls.
>
> What do you think?
> >
>

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



[gwt-contrib] Re: Generators and hosted mode refresh

2009-07-22 Thread Scott Blum
But there is no CCL when running the compiler.  We never go through the
trouble of constructing a "client" class loader environment for generators
to access, they just run in the system class loader.  Supposing we did build
a client classloader and run the generators there, how would generators then
access stuff outside the client space?  IE, how would the Gin generator
access Guice since it wouldn't be in client space?

On Wed, Jul 22, 2009 at 10:30 AM, Bruce Johnson  wrote:

> @Scott: Hasn't there been a subtle shift in this regard? With GWT 1.5,
> didn't we conclude that loading classes at least for annotations would make
> the most sense?
> I think now that we have enhanced the CCL, for deRPC, to delegate to "grey
> area" classes that aren't strictly in the client space, maybe we actually
> could run generators in the CCL.
>
> On Wed, Jul 22, 2009 at 10:24 AM, Brian Stoler  wrote:
>
>> Hi Scott,
>> Gin uses reflection because it reuses the heavy lifting from Guice, which
>> is not GWT-aware.
>>
>> Seems like both issues could be resolved if generators were loaded in the
>> client code ClassLoader. Is there a technical or philosophical problem with
>> doing so? I can understand it might not be at the top of the priority list
>> right now, but wanted to know if it would be a bad thing if someone were to
>> propose a patch.
>>
>> -brian
>>
>>
>> On Wed, Jul 22, 2009 at 7:20 AM, Scott Blum  wrote:
>>
>>> Generally speaking, you do not want to use reflection inside a generator
>>> to try to view the client code.  That's what TypeOracle is for, that's the
>>> supported way of viewing client code.
>>> As for the separate issue of modifying and recompiling a generator itself
>>> while running, you're right in that we don't explicitly support it.  Using
>>> unit tests during generator development as you suggest sounds like a good
>>> strategy to me.  In some cases, you might also get your IDE to do a
>>> hot-replace if you modify the code while debugging, but this can be flaky.
>>>
>>> On Wed, Jul 22, 2009 at 6:45 AM, Alen Vrecko wrote:
>>>

 Hi,

 continuing from
 http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/c65457fa4df351c1
 . Sorry for the added garbage could have known better to post it here
 in the first place.

 I see generators as en extension to client code therefore I expect
 them to behave a bit like client code namely refresh recompiles the
 generator and client class code changes are visible to the generator.

 As recompiling the generator feature goes maybe it is a bit like
 fairytale i.e. not really needed. Will just write the unit tests for
 generators in any case before running the hosted mode and not play
 with the generator on the fly with change code shutdown-start hosted
 mode repeat.

 But seeing the latest class files inside generator is needed for
 refresh to work in some cases. Sure you can do much with TypeOracle
 but you can't instantiate the JType. Afaik there is no bridge between
 a JType and Class type.

 What do you think?

 Cheers
 Alen



>>>
>>
>> >>
>>
>

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



[gwt-contrib] Re: Trouble building GWT 2.0 from svn

2009-07-22 Thread mescali...@gmail.com
John Tamplin wrote:
> Can you svn up in the tools directory?  It sounds like perhaps you are
> missing the more recent JDT.
>

btw,
feder...@gentoo64 ~/gwt-trunk/tools $ ls -1 lib/eclipse/jdt*
lib/eclipse/jdt-3.1.1.jar
lib/eclipse/jdt-3.1.1-src.zip
lib/eclipse/jdt-3.3.1.jar
lib/eclipse/jdt-3.3.1-src.zip
lib/eclipse/jdt-3.4.2.jar
lib/eclipse/jdt-3.4.2-src.zip

when declaring the classpath (first try - original message) I was
referring to latest available (3.4.2) version




signature.asc
Description: OpenPGP digital signature


[gwt-contrib] Re: Trouble building GWT 2.0 from svn

2009-07-22 Thread mescali...@gmail.com
John Tamplin wrote:
> On Tue, Jul 21, 2009 at 9:51 AM, mescali...@gmail.com
>   > wrote:
>
> so I did I.
> I repeated the above steps today.
> ant (1.7.1) run up to some point, then I get this error:
>
> [gwt.javac] Compiling 725 source files to
> /home/federico/gwt-trunk/trunk/build/out/dev/core/bin
> [gwt.javac]
> 
> /home/federico/gwt-trunk/trunk/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java:32:
> package org.eclipse.jdt.core.compiler does not exist
> [gwt.javac] import org.eclipse.jdt.core.compiler.CategorizedProblem;
> [gwt.javac] ^
> [gwt.javac]
> 
> /home/federico/gwt-trunk/trunk/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java:33:
> cannot find symbol
>
>
> Can you svn up in the tools directory?  It sounds like perhaps you are
> missing the more recent JDT.
>

feder...@gentoo64 ~/gwt-trunk/tools $ svn up
At revision 5768.


my guess is that's not finding JDT (or anytinhg else).

that's why I had to put all (latest version of) jars I found in toolls
directory to CLASSPATH.
when doing so, compile goes well for a while, but stop later -for the
error reported in original message-


-- 




signature.asc
Description: OpenPGP digital signature


[gwt-contrib] Re: Generators and hosted mode refresh

2009-07-22 Thread Bruce Johnson
@Scott: Hasn't there been a subtle shift in this regard? With GWT 1.5,
didn't we conclude that loading classes at least for annotations would make
the most sense?
I think now that we have enhanced the CCL, for deRPC, to delegate to "grey
area" classes that aren't strictly in the client space, maybe we actually
could run generators in the CCL.

On Wed, Jul 22, 2009 at 10:24 AM, Brian Stoler  wrote:

> Hi Scott,
> Gin uses reflection because it reuses the heavy lifting from Guice, which
> is not GWT-aware.
>
> Seems like both issues could be resolved if generators were loaded in the
> client code ClassLoader. Is there a technical or philosophical problem with
> doing so? I can understand it might not be at the top of the priority list
> right now, but wanted to know if it would be a bad thing if someone were to
> propose a patch.
>
> -brian
>
>
> On Wed, Jul 22, 2009 at 7:20 AM, Scott Blum  wrote:
>
>> Generally speaking, you do not want to use reflection inside a generator
>> to try to view the client code.  That's what TypeOracle is for, that's the
>> supported way of viewing client code.
>> As for the separate issue of modifying and recompiling a generator itself
>> while running, you're right in that we don't explicitly support it.  Using
>> unit tests during generator development as you suggest sounds like a good
>> strategy to me.  In some cases, you might also get your IDE to do a
>> hot-replace if you modify the code while debugging, but this can be flaky.
>>
>> On Wed, Jul 22, 2009 at 6:45 AM, Alen Vrecko wrote:
>>
>>>
>>> Hi,
>>>
>>> continuing from
>>> http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/c65457fa4df351c1
>>> . Sorry for the added garbage could have known better to post it here
>>> in the first place.
>>>
>>> I see generators as en extension to client code therefore I expect
>>> them to behave a bit like client code namely refresh recompiles the
>>> generator and client class code changes are visible to the generator.
>>>
>>> As recompiling the generator feature goes maybe it is a bit like
>>> fairytale i.e. not really needed. Will just write the unit tests for
>>> generators in any case before running the hosted mode and not play
>>> with the generator on the fly with change code shutdown-start hosted
>>> mode repeat.
>>>
>>> But seeing the latest class files inside generator is needed for
>>> refresh to work in some cases. Sure you can do much with TypeOracle
>>> but you can't instantiate the JType. Afaik there is no bridge between
>>> a JType and Class type.
>>>
>>> What do you think?
>>>
>>> Cheers
>>> Alen
>>>
>>>
>>>
>>
>
> >
>

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



[gwt-contrib] Re: Generators and hosted mode refresh

2009-07-22 Thread Brian Stoler
Hi Scott,
Gin uses reflection because it reuses the heavy lifting from Guice, which is
not GWT-aware.

Seems like both issues could be resolved if generators were loaded in the
client code ClassLoader. Is there a technical or philosophical problem with
doing so? I can understand it might not be at the top of the priority list
right now, but wanted to know if it would be a bad thing if someone were to
propose a patch.

-brian

On Wed, Jul 22, 2009 at 7:20 AM, Scott Blum  wrote:

> Generally speaking, you do not want to use reflection inside a generator to
> try to view the client code.  That's what TypeOracle is for, that's the
> supported way of viewing client code.
> As for the separate issue of modifying and recompiling a generator itself
> while running, you're right in that we don't explicitly support it.  Using
> unit tests during generator development as you suggest sounds like a good
> strategy to me.  In some cases, you might also get your IDE to do a
> hot-replace if you modify the code while debugging, but this can be flaky.
>
> On Wed, Jul 22, 2009 at 6:45 AM, Alen Vrecko wrote:
>
>>
>> Hi,
>>
>> continuing from
>> http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/c65457fa4df351c1
>> . Sorry for the added garbage could have known better to post it here
>> in the first place.
>>
>> I see generators as en extension to client code therefore I expect
>> them to behave a bit like client code namely refresh recompiles the
>> generator and client class code changes are visible to the generator.
>>
>> As recompiling the generator feature goes maybe it is a bit like
>> fairytale i.e. not really needed. Will just write the unit tests for
>> generators in any case before running the hosted mode and not play
>> with the generator on the fly with change code shutdown-start hosted
>> mode repeat.
>>
>> But seeing the latest class files inside generator is needed for
>> refresh to work in some cases. Sure you can do much with TypeOracle
>> but you can't instantiate the JType. Afaik there is no bridge between
>> a JType and Class type.
>>
>> What do you think?
>>
>> Cheers
>> Alen
>>
>> >>
>>
>

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



[gwt-contrib] Re: Generators and hosted mode refresh

2009-07-22 Thread Scott Blum
Generally speaking, you do not want to use reflection inside a generator to
try to view the client code.  That's what TypeOracle is for, that's the
supported way of viewing client code.
As for the separate issue of modifying and recompiling a generator itself
while running, you're right in that we don't explicitly support it.  Using
unit tests during generator development as you suggest sounds like a good
strategy to me.  In some cases, you might also get your IDE to do a
hot-replace if you modify the code while debugging, but this can be flaky.

On Wed, Jul 22, 2009 at 6:45 AM, Alen Vrecko  wrote:

>
> Hi,
>
> continuing from
> http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/c65457fa4df351c1
> . Sorry for the added garbage could have known better to post it here
> in the first place.
>
> I see generators as en extension to client code therefore I expect
> them to behave a bit like client code namely refresh recompiles the
> generator and client class code changes are visible to the generator.
>
> As recompiling the generator feature goes maybe it is a bit like
> fairytale i.e. not really needed. Will just write the unit tests for
> generators in any case before running the hosted mode and not play
> with the generator on the fly with change code shutdown-start hosted
> mode repeat.
>
> But seeing the latest class files inside generator is needed for
> refresh to work in some cases. Sure you can do much with TypeOracle
> but you can't instantiate the JType. Afaik there is no bridge between
> a JType and Class type.
>
> What do you think?
>
> Cheers
> Alen
>
> >
>

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



[gwt-contrib] Re: Problems after upgrading to trunk

2009-07-22 Thread Scott Blum
This is after ant clean?

On Wed, Jul 22, 2009 at 5:14 AM, dflorey  wrote:

>
> After upgrading to trunk my app stopped working. In hosted mode in
> don't get any error msg, but the hosted mode browser stays empty. When
> compiling I get this error:
>
> [ERROR] Unexpected
> java.lang.NoSuchFieldError:
> reportUnusedDeclaredThrownExceptionIncludeDocCommentReference
>at com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions
> (JdtCompiler.java:208)
>at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.
> (JdtCompiler.java:94)
>at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:
> 253)
>at com.google.gwt.dev.javac.CompilationState.compile
> (CompilationState.java:338)
>at com.google.gwt.dev.javac.CompilationState.refresh
> (CompilationState.java:247)
>at com.google.gwt.dev.javac.CompilationState.
> (CompilationState.java:116)
>at com.google.gwt.dev.cfg.ModuleDef.getCompilationState
> (ModuleDef.java:285)
>at com.google.gwt.dev.Precompile.precompile(Precompile.java:455)
>at com.google.gwt.dev.Precompile.precompile(Precompile.java:395)
>at com.google.gwt.dev.Compiler.run(Compiler.java:193)
>at com.google.gwt.dev.Compiler$1.run(Compiler.java:144)
>at
> com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
> 88)
>at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
> (CompileTaskRunner.java:82)
>at com.google.gwt.dev.Compiler.main(Compiler.java:151)
>
> Any ideas?
> >
>

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



[gwt-contrib] Generators and hosted mode refresh

2009-07-22 Thread Alen Vrecko

Hi,

continuing from 
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/c65457fa4df351c1
. Sorry for the added garbage could have known better to post it here
in the first place.

I see generators as en extension to client code therefore I expect
them to behave a bit like client code namely refresh recompiles the
generator and client class code changes are visible to the generator.

As recompiling the generator feature goes maybe it is a bit like
fairytale i.e. not really needed. Will just write the unit tests for
generators in any case before running the hosted mode and not play
with the generator on the fly with change code shutdown-start hosted
mode repeat.

But seeing the latest class files inside generator is needed for
refresh to work in some cases. Sure you can do much with TypeOracle
but you can't instantiate the JType. Afaik there is no bridge between
a JType and Class type.

What do you think?

Cheers
Alen

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



[gwt-contrib] Re: Proposal for improving JDO/JPA RPC support

2009-07-22 Thread Sami Jaber
Hi Dan,

That sounds to be a really good step in the right direction.
This mecanisms seems to cover all the nominal use cases that we would face
regarding the different o/r mapping impl.
I would just make a few remarks :

1) When you call all the setXX() methods when the object is sent back to the
server, the o/r mapper will assume that those fields have been modified and
the dirty state tracking (which is activated before the setXX() call if I
well understand) will raise an "update" operation for all the fields. I
think you have to compare bean n-1 field values and bean n field values to
call only the setXX() for the modified values. What about collection ?
Hibernate provides a PersistentSet that ensure the object state tracking,
will you call setXX() for all items of client data ?

2) If you analyze an enhanced entity in the Hibernate land you will see that
it contains many coarse-grained information, like a SessionImplementor (it
depends on the dynamic proxy factory and impl you have used) ->
https://www.hibernate.org/hib_docs/v3/api/org/hibernate/proxy/ProxyFactory.html.
Serializing those data in a String based representation could be potentially
harmful in term of bandwith and payload. Why not providing a way to store
this client data info in the HttpSession ?

Sami


On Mon, Jul 20, 2009 at 8:06 PM, Daniel Rice (דניאל רייס)
wrote:

> Hi all -
>   I've been working on a patch to improve support for RPC of
> persistence-enhanced objects that would replace the one I recently submitted
> as trunk revision 5672.  I'd like to give those of you who are interested in
> the interaction between RPC and persistence a chance to help me validate the
> design before moving forward.
>
>  The idea is to be able to deal with different persistence mechanisms in a
> way that does not depend too much on the details of their implementations.
> We assume that the persistence mechanism provides a way for instances to be
> detached from the object store, serialized, deserialized, and reattached in
> a well-defined way. Our strategy leverages this capability as follows:
>
> 1) User code on the server detaches the object and places it into a state
> such that serialization is valid
> 2) GWT detects whether any instance fields are present on the object that
> were not known to client code
> 3) GWT performs hybrid serialization:
>   a) GWT uses its regular RPC mechanism for the client-visible fields
>   b) GWT uses Java serialization for any additional server-only instance
> fields
>   c) GWT encodes the results of step (b) as a String
>   d) GWT prepends the encoded String to the regular RPC data and transmits
> to the client
> 4) Client code treats the object in the normal way and does not interact
> with the data from step (3b)
> 5) When the object is sent back to the server, the normal RPC mechanism is
> altered as follows
>   a) the encoded server data is decoded and deserialized into the new
> object instance
>   b) the client data is populated using setXXX() method invocations rather
> than by directly setting field values
>
> All this is done only for classes that can be send bidirectionally, and
> which are determined to be (potentially) enhanced.
> The potential for enhancement is signaled in one of three ways:
>
> o The user adds the fully-qualified class name to a 'gwt.enhancedClasses'
> configuration property
> o The class is determined to have the JDO @PersistenceCapable annotation
> with detachable=true
> o The class is determined to have the JPA @Entity annotation
>
> If a class is determined to be potentially enhanced, the list of fields
> known to the client is added to the '.gwt.rpc' file that contains the RPC
> whitelist.  This list is used by step 2 of the RPC process which compares
> the set of client- and server-visible fields.
>
>   Step (5b) is necessary to accommodate mechanisms like that of JDO, where
> the setter methods are enhanced to provide object state tracking (dirty
> bits).  If we were to set the fields directly, the object detached state
> would not be updated properly.
>
>   My hope is that this mechanism would be general enough to support a
> variety of persistence mechanisms without the need to add a lot of
> special-case code.  I'm looking forward to any comments that you have as to
> whether this will work with your favorite persistence API, or any other
> thoughts that you have.  Thanks,
>
> Dan
>
>
> >
>

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



[gwt-contrib] Problems after upgrading to trunk

2009-07-22 Thread dflorey

After upgrading to trunk my app stopped working. In hosted mode in
don't get any error msg, but the hosted mode browser stays empty. When
compiling I get this error:

[ERROR] Unexpected
java.lang.NoSuchFieldError:
reportUnusedDeclaredThrownExceptionIncludeDocCommentReference
at com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions
(JdtCompiler.java:208)
at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.
(JdtCompiler.java:94)
at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:
253)
at com.google.gwt.dev.javac.CompilationState.compile
(CompilationState.java:338)
at com.google.gwt.dev.javac.CompilationState.refresh
(CompilationState.java:247)
at com.google.gwt.dev.javac.CompilationState.
(CompilationState.java:116)
at com.google.gwt.dev.cfg.ModuleDef.getCompilationState
(ModuleDef.java:285)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:455)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:395)
at com.google.gwt.dev.Compiler.run(Compiler.java:193)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:144)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
88)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
(CompileTaskRunner.java:82)
at com.google.gwt.dev.Compiler.main(Compiler.java:151)

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