Question about contributing with java.util.concurrent emulation

135 views
Skip to first unread message

Ignacio Baca Moreno-Torres

unread,
Jul 14, 2017, 2:36:05 AM7/14/17
to GWT Contributors
I have created various java.util.concurrent and some java.lang super-sources. This makes easier to compile RxJava without modifying the original source. There are some super-sources that might be a bit polemic, this super-sources either throws unsupported exception always or it throws unsupported exception sometimes, for example, you can use CountDownLatch, but if you call a blocking method and it actually needs to block (count==0) it throws an exception instead of blocking. I make this because as JS does not support concurrency it actually works in the use cases that appear in RxJava, but, yep, it might behave a bit unexpected in some cases.

So this is the question. Might this super sources be merged on GWT? Is it better to create two separated code-reviews one for polemic ones and other for non-so-polemic? GWT code-reviews are pretty saturated and not easy to be approved so I prefer to ask first here and gets some guidelines. Please take a look at the super-sources because maybe you directly said that this is too polemic for GWT codebase. Thanks.

Jens

unread,
Jul 14, 2017, 4:28:39 AM7/14/17
to GWT Contributors
AFAICT we want to merge Guava's emulation of JRE classes into GWT itself. I think it also includes CountDownLatch.

Maybe you want to check if you have emulated something in addition to Guava: https://github.com/google/guava/tree/master/guava-gwt/src-super/java

-- J.

Ignacio Baca Moreno-Torres

unread,
Jul 14, 2017, 7:32:09 AM7/14/17
to GWT Contributors
Definitively I have duplicated some of its super-sources, initially rxjava-gwt dependends on guava bc it super-sourced some pretty common utilities like TimeUnit or Executor, etc. but until I get forced to implement various other classes I just prefer to copy-paste and remove the guava dependency. But yep, I take note and I will be careful to not add any already guava super-sourced class.

Anyways, merging guava first will be a good idea!

Goktug Gokdogan

unread,
Jul 14, 2017, 4:30:27 PM7/14/17
to google-web-toolkit-contributors
I created the patch that's moving plenty of Guava's super source to our emulation, will send it soon.

However, I'm not planning to (and strongly against) moving CountDownLatch since I think it will do more harm than good.

--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/c61703ff-15d2-4ee8-9952-7650e1c3425d%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Thomas Broyer

unread,
Jul 14, 2017, 6:08:50 PM7/14/17
to GWT Contributors
+1

I think it's better to refactor code than have partially emulated (breaking contracts) classes.

Reply all
Reply to author
Forward
0 new messages