Preventing obfuscation/inlining of a single function during GWT compilation

Skip to first unread message


Nov 4, 2021, 7:15:39 PM11/4/21
to GWT Users

To solve an issue, it would greatly simplify things to prevent the GWT compiler from inlining and obfuscating the internal GWT function hasTypeMarker().  That way, we can replace it in our own code.  (Yes, not guaranteed to work, we know.)

Is there any fine-grained control like this? We don't want to have to disable obfuscation and inlining for everything.


Nov 5, 2021, 5:23:54 AM11/5/21
to GWT Users
There is an annotation called 'DoNotInline' and acts as a compiler hint. So maybe you can fork GWT and apply that annotation to the method. But then you could also just change the implementation of the method to fit your needs.

Obfuscation itself can only be enabled/disabled globally. The only thing that is possible is to use JsInterop which allows you to define interfaces/classes that are either implemented in JS and you just want to access that implementation or should be exported to JS (without obfuscation then obviously) so that plain JS can call into GWT code. But not sure if hasTypeMarker() can be marked as such.

-- J.
Reply all
Reply to author
0 new messages