GWTP icon indicating copy to clipboard operation
GWTP copied to clipboard

Bind constants in superdev mode - cache problem?

Open hacker-cb opened this issue 8 years ago • 0 comments

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);
    }
}

hacker-cb avatar Dec 09 '16 10:12 hacker-cb