-
Notifications
You must be signed in to change notification settings - Fork 383
Update HtmlUnit to 4.11.1, update necessary dependencies #10115
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
base: main
Are you sure you want to change the base?
Conversation
f69e6ea
to
0e66e78
Compare
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.
Thanks for working on this - I had tentatively planned on splitting this off until 2.14 (mavenize gwt itself first) and/or split into an external project (via #10058, so that htmlunit could be entirely external, not bring so many other dependencies to the gwt-dev classpath...
What do you think about us fixing 10058 and then offering a separate gwt-runstyle-htmlunit jar that provides -runStyle=htmlunit4, which then drops legacy dev mode support etc, changes the system tz, etc? I'd also love to expose the webClient.options somehow so that downstream projects could enable future polyfills as desired...
webClient.setActiveXObjectMap(Collections.singletonMap( | ||
"GwtLegacyDevModeExceptionOrReturnValue", "java.lang.Object")); | ||
// webClient.setActiveXObjectMap(Collections.singletonMap( | ||
// "GwtLegacyDevModeExceptionOrReturnValue", "java.lang.Object")); |
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.
If we're removing this, we should probably remove it outright, and the comment too.
That said, I think legacy dev mode tests work still with HtmlUnit, so this is probably required to keep? Unless we are actually outright removing that feature, in which case there is a lot more to remove too?
I don't think maintaining 2 different runstyles based on HtmlUnit is worth it. Doing this only after mavenization makes sense. Btw. would it make sense to also replace Rhino classes for JSNI parsing with those bundled in HtmlUnit? With JSNI being a legacy feature ES6 support is not important, but if it decreases size of the codebase it might be worth trying. |
Agreed, I don't want to continue to maintain the old one, just to make sure it is there for legacy dev mode until we're committed to removing it. Post-mavenization (or Gradle, if there were suddenly a push to have good Gradle support), I would want to have I'm not quite sure what you're asking about rhino - if there was an easy update that could be done for htmlunit to get es5 class, es6 classes etc, they would have already done it. Or are you asking if GWT's custom rhino could be replaced with htmlunit's implementation? If it is the latter, I think the answer is no, as JSNI doesn't actually support all of es3 - the gwt/dev/core/src/com/google/gwt/dev/js/rhino/Parser.java Lines 691 to 696 in 15609b6
JSNI also supports more than es3, the JSNI method reference syntax: gwt/dev/core/src/com/google/gwt/dev/js/rhino/TokenStream.java Lines 1355 to 1576 in 15609b6
|
That's what I meant, thanks. The reason I mentioned ES6 is that Rhino 1.8 (and its HtmlUnit fork) enable many ES6 features by default. |
Oh that's a nice view - possibly worth a look when it gets closer (and there's a lot less red even in the last column), but I think we should be discouraging writing new JSNI, and instead encouraging jsinterop where possible? Note that GWT doesn't use rhino to emit JS, so we won't get any extra generated JS features out of this, only parsing JSNI expressions. |
Fixes #9958
Related changes need to be merged in
tools
repo first, the workflow definitions here need to be reverted.(I was hoping this would help with regex parsing for, #10113 but it's not sufficient.)