google / google/error-prone

Warning for stateful Dagger modules

Open
#759 0 comments 0 reactions 0 assignees View on GitHub
Type-NewCheck
Dominant language
Java
Stars
7.2k
Forks
820
Avg merge
5h 9m
Merged PRs (30d)
50

Description

With [`@BindsInstance`](https://google.github.io/dagger/api/2.11/dagger/BindsInstance.html) in Dagger 2 and private qualifiers in modules for shared internal state, Dagger modules seem to be almost always better stateless (marked abstract with only static and `@Binds` bindings).

There may be some use case for small modules to be simplified as stateful, but a warning with the option to suppress (or promote to an error, of course) would be helpful.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.