[gwt-contrib] Fix a daylight saving bug
Reviewers: jlabanca, jat, Description: Calling new Date(...) with a time that falls in the 'missing hour' of a daylight savings time transition currently behaves differently in java versus javascript. In java, the time is moved forward by an hour, while in javascript it is moved backward, which can result in a confusing change to the datein locations such as Brazil where the transition occurs at midnight. This patch attempts to enforce the java behavior. Please review this at http://gwt-code-reviews.appspot.com/90802 Affected files: user/super/com/google/gwt/emul/java/util/Date.java --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Fix a daylight saving bug
We should have unit tests for all of these cases, testing DST going in both directions (spring and fall). LGTM pending unit tests http://gwt-code-reviews.appspot.com/90802 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Code Review Request: Addition of clientId and initialization message for the RemoteUI
LGTM - please run ant checkstyle before committing. Also, cherrypick into the 2.0 branch. On 2009/10/30 16:23:34, rdayal wrote: http://gwt-code-reviews.appspot.com/89809 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Fix a daylight saving bug
I'm not sure how to so this -- my testing involved manually setting the machine's time zone. Ultimately the bug is in the fact that the native Javascript Date functions deal with the missing hour differently that Java's Date class, and I don't know that I can coerce the Javascript functions into doing this specific behavior except by altering the OS environment. Also, this particular bug should only manifest when moving the clock ahead. When going in the other direction, there is no missing hour, instead there is a duplicated hour. While that may lead to other problems, it won't cause a wrong date to be inferred. There's a theoretical possibility that some location could advance their clock by something other than one hour. I'm not sure what to do about that, but I don't think there is anywhere in the world that does this at the moment. Dan On Fri, Oct 30, 2009 at 12:41 PM, jlaba...@google.com wrote: We should have unit tests for all of these cases, testing DST going in both directions (spring and fall). LGTM pending unit tests http://gwt-code-reviews.appspot.com/90802 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Fix a daylight saving bug
If you're confident in the fix, Dan, instead of adding a test right now, please just add an issue instead to remind us to review in the future what kind of testing mechanism we would have needed to make a unit test easy to create for this case. I want to make sure we revisit this at some point to round out our testing story, even for hard things to test. On Fri, Oct 30, 2009 at 1:23 PM, Daniel Rice (דניאל רייס) r...@google.comwrote: I'm not sure how to so this -- my testing involved manually setting the machine's time zone. Ultimately the bug is in the fact that the native Javascript Date functions deal with the missing hour differently that Java's Date class, and I don't know that I can coerce the Javascript functions into doing this specific behavior except by altering the OS environment. Also, this particular bug should only manifest when moving the clock ahead. When going in the other direction, there is no missing hour, instead there is a duplicated hour. While that may lead to other problems, it won't cause a wrong date to be inferred. There's a theoretical possibility that some location could advance their clock by something other than one hour. I'm not sure what to do about that, but I don't think there is anywhere in the world that does this at the moment. Dan On Fri, Oct 30, 2009 at 12:41 PM, jlaba...@google.com wrote: We should have unit tests for all of these cases, testing DST going in both directions (spring and fall). LGTM pending unit tests http://gwt-code-reviews.appspot.com/90802 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6558 committed - Merge of trunk 6458:6459, fix for CssProperty space bug on IE
Revision: 6558 Author: fabb...@google.com Date: Fri Oct 30 10:59:29 2009 Log: Merge of trunk 6458:6459, fix for CssProperty space bug on IE http://code.google.com/p/google-web-toolkit/source/detail?r=6558 Modified: /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/resources/css/GenerateCssAst.java /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/resources/css/ast/CssProperty.java === --- /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/resources/css/GenerateCssAst.java Sat Oct 10 13:50:54 2009 +++ /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/resources/css/GenerateCssAst.java Fri Oct 30 10:59:29 2009 @@ -38,6 +38,7 @@ import com.google.gwt.resources.css.ast.CssProperty.ListValue; import com.google.gwt.resources.css.ast.CssProperty.NumberValue; import com.google.gwt.resources.css.ast.CssProperty.StringValue; +import com.google.gwt.resources.css.ast.CssProperty.TokenValue; import com.google.gwt.resources.css.ast.CssProperty.Value; import org.w3c.css.sac.AttributeCondition; @@ -916,7 +917,7 @@ case LexicalUnit.SAC_URI: return new IdentValue(url( + value.getStringValue() + )); case LexicalUnit.SAC_OPERATOR_COMMA: -return new IdentValue(,); +return new TokenValue(,); case LexicalUnit.SAC_COUNTER_FUNCTION: case LexicalUnit.SAC_COUNTERS_FUNCTION: case LexicalUnit.SAC_FUNCTION: { @@ -971,25 +972,25 @@ case LexicalUnit.SAC_INHERIT: return new IdentValue(inherit); case LexicalUnit.SAC_OPERATOR_EXP: -return new IdentValue(^); +return new TokenValue(^); case LexicalUnit.SAC_OPERATOR_GE: -return new IdentValue(=); +return new TokenValue(=); case LexicalUnit.SAC_OPERATOR_GT: -return new IdentValue(); +return new TokenValue(); case LexicalUnit.SAC_OPERATOR_LE: -return new IdentValue(=); +return new TokenValue(=); case LexicalUnit.SAC_OPERATOR_LT: -return new IdentValue(); +return new TokenValue(); case LexicalUnit.SAC_OPERATOR_MINUS: -return new IdentValue(-); +return new TokenValue(-); case LexicalUnit.SAC_OPERATOR_MOD: -return new IdentValue(%); +return new TokenValue(%); case LexicalUnit.SAC_OPERATOR_MULTIPLY: -return new IdentValue(*); +return new TokenValue(*); case LexicalUnit.SAC_OPERATOR_PLUS: -return new IdentValue(+); +return new TokenValue(+); case LexicalUnit.SAC_OPERATOR_SLASH: -return new IdentValue(/); +return new TokenValue(/); case LexicalUnit.SAC_OPERATOR_TILDE: return new IdentValue(~); case LexicalUnit.SAC_RECT_FUNCTION: { === --- /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/resources/css/ast/CssProperty.java Tue Mar 17 11:59:31 2009 +++ /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/resources/css/ast/CssProperty.java Fri Oct 30 10:59:29 2009 @@ -40,6 +40,7 @@ this.suffix = suffix; } +@Override public String getExpression() { return path.replace(., ().) + () + \ + Generator.escape(suffix) + \; @@ -58,6 +59,7 @@ return this; } +@Override public String toCss() { return value(\ + path + \ + (suffix == null ? : (, \ + suffix + \)) + ); @@ -74,6 +76,7 @@ this.expression = expression; } +@Override public String getExpression() { return expression; } @@ -83,6 +86,7 @@ return this; } +@Override public String toCss() { return /* Java expression */; } @@ -106,6 +110,7 @@ this.ident = ident; } +@Override public String getExpression() { return '' + Generator.escape(ident) + ''; } @@ -119,6 +124,7 @@ return this; } +@Override public String toCss() { return ident; } @@ -138,13 +144,20 @@ this(Arrays.asList(values)); } +@Override public String getExpression() { StringBuilder toReturn = new StringBuilder(); + boolean first = true; for (IteratorValue i = values.iterator(); i.hasNext();) { -toReturn.append(i.next().getExpression()); +Value value = i.next(); +if (!first value.isSpaceRequired()) { + toReturn.append(\ \ +); +} +toReturn.append(value.getExpression()); if (i.hasNext()) { - toReturn.append(+ \ \ +); -} + toReturn.append(+ ); +} +first = false; } return toReturn.toString(); } @@ -158,6 +171,7 @@ return this; } +@Override public String toCss() { StringBuilder sb = new StringBuilder(); for (Value v : values) { @@ -204,6
[gwt-contrib] Re: Server side I18N
Thobias, Since this doesn't involve changes to GWT proper, have you thought about creating a google code project. I'm sure there are others who would like to use what you have created. And who knows, one day it might be included in GWT proper. Thanks, Chris On Oct 21, 5:14 pm, Thoka thobias.karls...@gmail.com wrote: I don't think that you guys are seeing the whole picture. By making the string replacements part of the compiled code you actually bind the internationalization into the code. Trust me, when a web application is supporting 20+ languages, the translations will never be absolutely flawless, and the JIT string replacements/formatting that you are complaining about is a very small factor when dealing with large applications. Compare the time taken for dynamically creating, say 200 DIV elements within a DOM tree, with time taken for replacing 2000 internationalized strings using JIT and you'll find out that this is absolutely NO extra time spent and just a VERY small overhead comparing to a web application with the strings compiled into the nocache-files. In a perfect world, the texts would be flawless from project startup, but when creating one major application per month to different companies (using different translators) for 40+ languages, they won't be flawless, even when going live due to dead lines. If nobody sees the business value with server side I18N, I'll rest my case. On Oct 20, 6:08 pm, Ray Ryan rj...@google.com wrote: On Tue, Oct 20, 2009 at 8:32 AM, John Tamplin j...@google.com wrote: On Tue, Oct 20, 2009 at 11:21 AM, Ray Ryan rj...@google.com wrote: I'll bet a lot that the cross section of 40+ languages and nuanced pluralized translations is vanishingly small. A first cut that simply required status quo for plurals support would still be a big win. Or for that matter I don't most apps would actually notice if their tiny handful of pluralized strings became a runtime entity instead of baked in. The problem is that it is more than just that. Take this for example: - Folder name: {0} File name: {1} in English - xxx {1} yyz {0} xkx in some other locale The code generated is different and there is no piece of text in the English output that can be changed to produce the other locale, and that is because we actually parse the format string at compile time. Out of curiosity, could you post a sample of the generated code? If we instead just substituted those strings, you would have to have all the format parsing code in the compiled output, which will be essentially String.format. In addition, right now we just generate calls to NumberFormat/DateTimeFormat for actual formatting and they parse their pattern at runtime, but I have work in progress to move the parsing of the pattern to compile time. Beyond this, there are things like: @DefaultStringValue(lb) String weightUnit(); and code that does if (kg.equals(constants.weightUnit())) { weightFactor = 2.2; } and then that factor would get inlined all over the codebase by the compiler where it is used. [Note, I don't recommend this pattern, but I have seen it used]. Ick. There are so many other ways to accomplish that, I don't see it as a valid use case for something that would likely be opt in. So, it isn't as simple as doing string substitution on the compiled output. Even discounting plural forms (and frankly, I think any properly localized app needs to use them), there are other cases where it would be rather expensive to be able to do string substitutions on the compiled output. One possible approach would be extending the runtime locales approach (similar to Bob's soft permutations) to cover Messages/Constants. That way the code is optimized for each one, but there is basically a switch for the proper implementation for the current locale, and that choice is made once. You still lose inlining and you are downloading code you will never execute, but perhaps there could be some runAsync integration to reduce the download penalty. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6560 committed - Svn prop changes from merge, to get them out of my face.
Revision: 6560 Author: fabb...@google.com Date: Fri Oct 30 11:05:12 2009 Log: Svn prop changes from merge, to get them out of my face. http://code.google.com/p/google-web-toolkit/source/detail?r=6560 Modified: /branches/snapshot-2009.10.23-r6446 /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/core/ext/ServletContainer.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/core/ext/ServletContainerLauncher.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/BootStrapPlatform.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/DevMode.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/DevModeBase.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/DevelModeTabKey.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/Disconnectable.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/GWTShell.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/ModulePanel.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/ModuleTabPanel.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/SessionModule.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/WebServerPanel.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/BrowserChannel.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/BrowserChannelClient.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/BrowserChannelException.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/BrowserChannelServer.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/BrowserListener.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/CloseButton.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/HostedModePluginObject.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/HtmlUnitSessionHandler.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/Icons.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/JavaObject.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/JsValue.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/JsValueGlue.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/JsValueOOPHM.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/Jsni.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/MethodDispatch.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/ModuleSpaceOOPHM.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/OophmSessionHandler.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/RemoteObjectTable.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/ServerMethods.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/ServerObjectsTable.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/SessionData.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/ShellMainWindow.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/close.png /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/ie /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/log/SwingLoggerPanel.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/log/SwingTreeLogger.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/log/icon-close.png /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/shell/rewrite/RewriteSingleJsoImplDispatches.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/util/BrowserInfo.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerDisableAggressiveOptimization.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerEnableAssertions.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerOutDir.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerWorkDirOptional.java /branches/snapshot-2009.10.23-r6446/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerWorkDirRequired.java /branches/snapshot-2009.10.23-r6446/dev/core/test/com/google/gwt/dev/AboutTest.java /branches/snapshot-2009.10.23-r6446/dev/core/test/com/google/gwt/dev/DevelModeTabKeyTest.java
[gwt-contrib] Re: Code Review Request: Addition of clientId and initialization message for the RemoteUI
Thanks. http://gwt-code-reviews.appspot.com/89809 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Code Review Request: Addition of clientId and initialization message for the RemoteUI
Thanks. http://gwt-code-reviews.appspot.com/89809 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Code Review Request: Addition of clientId and initialization message for the RemoteUI
On 2009/10/30 18:09:39, rdayal wrote: Thanks. Checkstyle/build run without a problem. Committed as r6559. Cherry-picked into 2.0 at r6561. http://gwt-code-reviews.appspot.com/89809 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6562 committed - Updated branch info to reflect the merge at r6561.
Revision: 6562 Author: rda...@google.com Date: Fri Oct 30 11:09:22 2009 Log: Updated branch info to reflect the merge at r6561. http://code.google.com/p/google-web-toolkit/source/detail?r=6562 Modified: /releases/2.0/branch-info.txt === --- /releases/2.0/branch-info.txt Thu Oct 29 22:34:03 2009 +++ /releases/2.0/branch-info.txt Fri Oct 30 11:09:22 2009 @@ -131,3 +131,7 @@ uibinder.sample - uibinder.test, run parser tests, fix XMLElementTestWarnings svn merge --ignore-ancestry -r 6552:6556 https://google-web-toolkit.googlecode.com/svn/trunk . +tr...@6559 was merged into this branch + Modified the remote UI protocol to send an initialization message with the client id. + svn merge --ignore-ancestry -c 6559 http://google-web-toolkit.googlecode.com/svn/trunk/ . + --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6563 committed - Merge r6470, Fix for issue 3374. This patch adds overloads of ...
Revision: 6563 Author: fabb...@google.com Date: Fri Oct 30 11:26:38 2009 Log: Merge r6470, Fix for issue 3374. This patch adds overloads of encodeComponent and decodeComponent to deal differently with spaces (keeping them as %20 rather than replacing them with +) and therefore allow their use for path segments (useful when using RESTful services). http://gwt-code-reviews.appspot.com/87806 Patch by: t.bro...@gmail.com Review by: rj...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=6563 Modified: /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/http/client/URL.java /branches/snapshot-2009.10.23-r6446/user/test/com/google/gwt/http/client/URLTest.java === --- /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/http/client/URL.java Wed Apr 18 12:41:21 2007 +++ /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/http/client/URL.java Fri Oct 30 11:26:38 2009 @@ -56,6 +56,25 @@ encodedURLComponent); return decodeComponentImpl(encodedURLComponent); } + + /** + * Returns a string where all URL component escape sequences have been + * converted back to their original character representations. + * + * @param encodedURLComponent string containing encoded URL component + *sequences + * @param fromQueryString if codetrue/code, +'s will be turned into + *spaces, otherwise they'll be kept as-is. + * @return string with no encoded URL component encoded sequences + * + * @throws NullPointerException if encodedURLComponent is codenull/code + */ + public static String decodeComponent(String encodedURLComponent, + boolean fromQueryString) { +StringValidator.throwIfNull(encodedURLComponent, encodedURLComponent); +return fromQueryString ? decodeComponentImpl(encodedURLComponent) +: decodeComponentRawImpl(encodedURLComponent); + } /** * Returns a string where all characters that are not valid for a complete URL @@ -130,6 +149,44 @@ decodedURLComponent); return encodeComponentImpl(decodedURLComponent); } + + /** + * Returns a string where all characters that are not valid for a URL + * component have been escaped. The escaping of a character is done by + * converting it into its UTF-8 encoding and then encoding each of the + * resulting bytes as a %xx hexadecimal escape sequence. + * + * p + * The following character sets are emnot/em escaped by this method: + * ul + * liASCII digits or letters/li + * liASCII punctuation characters: pre- _ . ! ~ * ' ( )/pre/li + * /ul + * /p + * + * p + * Notice that this method emdoes/em encode the URL component delimiter + * characters:blockquote + * + * pre + * ; / ? : amp; = + $ , # + * /pre + * + * /blockquote + * /p + * + * @param decodedURLComponent a string containing invalid URL characters + * @param queryStringSpaces if codetrue/code, spaces will be encoded as +'s. + * @return a string with all invalid URL characters escaped + * + * @throws NullPointerException if decodedURLComponent is codenull/code + */ + public static String encodeComponent(String decodedURLComponent, + boolean queryStringSpaces) { +StringValidator.throwIfNull(decodedURLComponent, decodedURLComponent); +return queryStringSpaces ? encodeComponentImpl(decodedURLComponent) +: encodeComponentRawImpl(decodedURLComponent); + } /* * Note: this method will convert the space character escape short form, '+', @@ -140,6 +197,10 @@ return decodeURIComponent(encodedURLComponent.replace(regexp, %20)); }-*/; + private static native String decodeComponentRawImpl(String encodedURLComponent) /*-{ +return decodeURIComponent(encodedURLComponent); + }-*/; + private static native String decodeImpl(String encodedURL) /*-{ return decodeURI(encodedURL); }-*/; @@ -153,6 +214,10 @@ return encodeURIComponent(decodedURLComponent).replace(regexp, +); }-*/; + private static native String encodeComponentRawImpl(String decodedURLComponent) /*-{ +return encodeURIComponent(decodedURLComponent); + }-*/; + private static native String encodeImpl(String decodedURL) /*-{ return encodeURI(decodedURL); }-*/; === --- /branches/snapshot-2009.10.23-r6446/user/test/com/google/gwt/http/client/URLTest.java Wed Apr 18 12:41:21 2007 +++ /branches/snapshot-2009.10.23-r6446/user/test/com/google/gwt/http/client/URLTest.java Fri Oct 30 11:26:38 2009 @@ -22,10 +22,11 @@ */ public class URLTest extends GWTTestCase { - private final String DECODED_URL = http://www.foo \u00E9 bar.com/1_!~*'();/?@=+$,#; - private final String DECODED_URL_COMPONENT = -_.!~*'():/#?@ \u00E9 ; - private final String ENCODED_URL = http://www.foo%20%C3%A9%20bar.com/1_!~*'();/?@=+$,#; - private final String
[gwt-contrib] Re: Fix a daylight saving bug
On Fri, Oct 30, 2009 at 1:31 PM, Bruce Johnson br...@google.com wrote: If you're confident in the fix, Dan, instead of adding a test right now, please just add an issue instead to remind us to review in the future what kind of testing mechanism we would have needed to make a unit test easy to create for this case. I want to make sure we revisit this at some point to round out our testing story, even for hard things to test. Note that once the timezone stuff lands, this will both be easier to test (as you could substitute different timezones, though there would still be issues with failing to compensate for the browser's timezone properly) and should fix this problem for good. There are in fact timezones that advance other than one hour, and the timezone fix handles that by downloading the correct set of transition points for the specified timezone (and figuring out the default timezone by fingerprinting the timezone offsets in the browser). -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6564 committed - Fixes script permissions, see http://gwt-code-reviews.appspot.com/8980...
Revision: 6564 Author: fabb...@google.com Date: Fri Oct 30 12:00:05 2009 Log: Fixes script permissions, see http://gwt-code-reviews.appspot.com/89805. Review by: scottb Issue: 4718 http://code.google.com/p/google-web-toolkit/source/detail?r=6564 Modified: /trunk/distro-source/build.xml === --- /trunk/distro-source/build.xml Fri Oct 16 07:16:57 2009 +++ /trunk/distro-source/build.xml Fri Oct 30 12:00:05 2009 @@ -31,7 +31,7 @@ !-- raw files -- zipfileset dir=${dist.resources} prefix=${project.distname} / - zipfileset dir=src prefix=${project.distname} / + zipfileset filemode=755 dir=src prefix=${project.distname} / !-- doc -- zipfileset dir=${gwt.build.out} prefix=${project.distname} @@ -58,5 +58,12 @@ -- mkdir dir=${gwt.build.staging} / unzip src=${project.dist} dest=${gwt.build.staging} / +!-- cute. zipinfo says the zip has good perms, unzip gets it right, but + ant unzip leaves the perms as non-executable... go figure. -- +chmod perm=uga+rx + fileset dir=${gwt.build.staging}/gwt-${gwt.version} +patternset refid=chmod.executables/ + /fileset +/chmod /target /project --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6565 committed - Merge r6470, This allows multiple source files to be specified for a ...
Revision: 6565 Author: fabb...@google.com Date: Fri Oct 30 12:02:11 2009 Log: Merge r6470, This allows multiple source files to be specified for a ui:style, just like any other CssResource. It also allows you to put body text on a ui:style that has sources. The body becomes just one more source file, the last one--nice for local tweaks on centrally defined styles. ResourceGeneratorUtil patch by bobv, reviewed by rjrjr Remainder by rjrjr, reviewed by jgw http://gwt-code-reviews.appspot.com/77819 http://code.google.com/p/google-web-toolkit/source/detail?r=6565 Added: /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/uibinder/sample/client/Menu.css Modified: /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/resources/ext/ResourceGeneratorUtil.java /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/uibinder/rebind/BundleWriter.java /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/uibinder/rebind/XMLElement.java /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/uibinder/rebind/model/ImplicitCssResource.java /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/uibinder/sample/client/WidgetBasedUi.css /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/uibinder/sample/client/WidgetBasedUi.ui.xml /branches/snapshot-2009.10.23-r6446/user/test/com/google/gwt/uibinder/sample/client/UiBinderTest.java === --- /dev/null +++ /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/uibinder/sample/client/Menu.css Fri Oct 30 12:02:11 2009 @@ -0,0 +1,4 @@ +.menuBar { + border:solid; + background-color:white; +} === --- /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/resources/ext/ResourceGeneratorUtil.java Wed Aug 26 08:44:19 2009 +++ /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/resources/ext/ResourceGeneratorUtil.java Fri Oct 30 12:02:11 2009 @@ -202,8 +202,8 @@ public static URL[] findResources(TreeLogger logger, ClassLoader classLoader, ResourceContext context, JMethod method, String[] defaultSuffixes) throws UnableToCompleteException { -return findResources(logger, new ClassLoaderLocator(classLoader), context, -method, defaultSuffixes, true); +return findResources(logger, new Locator[] {new ClassLoaderLocator( +classLoader)}, context, method, defaultSuffixes); } /** @@ -281,34 +281,14 @@ public static URL[] findResources(TreeLogger logger, ResourceContext context, JMethod method, String[] defaultSuffixes) throws UnableToCompleteException { -URL[] toReturn = null; -Locator locator; - -// If we have named files, attempt them first -if (!namedFiles.isEmpty()) { - toReturn = findResources(logger, FileLocator.INSTANCE, context, method, - defaultSuffixes, false); -} - -if (toReturn == null) { - // Try to find the resources with ResourceOracle - locator = new ResourceOracleLocator( - context.getGeneratorContext().getResourcesOracle()); - - // Don't report errors since we have a fallback mechanism - toReturn = findResources(logger, locator, context, method, - defaultSuffixes, false); -} - -if (toReturn == null) { - // Since not all resources were found, try with ClassLoader - locator = new ClassLoaderLocator( - Thread.currentThread().getContextClassLoader()); - - // Do report hard failures - toReturn = findResources(logger, locator, context, method, - defaultSuffixes, true); -} +Locator[] locators = { +FileLocator.INSTANCE, +new ResourceOracleLocator( +context.getGeneratorContext().getResourcesOracle()), +new ClassLoaderLocator(Thread.currentThread().getContextClassLoader())}; + +URL[] toReturn = findResources(logger, locators, context, method, +defaultSuffixes); return toReturn; } @@ -331,14 +311,10 @@ /** * Main implementation of findResources. - * - * @param reportErrors controls whether or not the inability to locate any - * given resource should be a hard error (throw an UnableToComplete) - * or a soft error (return null). */ - private static URL[] findResources(TreeLogger logger, Locator locator, - ResourceContext context, JMethod method, String[] defaultSuffixes, - boolean reportErrors) throws UnableToCompleteException { + private static URL[] findResources(TreeLogger logger, Locator[] locators, + ResourceContext context, JMethod method, String[] defaultSuffixes) + throws UnableToCompleteException { logger = logger.branch(TreeLogger.DEBUG, Finding resources); String locale; @@ -360,21 +336,22 @@ if (defaultSuffixes != null) { for
[gwt-contrib] [google-web-toolkit] r6566 committed - Improve the error message for 'GWT.create(UiBInder.class)'...
Revision: 6566 Author: r...@google.com Date: Fri Oct 30 12:10:56 2009 Log: Improve the error message for 'GWT.create(UiBInder.class)' (as opposed to a subclass of UiBinder). Review by: rjrjr http://code.google.com/p/google-web-toolkit/source/detail?r=6566 Modified: /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java === --- /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java Thu Oct 29 14:57:19 2009 +++ /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java Fri Oct 30 12:10:56 2009 @@ -272,8 +272,28 @@ this.messages = new MessagesWriter(BINDER_URI, logger, templatePath, baseClass.getPackage().getName(), this.implClassName); -JClassType uiBinderType = baseClass.getImplementedInterfaces()[0]; +// Check for possible misuse 'GWT.create(UiBinder.class)' +JClassType uibinderItself = + oracle.findType(UiBinder.class.getCanonicalName()); +if (uibinderItself.equals(baseClass)) { + die(You must use a subtype of UiBinder in GWT.create(). E.g.,\n + + interface Binder extends UiBinderWidget, MyClass {}\n + + GWT.create(Binder.class);); +} + +JClassType[] uiBinderTypes = baseClass.getImplementedInterfaces(); +if (uiBinderTypes.length == 0) { + throw new RuntimeException(No implemented interfaces for + + baseClass.getName()); +} +JClassType uiBinderType = uiBinderTypes[0]; + JClassType[] typeArgs = uiBinderType.isParameterized().getTypeArgs(); +if (typeArgs.length 2) { + throw new RuntimeException( + Root and owner type parameters are required for type %s + + uiBinderType.getName()); +} uiRootType = typeArgs[0]; uiOwnerType = typeArgs[1]; @@ -786,7 +806,11 @@ private BundleAttributeParser createBundleParser(JClassType bundleClass, XMLAttribute attribute) throws UnableToCompleteException { -final String templateResourceName = attribute.getName().split(:)[0]; +final String[] templateResourceNames = attribute.getName().split(:); +if (templateResourceNames.length == 0) { + throw new RuntimeException(No template resource); +} +final String templateResourceName = templateResourceNames[0]; warn(The %1$s mechanism is deprecated. Instead, declare the following + %2$s:with element as a child of your %2$s:UiBinder element: + %2$s:with field='%3$s' type='%4$s.%5$s' /, BUNDLE_URI_SCHEME, --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6567 committed - Merged r6564, fix script permissions for *Creator and benchmarkViewer
Revision: 6567 Author: fabb...@google.com Date: Fri Oct 30 13:01:57 2009 Log: Merged r6564, fix script permissions for *Creator and benchmarkViewer http://code.google.com/p/google-web-toolkit/source/detail?r=6567 Modified: /releases/2.0/branch-info.txt /releases/2.0/distro-source/build.xml === --- /releases/2.0/branch-info.txt Fri Oct 30 11:09:22 2009 +++ /releases/2.0/branch-info.txt Fri Oct 30 13:01:57 2009 @@ -134,4 +134,8 @@ tr...@6559 was merged into this branch Modified the remote UI protocol to send an initialization message with the client id. svn merge --ignore-ancestry -c 6559 http://google-web-toolkit.googlecode.com/svn/trunk/ . - + +tr...@6564 was merged into this branch + Fixed script permissions for *Creator and benchmarkViewer + svn merge -c 6564 http://google-web-toolkit.googlecode.com/svn/trunk/ . + === --- /releases/2.0/distro-source/build.xml Fri Oct 16 07:16:57 2009 +++ /releases/2.0/distro-source/build.xml Fri Oct 30 13:01:57 2009 @@ -31,7 +31,7 @@ !-- raw files -- zipfileset dir=${dist.resources} prefix=${project.distname} / - zipfileset dir=src prefix=${project.distname} / + zipfileset filemode=755 dir=src prefix=${project.distname} / !-- doc -- zipfileset dir=${gwt.build.out} prefix=${project.distname} @@ -58,5 +58,12 @@ -- mkdir dir=${gwt.build.staging} / unzip src=${project.dist} dest=${gwt.build.staging} / +!-- cute. zipinfo says the zip has good perms, unzip gets it right, but + ant unzip leaves the perms as non-executable... go figure. -- +chmod perm=uga+rx + fileset dir=${gwt.build.staging}/gwt-${gwt.version} +patternset refid=chmod.executables/ + /fileset +/chmod /target /project --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6568 committed - Merge 6481, Just remembered that MenuItemParser has support for the ol...
Revision: 6568 Author: fabb...@google.com Date: Fri Oct 30 13:26:53 2009 Log: Merge 6481, Just remembered that MenuItemParser has support for the old phantom MenuItemHTML child, which I killed off like a year ago. Getting rid of that support drastically simplifies the class. It also revealed a bug in UiBinderWriter#getClassHierarchyBreadthFirst: it was actually depth first, leading primitive parsers like UiObjectParser to fire before higher level stuff like HasHTMLParser. Reviewed by jgw http://code.google.com/p/google-web-toolkit/source/detail?r=6568 Modified: /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/uibinder/parsers/MenuItemParser.java /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java === --- /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/uibinder/parsers/MenuItemParser.java Tue Sep 1 15:14:29 2009 +++ /branches/snapshot-2009.10.23-r6446/user/src/com/google/gwt/uibinder/parsers/MenuItemParser.java Fri Oct 30 13:26:53 2009 @@ -1,12 +1,12 @@ /* * Copyright 2009 Google Inc. - * + * * Licensed under the Apache License, Version 2.0 (the License); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -19,6 +19,8 @@ import com.google.gwt.core.ext.typeinfo.JClassType; import com.google.gwt.uibinder.rebind.UiBinderWriter; import com.google.gwt.uibinder.rebind.XMLElement; +import com.google.gwt.uibinder.rebind.XMLElement.Interpreter; +import com.google.gwt.user.client.ui.MenuBar; import com.google.gwt.user.client.ui.MenuItem; /** @@ -26,98 +28,43 @@ */ public class MenuItemParser implements ElementParser { - /** - * Used by {...@link XMLElement#consumeInnerHtml}. Gets to examine - * each dom element. Removes gwt:MenuBar elements and hands them - * to the template writer to be interpreted as widgets. Replaces - * gwt:MenuItemHTML elements with their consumeInnerHtml contents, - * and warns that they are deprecated. - */ - private static class MenuItemGutsInterpreter - implements XMLElement.InterpreterString { -private final String namespaceUri; -private final HtmlInterpreter htmlInterpreter; -private final UiBinderWriter writer; -private final String errorContext; - -private String menuBarField; - -public MenuItemGutsInterpreter(UiBinderWriter writer, String namespaceUri, -String errorContext, HtmlInterpreter htmlInterpreter) { - this.writer = writer; - this.errorContext = errorContext; - this.namespaceUri = namespaceUri; - this.htmlInterpreter = htmlInterpreter; -} - -public String interpretElement(XMLElement elem) -throws UnableToCompleteException { - if (isMenuHtml(elem)) { -writer.warn(In %s, the MenuItemHTML element is no longer required, -+ and its contents have been inlined. This will become an error., -errorContext); -return elem.consumeInnerHtml(htmlInterpreter); - } - - if (isMenuBar(elem)) { -if (menuBarField != null) { - writer.die(In %s, only one MenuBar may be contained in a MenuItem, - errorContext); -} -menuBarField = writer.parseElementToField(elem); -return ; + public void parse(final XMLElement elem, String fieldName, JClassType type, + final UiBinderWriter writer) throws UnableToCompleteException { +writer.setFieldInitializerAsConstructor(fieldName, +writer.getOracle().findType(MenuItem.class.getName()), \\, +(com.google.gwt.user.client.Command) null); + +final JClassType menuBarType = writer.getOracle().findType( +MenuBar.class.getCanonicalName()); + +class MenuBarInterpreter implements InterpreterBoolean { + String menuBarField = null; + + public Boolean interpretElement(XMLElement child) + throws UnableToCompleteException { + +if (isMenuBar(child)) { + if (menuBarField != null) { +writer.die( +In %s, only one MenuBar may be contained in a MenuItem, elem); + } + menuBarField = writer.parseElementToField(child); + return true; +} + +return false; } - return null; + boolean isMenuBar(XMLElement child) throws UnableToCompleteException { +return menuBarType.equals(writer.findFieldType(child)); + } } -String getMenuBarField() { - return menuBarField; -} - -private boolean isMenuBar(XMLElement child) { - return namespaceUri.equals(child.getNamespaceUri())
[gwt-contrib] [google-web-toolkit] r6569 committed - Adds patch to JsStaticEval to simplify literal1 + literal2 operations....
Revision: 6569 Author: cromwellian Date: Fri Oct 30 14:23:53 2009 Log: Adds patch to JsStaticEval to simplify literal1 + literal2 operations. (where literal can be one of: null, boolean, number, string) Patch by: cromwellian Review by: bobv http://code.google.com/p/google-web-toolkit/source/detail?r=6569 Modified: /trunk/dev/core/src/com/google/gwt/dev/js/JsStaticEval.java /trunk/dev/core/test/com/google/gwt/dev/js/JsStaticEvalTest.java === --- /trunk/dev/core/src/com/google/gwt/dev/js/JsStaticEval.java Thu Jun 11 13:01:57 2009 +++ /trunk/dev/core/src/com/google/gwt/dev/js/JsStaticEval.java Fri Oct 30 14:23:53 2009 @@ -33,15 +33,18 @@ import com.google.gwt.dev.js.ast.JsIf; import com.google.gwt.dev.js.ast.JsModVisitor; import com.google.gwt.dev.js.ast.JsNullLiteral; +import com.google.gwt.dev.js.ast.JsNumberLiteral; import com.google.gwt.dev.js.ast.JsPrefixOperation; import com.google.gwt.dev.js.ast.JsProgram; import com.google.gwt.dev.js.ast.JsStatement; +import com.google.gwt.dev.js.ast.JsStringLiteral; import com.google.gwt.dev.js.ast.JsUnaryOperation; import com.google.gwt.dev.js.ast.JsUnaryOperator; import com.google.gwt.dev.js.ast.JsValueLiteral; import com.google.gwt.dev.js.ast.JsVars; import com.google.gwt.dev.js.ast.JsVisitor; import com.google.gwt.dev.js.ast.JsWhile; +import com.google.gwt.dev.js.ast.JsBooleanLiteral; import com.google.gwt.dev.js.ast.JsVars.JsVar; import java.util.ArrayList; @@ -163,6 +166,8 @@ trySimplifyEq(x, arg1, arg2, ctx); } else if (op == JsBinaryOperator.NEQ) { trySimplifyNe(x, arg1, arg2, ctx); + } else if (op == JsBinaryOperator.ADD) { +trySimplifyAdd(x, arg1, arg2, ctx); } } @@ -449,6 +454,22 @@ return true; } +private boolean appendLiteral(StringBuilder result, JsValueLiteral val) { + if (val instanceof JsNumberLiteral) { +double number = ((JsNumberLiteral) val).getValue(); +result.append(fixTrailingZeroes(String.valueOf(number))); + } else if (val instanceof JsStringLiteral) { +result.append(((JsStringLiteral) val).getValue()); + } else if (val instanceof JsBooleanLiteral) { +result.append(((JsBooleanLiteral) val).getValue()); + } else if (val instanceof JsNullLiteral) { +result.append(null); + } else { +return false; + } + return true; +} + /** * This method MUST be called whenever any statements are removed from a * function. This is because some statements, such as JsVars or JsFunction @@ -480,6 +501,20 @@ } } +/* + * String.valueOf(Double) produces trailing .0 on integers which is + * incorrect for Javascript which produces conversions to string without + * trailing zeroes. Without this, int + String will turn out wrong. + */ +private String fixTrailingZeroes(String num) { + if (num.endsWith(.0)) { +String fixNum = num.substring(0, num.length() - 2); +assert Double.parseDouble(fixNum) == Double.parseDouble(num); +num = fixNum; + } + return num; +} + private SourceInfo makeSourceInfo(HasSourceInfo x, String m) { return x.getSourceInfo().makeChild(StaticEvalVisitor.class, m); } @@ -550,6 +585,30 @@ return original; } +/** + * Simplify a + b. + */ +private void trySimplifyAdd(JsExpression original, JsExpression arg1, +JsExpression arg2, JsContextJsExpression ctx) { + if (arg1 instanceof JsValueLiteral arg2 instanceof JsValueLiteral) { +// case: number + number +if (arg1 instanceof JsNumberLiteral +arg2 instanceof JsNumberLiteral) { + ctx.replaceMe(program.getNumberLiteral( + ((JsNumberLiteral) arg1).getValue() + + ((JsNumberLiteral) arg2).getValue())); +} else { + // cases: number + string or string + number + StringBuilder result = new StringBuilder(); + if (appendLiteral(result, (JsValueLiteral) arg1) + appendLiteral(result, (JsValueLiteral) arg2)) { + ctx.replaceMe(program.getStringLiteral(original.getSourceInfo(), +result.toString())); + } +} + } +} + private void trySimplifyEq(JsExpression original, JsExpression arg1, JsExpression arg2, JsContextJsExpression ctx) { JsExpression updated = simplifyEq(original, arg1, arg2); === --- /trunk/dev/core/test/com/google/gwt/dev/js/JsStaticEvalTest.javaWed Oct 28 09:10:53 2009 +++ /trunk/dev/core/test/com/google/gwt/dev/js/JsStaticEvalTest.javaFri Oct 30 14:23:53 2009 @@ -20,6 +20,16 @@ */ public class JsStaticEvalTest extends OptimizerTestBase { + public void testAddLiterals() throws Exception { +assertEquals(alert(42);, optimize(alert(21+21);)); +
[gwt-contrib] [google-web-toolkit] r6570 committed - Reverting r6456 because it was causing JUnitShell to wait indefinitely...
Revision: 6570 Author: jlaba...@google.com Date: Fri Oct 30 14:27:25 2009 Log: Reverting r6456 because it was causing JUnitShell to wait indefinitely for tests to finish. Since BrowserManagerServer can run tests in parallel (which it does by default), there is no need for this option. Patch by: jlabanca Review by: jat http://code.google.com/p/google-web-toolkit/source/detail?r=6570 Modified: /trunk/user/src/com/google/gwt/junit/JUnitShell.java /trunk/user/src/com/google/gwt/junit/RunStyle.java /trunk/user/src/com/google/gwt/junit/RunStyleManual.java /trunk/user/src/com/google/gwt/junit/RunStyleRemoteWeb.java === --- /trunk/user/src/com/google/gwt/junit/JUnitShell.javaWed Oct 28 13:37:33 2009 +++ /trunk/user/src/com/google/gwt/junit/JUnitShell.javaFri Oct 30 14:27:25 2009 @@ -684,22 +684,15 @@ */ protected boolean notDone() { int activeClients = messageQueue.getNumClientsRetrievedTest(currentTestInfo); -if (firstLaunch runStyle.isStartDelayed()) { - // Pretty print the list of clients for manual tests. - if (runStyle instanceof RunStyleManual) { -String[] newClients = messageQueue.getNewClients(); -int printIndex = activeClients - newClients.length + 1; -for (String newClient : newClients) { - System.out.println(printIndex + - + newClient); - ++printIndex; -} - } - - if (runStyle.wasInterrupted()) { -// Exit early if the test is interrupted. -throw new TimeoutException(A remote browser died a mysterious death.); - } else if (activeClients != this.numClients) { -// Wait forever for first contact. +if (firstLaunch runStyle instanceof RunStyleManual) { + String[] newClients = messageQueue.getNewClients(); + int printIndex = activeClients - newClients.length + 1; + for (String newClient : newClients) { +System.out.println(printIndex + - + newClient); +++printIndex; + } + if (activeClients != this.numClients) { +// Wait forever for first contact; user-driven. return true; } } === --- /trunk/user/src/com/google/gwt/junit/RunStyle.java Fri Oct 23 14:26:17 2009 +++ /trunk/user/src/com/google/gwt/junit/RunStyle.java Fri Oct 30 14:27:25 2009 @@ -49,15 +49,6 @@ public boolean initialize(String args) { return true; } - - /** - * Check whether or not tests start immediately or if they can be delayed. - * - * @return codetrue/code if the test can be delayed - */ - public boolean isStartDelayed() { -return false; - } /** * Requests initial launch of the browser. This should only be called once per === --- /trunk/user/src/com/google/gwt/junit/RunStyleManual.javaFri Oct 23 14:26:17 2009 +++ /trunk/user/src/com/google/gwt/junit/RunStyleManual.javaFri Oct 30 14:27:25 2009 @@ -45,14 +45,6 @@ shell.setNumClients(numClients); return true; } - - /** - * Manual tests are started by users in user time. - */ - @Override - public boolean isStartDelayed() { -return true; - } @Override public void launchModule(String moduleName) throws UnableToCompleteException { === --- /trunk/user/src/com/google/gwt/junit/RunStyleRemoteWeb.java Fri Oct 23 14:26:17 2009 +++ /trunk/user/src/com/google/gwt/junit/RunStyleRemoteWeb.java Fri Oct 30 14:27:25 2009 @@ -200,14 +200,6 @@ Runtime.getRuntime().addShutdownHook(new ShutdownCb()); return true; } - - /** - * Remote web tests can be queued for extended periods. - */ - @Override - public boolean isStartDelayed() { -return true; - } @Override public synchronized void launchModule(String moduleName) --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6571 committed - tr...@6570 was merged into this branch...
Revision: 6571 Author: jlaba...@google.com Date: Fri Oct 30 14:33:17 2009 Log: tr...@6570 was merged into this branch Revert r6456 because it was causing JUnitShell to wait indefinitely. svn merge --ignore-ancestry -c 6570 http://google-web-toolkit.googlecode.com/svn/trunk/ . Patch by: jlabanca http://code.google.com/p/google-web-toolkit/source/detail?r=6571 Modified: /releases/2.0/branch-info.txt /releases/2.0/user/src/com/google/gwt/junit/JUnitShell.java /releases/2.0/user/src/com/google/gwt/junit/RunStyle.java /releases/2.0/user/src/com/google/gwt/junit/RunStyleManual.java /releases/2.0/user/src/com/google/gwt/junit/RunStyleRemoteWeb.java === --- /releases/2.0/branch-info.txt Fri Oct 30 13:01:57 2009 +++ /releases/2.0/branch-info.txt Fri Oct 30 14:33:17 2009 @@ -139,3 +139,7 @@ Fixed script permissions for *Creator and benchmarkViewer svn merge -c 6564 http://google-web-toolkit.googlecode.com/svn/trunk/ . +tr...@6570 was merged into this branch + Revert r6456 because it was causing JUnitShell to wait indefinitely. + svn merge --ignore-ancestry -c 6570 http://google-web-toolkit.googlecode.com/svn/trunk/ . + === --- /releases/2.0/user/src/com/google/gwt/junit/JUnitShell.java Wed Oct 28 19:23:32 2009 +++ /releases/2.0/user/src/com/google/gwt/junit/JUnitShell.java Fri Oct 30 14:33:17 2009 @@ -684,22 +684,15 @@ */ protected boolean notDone() { int activeClients = messageQueue.getNumClientsRetrievedTest(currentTestInfo); -if (firstLaunch runStyle.isStartDelayed()) { - // Pretty print the list of clients for manual tests. - if (runStyle instanceof RunStyleManual) { -String[] newClients = messageQueue.getNewClients(); -int printIndex = activeClients - newClients.length + 1; -for (String newClient : newClients) { - System.out.println(printIndex + - + newClient); - ++printIndex; -} - } - - if (runStyle.wasInterrupted()) { -// Exit early if the test is interrupted. -throw new TimeoutException(A remote browser died a mysterious death.); - } else if (activeClients != this.numClients) { -// Wait forever for first contact. +if (firstLaunch runStyle instanceof RunStyleManual) { + String[] newClients = messageQueue.getNewClients(); + int printIndex = activeClients - newClients.length + 1; + for (String newClient : newClients) { +System.out.println(printIndex + - + newClient); +++printIndex; + } + if (activeClients != this.numClients) { +// Wait forever for first contact; user-driven. return true; } } === --- /releases/2.0/user/src/com/google/gwt/junit/RunStyle.java Sat Oct 24 08:11:35 2009 +++ /releases/2.0/user/src/com/google/gwt/junit/RunStyle.java Fri Oct 30 14:33:17 2009 @@ -49,15 +49,6 @@ public boolean initialize(String args) { return true; } - - /** - * Check whether or not tests start immediately or if they can be delayed. - * - * @return codetrue/code if the test can be delayed - */ - public boolean isStartDelayed() { -return false; - } /** * Requests initial launch of the browser. This should only be called once per === --- /releases/2.0/user/src/com/google/gwt/junit/RunStyleManual.java Sat Oct 24 08:11:35 2009 +++ /releases/2.0/user/src/com/google/gwt/junit/RunStyleManual.java Fri Oct 30 14:33:17 2009 @@ -45,14 +45,6 @@ shell.setNumClients(numClients); return true; } - - /** - * Manual tests are started by users in user time. - */ - @Override - public boolean isStartDelayed() { -return true; - } @Override public void launchModule(String moduleName) throws UnableToCompleteException { === --- /releases/2.0/user/src/com/google/gwt/junit/RunStyleRemoteWeb.java Sat Oct 24 08:11:35 2009 +++ /releases/2.0/user/src/com/google/gwt/junit/RunStyleRemoteWeb.java Fri Oct 30 14:33:17 2009 @@ -200,14 +200,6 @@ Runtime.getRuntime().addShutdownHook(new ShutdownCb()); return true; } - - /** - * Remote web tests can be queued for extended periods. - */ - @Override - public boolean isStartDelayed() { -return true; - } @Override public synchronized void launchModule(String moduleName) --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit] r6572 committed - Fixing the UiBinderTestApp. The tests don't use the app itself,...
Revision: 6572 Author: rj...@google.com Date: Fri Oct 30 15:47:46 2009 Log: Fixing the UiBinderTestApp. The tests don't use the app itself, just its constituent modules, so I didn't notice that you could no longer actually run the thing. Desk review by amitmanjhi http://code.google.com/p/google-web-toolkit/source/detail?r=6572 Added: /trunk/user/test/com/google/gwt/uibinder/test/public/UiBinderTestApp.html Deleted: /trunk/user/test/com/google/gwt/uibinder/test/public/UiBinderDemo.html Modified: /trunk/user/src/com/google/gwt/uibinder/UiBinder.gwt.xml /trunk/user/test/com/google/gwt/uibinder/test/UiBinderTestApp.gwt.xml === --- /dev/null +++ /trunk/user/test/com/google/gwt/uibinder/test/public/UiBinderTestApp.html Fri Oct 30 15:47:46 2009 @@ -0,0 +1,21 @@ +!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN + http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; +!-- -- +!-- Copyright 2008 Google Inc. -- +!-- Licensed under the Apache License, Version 2.0 (the License); you-- +!-- may not use this file except in compliance with the License. You may -- +!-- may obtain a copy of the License at-- +!-- -- +!-- http://www.apache.org/licenses/LICENSE-2.0 -- +!-- -- +!-- Unless required by applicable law or agreed to in writing, software-- +!-- distributed under the License is distributed on an AS IS BASIS, -- +!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or-- +!-- implied. License for the specific language governing permissions and -- +!-- limitations under the License. -- +html + head/head + body +script language='javascript' src='com.google.gwt.uibinder.test.UiBinderTestApp.nocache.js'/script + /body +/html === --- /trunk/user/test/com/google/gwt/uibinder/test/public/UiBinderDemo.html Thu Oct 29 21:43:40 2009 +++ /dev/null @@ -1,21 +0,0 @@ -!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN - http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; -!-- -- -!-- Copyright 2008 Google Inc. -- -!-- Licensed under the Apache License, Version 2.0 (the License); you-- -!-- may not use this file except in compliance with the License. You may -- -!-- may obtain a copy of the License at-- -!-- -- -!-- http://www.apache.org/licenses/LICENSE-2.0 -- -!-- -- -!-- Unless required by applicable law or agreed to in writing, software-- -!-- distributed under the License is distributed on an AS IS BASIS, -- -!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or-- -!-- implied. License for the specific language governing permissions and -- -!-- limitations under the License. -- -html - head/head - body -script language='javascript' src='com.google.gwt.uibinder.sample.UiBinderDemo.nocache.js'/script - /body -/html === --- /trunk/user/src/com/google/gwt/uibinder/UiBinder.gwt.xmlWed Aug 5 20:27:52 2009 +++ /trunk/user/src/com/google/gwt/uibinder/UiBinder.gwt.xmlFri Oct 30 15:47:46 2009 @@ -14,8 +14,7 @@ !-- GWT UI Binder support. -- module - !-- Inheriting the debug module -- - inherits name=com.google.gwt.debug.Debug/ + inherits name=com.google.gwt.resources.Resources / generate-with class=com.google.gwt.uibinder.rebind.UiBinderGenerator when-type-assignable class=com.google.gwt.uibinder.client.UiBinder/ === --- /trunk/user/test/com/google/gwt/uibinder/test/UiBinderTestApp.gwt.xml Thu Oct 29 21:43:40 2009 +++ /trunk/user/test/com/google/gwt/uibinder/test/UiBinderTestApp.gwt.xml Fri Oct 30 15:47:46 2009 @@ -13,7 +13,7 @@ !-- GWT UiBinder support. -- module - inherits name=com.google.gwt.resources.Resources / inherits name=com.google.gwt.uibinder.UiBinder / - entry-point class=com.google.gwt.uibinder.sample.client.UiBinderTestApp / + inherits name=com.google.gwt.debug.Debug/ + entry-point class=com.google.gwt.uibinder.test.client.UiBinderTestApp / /module --~--~-~--~~~---~--~~
[gwt-contrib] [google-web-toolkit] r6573 committed - tr...@6570 was merged into this branch...
Revision: 6573 Author: rj...@google.com Date: Fri Oct 30 16:12:45 2009 Log: tr...@6570 was merged into this branch Fixing the UiBinderTestApp svn merge --ignore-ancestry -c 6572 https://google-web-toolkit.googlecode.com/svn/trunk . http://code.google.com/p/google-web-toolkit/source/detail?r=6573 Added: /releases/2.0/user/test/com/google/gwt/uibinder/test/public/UiBinderTestApp.html Deleted: /releases/2.0/user/test/com/google/gwt/uibinder/test/public/UiBinderDemo.html Modified: /releases/2.0/branch-info.txt /releases/2.0/user/src/com/google/gwt/uibinder/UiBinder.gwt.xml /releases/2.0/user/test/com/google/gwt/uibinder/test/UiBinderTestApp.gwt.xml === --- /dev/null +++ /releases/2.0/user/test/com/google/gwt/uibinder/test/public/UiBinderTestApp.html Fri Oct 30 16:12:45 2009 @@ -0,0 +1,21 @@ +!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN + http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; +!-- -- +!-- Copyright 2008 Google Inc. -- +!-- Licensed under the Apache License, Version 2.0 (the License); you-- +!-- may not use this file except in compliance with the License. You may -- +!-- may obtain a copy of the License at-- +!-- -- +!-- http://www.apache.org/licenses/LICENSE-2.0 -- +!-- -- +!-- Unless required by applicable law or agreed to in writing, software-- +!-- distributed under the License is distributed on an AS IS BASIS, -- +!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or-- +!-- implied. License for the specific language governing permissions and -- +!-- limitations under the License. -- +html + head/head + body +script language='javascript' src='com.google.gwt.uibinder.test.UiBinderTestApp.nocache.js'/script + /body +/html === --- /releases/2.0/user/test/com/google/gwt/uibinder/test/public/UiBinderDemo.html Thu Oct 29 22:34:03 2009 +++ /dev/null @@ -1,21 +0,0 @@ -!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN - http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; -!-- -- -!-- Copyright 2008 Google Inc. -- -!-- Licensed under the Apache License, Version 2.0 (the License); you-- -!-- may not use this file except in compliance with the License. You may -- -!-- may obtain a copy of the License at-- -!-- -- -!-- http://www.apache.org/licenses/LICENSE-2.0 -- -!-- -- -!-- Unless required by applicable law or agreed to in writing, software-- -!-- distributed under the License is distributed on an AS IS BASIS, -- -!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or-- -!-- implied. License for the specific language governing permissions and -- -!-- limitations under the License. -- -html - head/head - body -script language='javascript' src='com.google.gwt.uibinder.sample.UiBinderDemo.nocache.js'/script - /body -/html === --- /releases/2.0/branch-info.txt Fri Oct 30 14:33:17 2009 +++ /releases/2.0/branch-info.txt Fri Oct 30 16:12:45 2009 @@ -143,3 +143,6 @@ Revert r6456 because it was causing JUnitShell to wait indefinitely. svn merge --ignore-ancestry -c 6570 http://google-web-toolkit.googlecode.com/svn/trunk/ . +tr...@6570 was merged into this branch + Fixing the UiBinderTestApp + svn merge --ignore-ancestry -c 6572 https://google-web-toolkit.googlecode.com/svn/trunk . === --- /releases/2.0/user/src/com/google/gwt/uibinder/UiBinder.gwt.xml Wed Aug 5 20:27:52 2009 +++ /releases/2.0/user/src/com/google/gwt/uibinder/UiBinder.gwt.xml Fri Oct 30 16:12:45 2009 @@ -14,8 +14,7 @@ !-- GWT UI Binder support. -- module - !-- Inheriting the debug module -- - inherits name=com.google.gwt.debug.Debug/ + inherits name=com.google.gwt.resources.Resources / generate-with class=com.google.gwt.uibinder.rebind.UiBinderGenerator when-type-assignable class=com.google.gwt.uibinder.client.UiBinder/ === --- /releases/2.0/user/test/com/google/gwt/uibinder/test/UiBinderTestApp.gwt.xml Thu Oct 29
[gwt-contrib] Moving AttributeParsers to XMLElement
Reviewers: hermes_google.com, rdamazio_google.com, Message: Review requested. Hermes, if you won't actually be able to get to this please let me know as quickly as you can. Our deadline is very near. Description: Moving AttributeParsers to XMLElement, where they belong. This is a pretty major refactoring, and it's not done yet. Management of the AttributeParser and the BundleAttributeParsers is now in dedicated classes. XMLElement has access to them, and uses them for Boolean values. All other parsing is still going through old calls through UiBinderWriter to the new managers. But this is a complete vertical slice, so I'd like to get it reviewed and checked in. Of particular note: there are now many fewer direct dependencies on UiBinderWriter, and much more DI style injection of logging and other services. Also, dummy loggers are introduced to eliminate console noise from unit tests. Next steps are making ComputedAttributeParser use the new game (and in the process tidy its fix for currently broken {{ escaping), and making the new LayoutPanelParsers get their Double values in the new style. Then on to strings. Please review this at http://gwt-code-reviews.appspot.com/91801 Affected files: M user/src/com/google/gwt/junit/JUnitShell.java M user/src/com/google/gwt/uibinder/parsers/AttributeParser.java M user/src/com/google/gwt/uibinder/parsers/BeanParser.java M user/src/com/google/gwt/uibinder/parsers/BooleanAttributeParser.java M user/src/com/google/gwt/uibinder/parsers/BundleAttributeParser.java M user/src/com/google/gwt/uibinder/parsers/CellPanelParser.java M user/src/com/google/gwt/uibinder/parsers/ComputedAttributeInterpreter.java M user/src/com/google/gwt/uibinder/parsers/CustomButtonParser.java M user/src/com/google/gwt/uibinder/parsers/DisclosurePanelParser.java M user/src/com/google/gwt/uibinder/parsers/DockPanelParser.java M user/src/com/google/gwt/uibinder/parsers/FieldInterpreter.java M user/src/com/google/gwt/uibinder/parsers/HTMLPanelParser.java M user/src/com/google/gwt/uibinder/parsers/HorizontalAlignmentConstantParser.java M user/src/com/google/gwt/uibinder/parsers/IntPairParser.java M user/src/com/google/gwt/uibinder/parsers/IntParser.java M user/src/com/google/gwt/uibinder/parsers/MenuBarParser.java M user/src/com/google/gwt/uibinder/parsers/RadioButtonParser.java M user/src/com/google/gwt/uibinder/parsers/SimpleAttributeParser.java M user/src/com/google/gwt/uibinder/parsers/StackPanelParser.java M user/src/com/google/gwt/uibinder/parsers/StrictAttributeParser.java M user/src/com/google/gwt/uibinder/parsers/StringAttributeParser.java M user/src/com/google/gwt/uibinder/parsers/TabPanelParser.java M user/src/com/google/gwt/uibinder/parsers/UIObjectParser.java M user/src/com/google/gwt/uibinder/parsers/VerticalAlignmentConstantParser.java A user/src/com/google/gwt/uibinder/rebind/AttributeParsers.java A user/src/com/google/gwt/uibinder/rebind/BundleAttributeParsers.java M user/src/com/google/gwt/uibinder/rebind/GetEscapedInnerTextVisitor.java M user/src/com/google/gwt/uibinder/rebind/GetInnerHtmlVisitor.java M user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java M user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java M user/src/com/google/gwt/uibinder/rebind/XMLAttribute.java M user/src/com/google/gwt/uibinder/rebind/XMLElement.java A user/src/com/google/gwt/uibinder/rebind/XMLElementProvider.java A user/src/com/google/gwt/uibinder/rebind/XMLElementProviderImpl.java M user/src/com/google/gwt/uibinder/rebind/messages/MessagesWriter.java A user/test/com/google/gwt/uibinder/All.java M user/test/com/google/gwt/uibinder/UiBinderGwtSuite.java A user/test/com/google/gwt/uibinder/rebind/DummyMortalLogger.java A user/test/com/google/gwt/uibinder/rebind/DummyTreeLogger.java M user/test/com/google/gwt/uibinder/rebind/XMLElementTest.java M user/test/com/google/gwt/uibinder/rebind/model/OwnerClassTest.java M user/test/com/google/gwt/uibinder/rebind/model/OwnerFieldClassTest.java M user/test/com/google/gwt/uibinder/rebind/model/OwnerFieldTest.java M user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java M user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.java M user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.ui.xml --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Inline Polymorphic Function Declarations
Reviewers: scottb, Lex, bobv, Description: Changes normal GWT vtable setup from function foo() { ... } _.foo = foo; to _.foo = function foo() { ... } This reduces gzip'ed size on Showcase by 2%. Independent testing of programs with 100% polymorphism shows that this can improve module parse/startup latency by 20% (or more on mobile WebKit). Showcase currently has about 30% functions polymorphic, so this might boil down to 6% savings in startup time (unbenchmarked) Note, that if you don't desire correct stack traces, you can use the following construct: _.foo = function() { ... } This results in a 6% post-gzip size reduction on Showcase. It might be useful to introduce a permutation parameter like stripStackInformation, like -XdisableClassMetadata to enable this feature. Please review this at http://gwt-code-reviews.appspot.com/89810 Affected files: dev/core/src/com/google/gwt/dev/jjs/impl/FragmentExtractor.java dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java dev/core/src/com/google/gwt/dev/js/EvalFunctionsAtTopScope.java --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Inline Polymorphic Function Declarations
Very cool find. On Fri, Oct 30, 2009 at 8:00 PM, cromwell...@gmail.com wrote: Note, that if you don't desire correct stack traces, you can use the following construct: _.foo = function() { ... } This results in a 6% post-gzip size reduction on Showcase. It might be useful to introduce a permutation parameter like stripStackInformation, like -XdisableClassMetadata to enable this feature. Please add an issue to go back and actually add this ability. 6% on Showcase is too good to turn down; likely it would be even bigger on real-world apps with lots more patterns that induce runtime polymorphism. In terms of design, I think this would actually be best as a permutation-specific conditional deferred binding property that the compiler is sensitive to (that was a mouthful), so that it would be possible to let app developers control how many stack trace-enabled users there are, in the same way they can control how many users get the expensive emulated stack traces on IE. I would guess something like = 10% would need stack traces enabled to still get good stats. --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Inline Polymorphic Function Declarations
On Fri, Oct 30, 2009 at 8:24 PM, Bruce Johnson br...@google.com wrote: In terms of design, I think this would actually be best as a permutation-specific conditional deferred binding property that the compiler is sensitive to (that was a mouthful), so that it would be possible to let app developers control how many stack trace-enabled users there are, in the same way they can control how many users get the expensive emulated stack traces on IE. I would guess something like = 10% would need stack traces enabled to still get good stats. Perhaps we can think of it as a tri-state variable: strip stack info, browser supplied stack info, emulated stack info. Choose per permutation. -Ray --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Inline Polymorphic Function Declarations
I wish we could wrap that all up in a simpler-to-understand package. But a good article would make it at least bearable. On Saturday, October 31, 2009, Ray Cromwell cromwell...@gmail.com wrote: On Fri, Oct 30, 2009 at 8:24 PM, Bruce Johnson br...@google.com wrote: In terms of design, I think this would actually be best as a permutation-specific conditional deferred binding property that the compiler is sensitive to (that was a mouthful), so that it would be possible to let app developers control how many stack trace-enabled users there are, in the same way they can control how many users get the expensive emulated stack traces on IE. I would guess something like = 10% would need stack traces enabled to still get good stats. Perhaps we can think of it as a tri-state variable: strip stack info, browser supplied stack info, emulated stack info. Choose per permutation. -Ray --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Inline Polymorphic Function Declarations
Maybe it would make sense to move properties which the compiler relies on into a special CompilerFlags.gwt.xml module, then if you want to change class meta data, class cast checking, aggressive optimization, or stack info, there'd be one centralized place to look at and document all the flags.? -Ray On Fri, Oct 30, 2009 at 9:31 PM, Bruce Johnson br...@google.com wrote: I wish we could wrap that all up in a simpler-to-understand package. But a good article would make it at least bearable. On Saturday, October 31, 2009, Ray Cromwell cromwell...@gmail.com wrote: On Fri, Oct 30, 2009 at 8:24 PM, Bruce Johnson br...@google.com wrote: In terms of design, I think this would actually be best as a permutation-specific conditional deferred binding property that the compiler is sensitive to (that was a mouthful), so that it would be possible to let app developers control how many stack trace-enabled users there are, in the same way they can control how many users get the expensive emulated stack traces on IE. I would guess something like = 10% would need stack traces enabled to still get good stats. Perhaps we can think of it as a tri-state variable: strip stack info, browser supplied stack info, emulated stack info. Choose per permutation. -Ray --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Inline Polymorphic Function Declarations
yep, and all of them should be per-perm On Saturday, October 31, 2009, Ray Cromwell cromwell...@gmail.com wrote: Maybe it would make sense to move properties which the compiler relies on into a special CompilerFlags.gwt.xml module, then if you want to change class meta data, class cast checking, aggressive optimization, or stack info, there'd be one centralized place to look at and document all the flags.? -Ray On Fri, Oct 30, 2009 at 9:31 PM, Bruce Johnson br...@google.com wrote: I wish we could wrap that all up in a simpler-to-understand package. But a good article would make it at least bearable. On Saturday, October 31, 2009, Ray Cromwell cromwell...@gmail.com wrote: On Fri, Oct 30, 2009 at 8:24 PM, Bruce Johnson br...@google.com wrote: In terms of design, I think this would actually be best as a permutation-specific conditional deferred binding property that the compiler is sensitive to (that was a mouthful), so that it would be possible to let app developers control how many stack trace-enabled users there are, in the same way they can control how many users get the expensive emulated stack traces on IE. I would guess something like = 10% would need stack traces enabled to still get good stats. Perhaps we can think of it as a tri-state variable: strip stack info, browser supplied stack info, emulated stack info. Choose per permutation. -Ray --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Inline Polymorphic Function Declarations
I ran tests on iPhone and Android 2.0 SDK with Showcase and I didn't see any significant different in startup times over wifi (3g/3dge may be a different story), so the latency improvement really only shows up in degenerate test cases where all functions are polymorphic, small and/or empty, so that parsing function decl headers becomes dominant. However, a 2-6% size reduction is nothing to sniff at, so I'd still say it's worth it. Onto the String eval idea. :) -Ray On Fri, Oct 30, 2009 at 10:08 PM, Bruce Johnson br...@google.com wrote: yep, and all of them should be per-perm On Saturday, October 31, 2009, Ray Cromwell cromwell...@gmail.com wrote: Maybe it would make sense to move properties which the compiler relies on into a special CompilerFlags.gwt.xml module, then if you want to change class meta data, class cast checking, aggressive optimization, or stack info, there'd be one centralized place to look at and document all the flags.? -Ray On Fri, Oct 30, 2009 at 9:31 PM, Bruce Johnson br...@google.com wrote: I wish we could wrap that all up in a simpler-to-understand package. But a good article would make it at least bearable. On Saturday, October 31, 2009, Ray Cromwell cromwell...@gmail.com wrote: On Fri, Oct 30, 2009 at 8:24 PM, Bruce Johnson br...@google.com wrote: In terms of design, I think this would actually be best as a permutation-specific conditional deferred binding property that the compiler is sensitive to (that was a mouthful), so that it would be possible to let app developers control how many stack trace-enabled users there are, in the same way they can control how many users get the expensive emulated stack traces on IE. I would guess something like = 10% would need stack traces enabled to still get good stats. Perhaps we can think of it as a tri-state variable: strip stack info, browser supplied stack info, emulated stack info. Choose per permutation. -Ray --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---