ArcBees / GWTP

A complete model-view-presenter framework to simplify your next GWT project.
Other
335 stars 132 forks source link

Bind constants in superdev mode - cache problem? #814

Open hacker-cb opened 7 years ago

hacker-cb commented 7 years ago

I'm using GWTP 1.5.3 and GWT 2.8.0.

In my module I'm binding constant for my REST service URL: bindConstant().annotatedWith(RestApplicationPath.class).to("http://test.com");

I start GWT superdev with next flags: -noprecompile -port 9876 -sourceLevel 1.8 -bindAddress 127.0.0.1 -launcherDir /mydir -logLevel INFO

Problem is that URL does not changed after changing it inside module sources. Also seems that ANY change inside MyApiRestDispatchModule.java does not affect build cache invalidating. Actually, ANY chnages inside configure() method does not rebuild cache. All changes inside presenters/views/uibinder works fine.

After I have added -noincremental flag all recompiled fine but very slow.

So, seems that it is bug in GWTP module system or in GWT cache.

Full module code:

public class MyApiRestDispatchModule extends AbstractGinModule {
    private static final String COOKIE_NAME = "JSESSIONID";

    @Override
    protected void configure() {
        // REST dispatch
        install(new RestDispatchAsyncModule.Builder()
                .build());

        bindConstant().annotatedWith(RestApplicationPath.class).to("http://test.com");
        bindConstant().annotatedWith(SecurityCookie.class).to(COOKIE_NAME);
    }
}