You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GWT compiler (latest version - 2.10.0) shows this warnings (using the latest version of guava)
Warnings in com/google/common/collect/super/com/google/common/collect/Platform.java
[WARN] Line 107: [unusable-by-js] Return type of 'Class Platform.getDeclaringClassOrNullForJ2cl(Enum)' is not usable by but exposed to JavaScript.
[WARN] Suppress "[unusable-by-js]" warnings by adding a `@SuppressWarnings("unusable-by-js")` annotation to the corresponding member.
Is it possible to add the suggested @SuppressWarnings("unusable-by-js") to suppress it and avoid such warnings?
The text was updated successfully, but these errors were encountered:
Thanks. I've found that I can reproduce this by adding <generateJsInteropExports>true</generateJsInteropExports> to our configuration.
I'm not absolutely 100% clear on what the warning is telling us, but I think I get the sense of it: It may be saying that we shouldn't expect for getDeclaringClassOrNullForJ2cl to be useful to call from JavaScript (as @JsMethod might suggest we intend to do), since Class doesn't map to a JavaScript type, but that's fine because we need only to implement it in JavaScript. (And that's all a result of how we set things up to work with both GWT and J2CL.)
@SuppressWarnings("unusable-by-js") does solve it. I'll get that committed.
And enable a setting that at least _shows_ us that warning (though it doesn't fail the build).
Fixes#6602
RELNOTES=Suppressed [an `unusable-by-js` warning](#6602) seen by users of `guava-gwt`.
PiperOrigin-RevId: 544042558
The suppression landed in 32.1.0, but because we got the Gradle metadata wrong in that release, I suggest going straight to 32.1.1, which also contains the fix for that problem.
The GWT compiler (latest version - 2.10.0) shows this warnings (using the latest version of guava)
Is it possible to add the suggested
@SuppressWarnings("unusable-by-js")
to suppress it and avoid such warnings?The text was updated successfully, but these errors were encountered: