Thursday, November 21, 2024

Re: Issue with enhanced switch statements in GWT 2.12.1

lack of caffeine indeed.

Somehow the sentence that was explaining the problem disappeared for me between scrolls..

Sorry

On Thu, Nov 21, 2024 at 10:38 AM Vassilis Virvilis <vasvir2@gmail.com> wrote:
I must be low on caffeine because I can't see the problem.

Is the problem that it doesn't print:
Test 2 - Done
at the end?

On Thu, Nov 21, 2024 at 10:28 AM Craig Mitchell <mail@craig-mitchell.com> wrote:

> Switch statements can correctly compile without being contained in braces

For me, they compile, but they don't work.  Eg.  This code:

GWT.log("Test 1 - Start");
switch (1) {
  case 1 -> {
    GWT.log("Test 1 - 1");
  }
  case 2 -> {
    GWT.log("Test 1 - 2");
  }
  case 3 -> {
    GWT.log("Test 1 - 3");
  }
}
GWT.log("Test 1 - Done");

GWT.log("Test 2 - Start");
switch (1) {
  case 1 -> GWT.log("Test 2 - 1");
  case 2 -> GWT.log("Test 2 - 2");
  case 3 -> GWT.log("Test 2 - 3");
}
GWT.log("Test 2 - Done");

Will never get to the last "Test 2 - Done" line.  The output will be:
Test 1 - Start
Test 1 - 1
Test 1 - Done
Test 2 - Start
Test 2 - 1

Is this a known issue?

Thanks.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/d0b4fe79-0571-481a-bf4f-c8ccda40e486n%40googlegroups.com.


--
Vassilis Virvilis


--
Vassilis Virvilis

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/CAKbOjEwsxyVcvfy_7nvPfn%3DYb%2BQr9pDBU6xcOYtOcu1gvk1xFg%40mail.gmail.com.

Re: Issue with enhanced switch statements in GWT 2.12.1

Thanks Thomas.  Yes, that's the same issue.  I've now commented on it.  Cheers.

On Thursday, 21 November 2024 at 8:04:39 pm UTC+11 Thomas Broyer wrote:
Could be related to https://github.com/gwtproject/gwt/issues/10044

Fwiw, the issue fixed in 2.12.1 was not about the "case x -> foo" vs "case x -> { foo }" but about enclosing the whole switch inside a block.

On Thursday, November 21, 2024 at 9:28:51 AM UTC+1 ma...@craig-mitchell.com wrote:

> Switch statements can correctly compile without being contained in braces

For me, they compile, but they don't work.  Eg.  This code:

GWT.log("Test 1 - Start");
switch (1) {
  case 1 -> {
    GWT.log("Test 1 - 1");
  }
  case 2 -> {
    GWT.log("Test 1 - 2");
  }
  case 3 -> {
    GWT.log("Test 1 - 3");
  }
}
GWT.log("Test 1 - Done");

GWT.log("Test 2 - Start");
switch (1) {
  case 1 -> GWT.log("Test 2 - 1");
  case 2 -> GWT.log("Test 2 - 2");
  case 3 -> GWT.log("Test 2 - 3");
}
GWT.log("Test 2 - Done");

Will never get to the last "Test 2 - Done" line.  The output will be:
Test 1 - Start
Test 1 - 1
Test 1 - Done
Test 2 - Start
Test 2 - 1

Is this a known issue?

Thanks.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/813a36c4-81cc-44af-97ab-48cfdb04289fn%40googlegroups.com.

Re: Issue with enhanced switch statements in GWT 2.12.1

Could be related to https://github.com/gwtproject/gwt/issues/10044

Fwiw, the issue fixed in 2.12.1 was not about the "case x -> foo" vs "case x -> { foo }" but about enclosing the whole switch inside a block.

On Thursday, November 21, 2024 at 9:28:51 AM UTC+1 ma...@craig-mitchell.com wrote:

> Switch statements can correctly compile without being contained in braces

For me, they compile, but they don't work.  Eg.  This code:

GWT.log("Test 1 - Start");
switch (1) {
  case 1 -> {
    GWT.log("Test 1 - 1");
  }
  case 2 -> {
    GWT.log("Test 1 - 2");
  }
  case 3 -> {
    GWT.log("Test 1 - 3");
  }
}
GWT.log("Test 1 - Done");

GWT.log("Test 2 - Start");
switch (1) {
  case 1 -> GWT.log("Test 2 - 1");
  case 2 -> GWT.log("Test 2 - 2");
  case 3 -> GWT.log("Test 2 - 3");
}
GWT.log("Test 2 - Done");

Will never get to the last "Test 2 - Done" line.  The output will be:
Test 1 - Start
Test 1 - 1
Test 1 - Done
Test 2 - Start
Test 2 - 1

Is this a known issue?

Thanks.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/2ce64938-712b-4d56-902a-5a922a5d158dn%40googlegroups.com.

Re: Issue with enhanced switch statements in GWT 2.12.1

I must be low on caffeine because I can't see the problem.

Is the problem that it doesn't print:
Test 2 - Done
at the end?

On Thu, Nov 21, 2024 at 10:28 AM Craig Mitchell <mail@craig-mitchell.com> wrote:

> Switch statements can correctly compile without being contained in braces

For me, they compile, but they don't work.  Eg.  This code:

GWT.log("Test 1 - Start");
switch (1) {
  case 1 -> {
    GWT.log("Test 1 - 1");
  }
  case 2 -> {
    GWT.log("Test 1 - 2");
  }
  case 3 -> {
    GWT.log("Test 1 - 3");
  }
}
GWT.log("Test 1 - Done");

GWT.log("Test 2 - Start");
switch (1) {
  case 1 -> GWT.log("Test 2 - 1");
  case 2 -> GWT.log("Test 2 - 2");
  case 3 -> GWT.log("Test 2 - 3");
}
GWT.log("Test 2 - Done");

Will never get to the last "Test 2 - Done" line.  The output will be:
Test 1 - Start
Test 1 - 1
Test 1 - Done
Test 2 - Start
Test 2 - 1

Is this a known issue?

Thanks.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/d0b4fe79-0571-481a-bf4f-c8ccda40e486n%40googlegroups.com.


--
Vassilis Virvilis

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/CAKbOjEytjRYrFc4FDmgwagH_CpWCPkW6eWf2F_pW_ywqmAXb-g%40mail.gmail.com.

Issue with enhanced switch statements in GWT 2.12.1

The release notes for 2.12.1 ( https://www.gwtproject.org/release-notes.html#Release_Notes_2_12_1 ) say:

> Switch statements can correctly compile without being contained in braces

For me, they compile, but they don't work.  Eg.  This code:

GWT.log("Test 1 - Start");
switch (1) {
  case 1 -> {
    GWT.log("Test 1 - 1");
  }
  case 2 -> {
    GWT.log("Test 1 - 2");
  }
  case 3 -> {
    GWT.log("Test 1 - 3");
  }
}
GWT.log("Test 1 - Done");

GWT.log("Test 2 - Start");
switch (1) {
  case 1 -> GWT.log("Test 2 - 1");
  case 2 -> GWT.log("Test 2 - 2");
  case 3 -> GWT.log("Test 2 - 3");
}
GWT.log("Test 2 - Done");

Will never get to the last "Test 2 - Done" line.  The output will be:
Test 1 - Start
Test 1 - 1
Test 1 - Done
Test 2 - Start
Test 2 - 1

Is this a known issue?

Thanks.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/d0b4fe79-0571-481a-bf4f-c8ccda40e486n%40googlegroups.com.

Tuesday, November 19, 2024

Re: GWT 2.12.0 with net.ltgt.gwt.maven gwt maven plugin: [ERROR] Unable to find 'com/medhok/mm/OEV.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?

Thanks Colin,  Removing the -compileReport argument solved the problem.  Now I will proceed with my java 21 upgrade changes.

Thank you so much for your inputs.

On Monday, November 18, 2024 at 4:02:00 PM UTC-5 Venkateswara Rao wrote:

Thanks for your response Colin,  gwt.user.agent we defined to pass few. However, let me remove compileReport and run the debug level and share it with you.

On Monday, November 18, 2024 at 11:23:25 AM UTC-5 Colin Alworth wrote:
Adding more workers will not necessarily make it faster - if you are near your memory limit, it may be slower because the system could spend more time GCing so that the threads can each get their own work done. Even if you are not near the memory limit, it may make it slower, depending on how fast your CPU/memory is in moving data back and forth. Can you share the full successful build log, both before and after?

There is no system property "gwt.user.agent" in GWT itself (maybe this is specific to smartgwt?). Perhaps you mean to be passing -setProperty user.agent=.. instead as an arg to GWT? That would remove your other permutations.

Thomas's suggestion is to get _all_ of the arguments, not just the ones you're setting by hand. Likewise, try to take the measurements I suggested. Can you also share the full build log - GWT doesn't log the word "Done" at INFO level except when you have detailed SOYC enabled (-XdetailedSoyc), which is documented to consume extra compile time to write so much output. I note that you do have "-compileReport" turned on - are you sure you want that at all?

On Monday, November 18, 2024 at 10:11:24 AM UTC-6 venkat...@gmail.com wrote:
Thanks Colin for your response.  To answer your question,

My current project is using Java 8, GWT 2.11.0, smartgwt 12.0P with mojo codehaus plugin 2.10.0, when I build with following arguments:
<extraJvmArgs>-Xmx7G -XX:+UseG1GC -Dgwt.user.agent=${gwt.compile.user.agent}</extraJvmArgs>
It will take approximately 8 mins to finish the build process.

Now we are upgrading to new plugin net.ltgt.gwt.maven and provided with same arguments.  This one is taking too much time more than 4 hours eventhough I added localWorkers 4.

Appreciate your inputs on this.

Thanks.

On Monday, November 18, 2024 at 10:57:11 AM UTC-5 Colin Alworth wrote:
Is it taking longer than it used to, or hanging and staying stuck? How long did it used to take, how long does it take now (if not actually stuck)?

Have you tried giving it more than 7GB of memory, or using the default GC instead of g1? G1 is the default for Java 17+, and can handle a lot of memory (depending on your project size it may need quite a bit), and is fairly configurable. How much memory did this stage actually use (not just allocated, but used) before you changed the GWT plugin?

Have you attempted any profiling of the process? Is there any chance that your disk is full...?

To confirm, you are _not_ updating GWT, just the plugin first, right?

If you can share the sample project you created, please put it on github or the like and link from this - one of us can try to build it and see what is broken with your project.

If you'd like to share code privately and have a videocall to wrap this up, that is a service that our company offers, you can contact me off-list at co...@vertispan.com.

On Monday, November 18, 2024 at 9:42:36 AM UTC-6 venkat...@gmail.com wrote:
Please help me on this issue, It's taking too much time to build GWT application.

Any inputs would help me to proceed further.

Thanks.

On Friday, November 15, 2024 at 4:41:06 PM UTC-5 Venkateswara Rao wrote:
Any update on this issue, I have enabled debug logs and added localworkers 4. Issue still persists..

[INFO]          Done
 
It's says Done in the log.

Thanks.
On Thursday, November 14, 2024 at 9:17:32 PM UTC-5 Venkateswara Rao wrote:

Thomas Broyer,
Thanks for your response.  I have added the jvmArgs and systemProperties to the plugin as mentioned below:

<plugin>

<groupId>net.ltgt.gwt.maven</groupId>

<artifactId>gwt-maven-plugin</artifactId>

<version>1.1.0</version>

<executions>

<execution>

<goals>

<goal>compile</goal>

</goals>

</execution>

</executions>

<configuration>

<moduleName>com.medhok.mm.OEV</moduleName>

<failOnError>true</failOnError>

<!-- GWT compiler 2.8 and above requires 1.8, hence define sourceLevel here if you use

a different source language for java compilation -->

<sourceLevel>1.8</sourceLevel>

<!-- Compiler configuration -->

<compilerArgs>

<!-- Ask GWT to create the Story of Your Compile (SOYC) (gwt:compile) -->

<arg>-compileReport</arg>

<!--<arg>-XcompilerMetrics</arg>-->

</compilerArgs>

<jvmArgs>

<arg>-Xmx7G</arg>

<arg>-XX:+UseG1GC</arg>

</jvmArgs>

<systemProperties>

<gwt.user.agent>${gwt.compile.user.agent}</gwt.user.agent>

</systemProperties>

<!-- DevMode configuration -->

<warDir>${project.build.directory}/${project.build.finalName}</warDir>

<classpathScope>compile+runtime</classpathScope>

<!-- URL(s) that should be opened by DevMode (gwt:devmode). -->

<startupUrls>

<startupUrl>index.html</startupUrl>

</startupUrls>

</configuration>

</plugin>

Now, It's hanged on Compiling Permutations 0..

Please let me know what's the wrong in the configuration.
On Thursday, November 14, 2024 at 7:04:07 PM UTC-5 Thomas Broyer wrote:
On Thursday, November 14, 2024 at 4:34:40 PM UTC+1 venkat...@gmail.com wrote:
@Thomas Broyer,

What will be the equivalent argument for the following in the new plugin:
<extraJvmArgs>-Xmx7G -XX:+UseG1GC -Dgwt.user.agent=${gwt.compile.user.agent}</extraJvmArgs>
Thanks.


<jvmArgs>
  <arg>-Xmx7G</arg>
  <arg>-XX:+UseG1GC</arg>
</jvmArgs>
<systemProperties>
  <gwt.user.agent>${gwt.compile.user.agent}</gwt.user.agent>
</systemProperties>

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/048e79ed-1226-4bf5-b231-ca2d36cf19ecn%40googlegroups.com.

Monday, November 18, 2024

Re: GWT 2.12.0 with net.ltgt.gwt.maven gwt maven plugin: [ERROR] Unable to find 'com/medhok/mm/OEV.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?


Thanks for your response Colin,  gwt.user.agent we defined to pass few. However, let me remove compileReport and run the debug level and share it with you.

On Monday, November 18, 2024 at 11:23:25 AM UTC-5 Colin Alworth wrote:
Adding more workers will not necessarily make it faster - if you are near your memory limit, it may be slower because the system could spend more time GCing so that the threads can each get their own work done. Even if you are not near the memory limit, it may make it slower, depending on how fast your CPU/memory is in moving data back and forth. Can you share the full successful build log, both before and after?

There is no system property "gwt.user.agent" in GWT itself (maybe this is specific to smartgwt?). Perhaps you mean to be passing -setProperty user.agent=.. instead as an arg to GWT? That would remove your other permutations.

Thomas's suggestion is to get _all_ of the arguments, not just the ones you're setting by hand. Likewise, try to take the measurements I suggested. Can you also share the full build log - GWT doesn't log the word "Done" at INFO level except when you have detailed SOYC enabled (-XdetailedSoyc), which is documented to consume extra compile time to write so much output. I note that you do have "-compileReport" turned on - are you sure you want that at all?

On Monday, November 18, 2024 at 10:11:24 AM UTC-6 venkat...@gmail.com wrote:
Thanks Colin for your response.  To answer your question,

My current project is using Java 8, GWT 2.11.0, smartgwt 12.0P with mojo codehaus plugin 2.10.0, when I build with following arguments:
<extraJvmArgs>-Xmx7G -XX:+UseG1GC -Dgwt.user.agent=${gwt.compile.user.agent}</extraJvmArgs>
It will take approximately 8 mins to finish the build process.

Now we are upgrading to new plugin net.ltgt.gwt.maven and provided with same arguments.  This one is taking too much time more than 4 hours eventhough I added localWorkers 4.

Appreciate your inputs on this.

Thanks.

On Monday, November 18, 2024 at 10:57:11 AM UTC-5 Colin Alworth wrote:
Is it taking longer than it used to, or hanging and staying stuck? How long did it used to take, how long does it take now (if not actually stuck)?

Have you tried giving it more than 7GB of memory, or using the default GC instead of g1? G1 is the default for Java 17+, and can handle a lot of memory (depending on your project size it may need quite a bit), and is fairly configurable. How much memory did this stage actually use (not just allocated, but used) before you changed the GWT plugin?

Have you attempted any profiling of the process? Is there any chance that your disk is full...?

To confirm, you are _not_ updating GWT, just the plugin first, right?

If you can share the sample project you created, please put it on github or the like and link from this - one of us can try to build it and see what is broken with your project.

If you'd like to share code privately and have a videocall to wrap this up, that is a service that our company offers, you can contact me off-list at co...@vertispan.com.

On Monday, November 18, 2024 at 9:42:36 AM UTC-6 venkat...@gmail.com wrote:
Please help me on this issue, It's taking too much time to build GWT application.

Any inputs would help me to proceed further.

Thanks.

On Friday, November 15, 2024 at 4:41:06 PM UTC-5 Venkateswara Rao wrote:
Any update on this issue, I have enabled debug logs and added localworkers 4. Issue still persists..

[INFO]          Done
 
It's says Done in the log.

Thanks.
On Thursday, November 14, 2024 at 9:17:32 PM UTC-5 Venkateswara Rao wrote:

Thomas Broyer,
Thanks for your response.  I have added the jvmArgs and systemProperties to the plugin as mentioned below:

<plugin>

<groupId>net.ltgt.gwt.maven</groupId>

<artifactId>gwt-maven-plugin</artifactId>

<version>1.1.0</version>

<executions>

<execution>

<goals>

<goal>compile</goal>

</goals>

</execution>

</executions>

<configuration>

<moduleName>com.medhok.mm.OEV</moduleName>

<failOnError>true</failOnError>

<!-- GWT compiler 2.8 and above requires 1.8, hence define sourceLevel here if you use

a different source language for java compilation -->

<sourceLevel>1.8</sourceLevel>

<!-- Compiler configuration -->

<compilerArgs>

<!-- Ask GWT to create the Story of Your Compile (SOYC) (gwt:compile) -->

<arg>-compileReport</arg>

<!--<arg>-XcompilerMetrics</arg>-->

</compilerArgs>

<jvmArgs>

<arg>-Xmx7G</arg>

<arg>-XX:+UseG1GC</arg>

</jvmArgs>

<systemProperties>

<gwt.user.agent>${gwt.compile.user.agent}</gwt.user.agent>

</systemProperties>

<!-- DevMode configuration -->

<warDir>${project.build.directory}/${project.build.finalName}</warDir>

<classpathScope>compile+runtime</classpathScope>

<!-- URL(s) that should be opened by DevMode (gwt:devmode). -->

<startupUrls>

<startupUrl>index.html</startupUrl>

</startupUrls>

</configuration>

</plugin>

Now, It's hanged on Compiling Permutations 0..

Please let me know what's the wrong in the configuration.
On Thursday, November 14, 2024 at 7:04:07 PM UTC-5 Thomas Broyer wrote:
On Thursday, November 14, 2024 at 4:34:40 PM UTC+1 venkat...@gmail.com wrote:
@Thomas Broyer,

What will be the equivalent argument for the following in the new plugin:
<extraJvmArgs>-Xmx7G -XX:+UseG1GC -Dgwt.user.agent=${gwt.compile.user.agent}</extraJvmArgs>
Thanks.


<jvmArgs>
  <arg>-Xmx7G</arg>
  <arg>-XX:+UseG1GC</arg>
</jvmArgs>
<systemProperties>
  <gwt.user.agent>${gwt.compile.user.agent}</gwt.user.agent>
</systemProperties>

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/e5c46a82-ebef-44fc-b9d5-5ffeaa64639an%40googlegroups.com.