RequestFactory client projects fail to compile using gwt-user.jar without jakarta
niloc132 opened this issue · comments
GWT version: HEAD-SNAPSHOT (discovered testing for 2.11.0 release)
Browser (with version): n/a
Operating System: any
Description
Compiling a project using RequestFactory with gwt-user.jar and without requestfactory-server-jakarta.jar will cause a compile-time error. The source file (but not the .class file) for the jakarta variant of Logging and LoggingRequest are included in gwt-user, as the gwt-user sources are used for producing some other source jars.
Lines 118 to 126 in 42c1e8a
Instead, those likely need to be filtered out of the actual gwt-user.jar, even if they end up in sources jars.
To recap the jakarta.servlet discussion, since RF requires that the bean/service proxies reference the server implementations (or, use @ProxyFor
and @ServiceFor
, but gwt's provided classes don't do that), and since the com.google.web.bindery.requestfactory.server.Logging
service implementation uses javax.servlet
types, there must exist a jakarta implementation of that service, and so there must exist a jakarta proxy for the service.
Steps to reproduce
Grab a nightly sdk, unpack the DynaTableRf project, and attempt to compile it.
Expected, compiles without errors
Actual:
[INFO] --- gwt-maven-plugin:1.0.1:compile (default) @ DynaTableRf ---
[INFO] Compiling module com.google.gwt.sample.dynatablerf.DynaTableRf
[INFO] Tracing compile failure path for type 'com.google.web.bindery.requestfactory.shared.jakarta.LoggingRequest'
[INFO] [ERROR] Errors in 'jar:file:/home/colin/.m2/repository/org/gwtproject/gwt-user/HEAD-SNAPSHOT/gwt-user-HEAD-SNAPSHOT.jar!/com/google/web/bindery/requestfactory/shared/jakarta/LoggingRequest.java'
[INFO] [ERROR] Line 27: Logging cannot be resolved to a type
[INFO] [ERROR] Line 19: The import com.google.web.bindery.requestfactory.server.jakarta.Logging cannot be resolved
[INFO] [ERROR] Aborting compile due to errors in some input files
Workaround
Disable -strict
/-failOnError
, or add the -jakarta rf jar, even if unused.