gwtproject / gwt

GWT Open Source Project
http://www.gwtproject.org
1.52k stars 374 forks source link

Cyclic dependency between "I18N" and "User" modules. #4072

Closed dankurka closed 9 years ago

dankurka commented 9 years ago

Originally reported on Google Code with ID 4071

Found in GWT Release (e.g. 1.5.3, 1.6 RC):

GWT 1.6.4, GWT 1.7

Encountered on OS / Browser (e.g. WinXP, IE6-7, FF3):

WinXP

Detailed description (please be as specific as possible):

I'm involved in a very specific project (IPTV), where we don't use the GWT
"User" module.
Still, we use other modules (including I18N).
I18N client code contains a class BidiUtils that imports
com.google.gwt.dom.client.Element; since I18N doesn't inherit from User,
GWT compilation produces a warning.
Fortunately as we don't use the BidiUtils class, pruning eliminates it and
GWT thankfully compiles.

Shortest code snippet which demonstrates issue (please indicate where
actual result differs from expected result):

None

Workaround if you have one:

In order to remove this alarming message, I had to tweak the gwt-user.jar,
adding a I18N_NoUser module declaration that explictely excludes the
BidiUtils class from client source code.

Links to relevant GWT Developer Forum posts:

Reported by pierre.smeyers on 2009-09-23 15:29:28

dankurka commented 9 years ago
Pierre,

Would you be able to provide us with some more information regarding this issue.
Specifically, but not limited to:

1. What other framework(s) are you using to build the application and where do the
GWT specific parts fit in?
2. While attempting to reproduce this issue I actually ran into compiler errors due
to indirect references. You mentioned only seeing warnings, did you see compiler
errors at any point within the process?
3. Along those lines, what warning message(s) are you receiving?
4. How are you loading your application if it is not utilizing the Users module? Are
you implementing EntryPoint within your application?
5. What does your applications module XML file look like? Are you inheriting anything
other than 'com.google.gwt.i18n.I18N'? 

Reported by cramsdale+personal@google.com on 2009-09-23 22:31:38

dankurka commented 9 years ago
1. What other framework(s) are you using to build the application and where do the
GWT specific parts fit in?

No other third part framework, just home-made modules that enhance GWT APIs with IPTV
specific APIs. 

2. While attempting to reproduce this issue I actually ran into compiler errors due
to indirect references. You mentioned only seeing warnings, did you see compiler
errors at any point within the process?

Well actually you're right, it's an error (see below).
But as I mentioned, pruning eliminates the BidiUtils class, and compilation finally
succeeds.

3. Along those lines, what warning message(s) are you receiving?
  [ERROR] Errors in
'jar:file:/E:/CRHX7117/Dev/Workspaces/IPTV-GWT/otv-gwt-kit/lib/gwt-user-iptv.jar!/com/google/gwt/i18n/client/BidiUtils.java'
    [ERROR] Line 51: No source code is available for type
com.google.gwt.dom.client.Element; did you forget to inherit a required module?

4. How are you loading your application if it is not utilizing the Users module? Are
you implementing EntryPoint within your application?

Sure we've got an EntryPoint.
Actually we're running on an outdated embedded browser that doesn't have any DHTML
support. So we had to redevelop a dedicated GWT module for running on that browser.
We've just replaced the use or GWT's User module with this browser specific module.

5. What does your applications module XML file look like? Are you inheriting anything
other than 'com.google.gwt.i18n.I18N'? 

From gwt-user: only "Core" and "I18N"
.. plus some home-made modules (dedicated to IPTV).

Reported by pierre.smeyers on 2009-09-25 08:53:26

dankurka commented 9 years ago
My 2 c€nts: if the error is with com.google.gwt.dom.client.Element (and not 
com.google.gwt.user.client.Element), then I18N should <inherit 
name="com.google.gwt.dom.DOM" /> not User (but that doesn't change the fact it actually

lacks the an <inherit/>)

Reported by t.broyer on 2009-09-25 09:56:21

dankurka commented 9 years ago
I think with Thomas doing the module split up and moving to maven modules this is no
longer relevant

Reported by dankurka@google.com on 2013-05-25 16:42:37