-validateOnly

97 views
Skip to first unread message

Thomas Broyer

unread,
Jun 5, 2013, 9:25:27 PM6/5/13
to google-web-tool...@googlegroups.com, Ray Cromwell
Hi,

Anyone knowns what the -validateOnly flag to the compiler does exactly? can it be reliably used to validate that all classes in a given module are translatable?
I used it once but it was years ago so I don't remember what it checked exactly. AFAICT it didn't check that JSNI was valid JavaScript (understandable and not a blocker: if you have JSNI in a lib you should probably have unit-tests too)

Ray Cromwell

unread,
Jun 5, 2013, 10:23:26 PM6/5/13
to Thomas Broyer, google-web-toolkit-contributors
I haven't look at the code, but I think it runs a precompile, and then stops. So it constructs the whole program AST and runs generators, so it runs all checking up to that point. I'm pretty sure it should be running JSORestrictionsChecker which runs on JDT I believe.


Thomas Broyer

unread,
Jun 6, 2013, 3:52:19 AM6/6/13
to Ray Cromwell, google-web-toolkit-contributors
Great!

Do you think that's something that should be run by default when
someone builds a GWT library? (integrated in the lifecycle of the
gwt-lib maven packaging) or it would be better left as an optional
additional feature?
Are you using it at Google? or are you rather relying on unit-tests?
(or compilation failures in downstream GWT applications?)
See https://github.com/tbroyer/gwt-maven-plugin/issues/4

(note: apparently, JSORestrictionsChecker is run as part of the
CompilationStateBuilder, so IIUC it's run as part of -validateOnly)
--
Thomas Broyer
/tɔ.ma.bʁwa.je/

Thomas Broyer

unread,
Jul 11, 2015, 12:51:17 PM7/11/15
to google-web-tool...@googlegroups.com, t.br...@gmail.com, Daniel Kurka, cromw...@google.com


On Thursday, June 6, 2013 at 9:52:19 AM UTC+2, Thomas Broyer wrote:
Great!

Do you think that's something that should be run by default when
someone builds a GWT library? (integrated in the lifecycle of the
gwt-lib maven packaging) or it would be better left as an optional
additional feature?
Are you using it at Google? or are you rather relying on unit-tests?
(or compilation failures in downstream GWT applications?)
See https://github.com/tbroyer/gwt-maven-plugin/issues/4

I was going through the gwt-maven-plugin issues and wondered what to do with that one.
Is -validateOnly something you use at Google? Would it be a good idea to leverage it for GWT libraries?
(I notice it's not used to validate gwt-user, so maybe not?)
 
Reply all
Reply to author
Forward
0 new messages