-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop swallowing compile errors ApplicationControllerGenerator! #734
Conversation
When a type produces GWT compile errors (i.e. Java compile errors or non-client code errors) the TypeOracle#findType returns null on types that are affected by the compile error. Most of the time this would be the entry point classes, resulting in an ambiguous error message when producing the ApplicationController. For example when it attempts to load the Bootstrapper it returns the type as null when there are Java compile errors or GWT client specific compile errors originating from the entry-point class. For example, this is the error I would expect to see: [WARN] Class com.bugs.NotInClientOrSharedPackage is used in Gin, but not available in GWT client code. But instead I would get something like this: [ERROR] The type 'nz.co.doltech.xxx.client.Application.PreBootstrapImpl' was not found. This issue has bugged be for quite some time now especially when an ammeter with GWT is using GWTP so its nice to finally have it resolved!
Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() { | ||
@Override | ||
public void execute() { | ||
RootPanel.get().add(new HTML("<h3>" + REASON + "</h3>")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this h3.
@jasonlemay Maybe you can suggest / style something? This will display an error instead of the app when something went wrong during the compilation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well its just an error message, the intention is that it will simply warn the user of a problem that needs to be fixed.
LGTM. Clever workaround |
We can change the message any time anyways. Thanks for the contribution! |
Stop swallowing compile errors ApplicationControllerGenerator!
When a type produces GWT compile errors (i.e. Java compile errors or client code errors) the
TypeOracle#findType
returns null on types that are affected by the compile error. Most of the time this would be the entry point classes, resulting in an ambiguous error message when producing the ApplicationController. For example when it attempts to load the Bootstrapper it returns the type as null when there are Java compile errors or GWT client specific compile errors originating from the entry-point class.For example, this is the error I would expect to see:
But instead I would get something like this:
This issue has bugged be for quite some time now especially when an ammeter with GWT is using GWTP so its nice to finally have it resolved!
Before:
After: