Comments (4)
Dagger is also generates Factory with public visibility and it works as kotlin internal visibility maps to Java public. Probably we just abusing interop, feel free to close this issue if no feasible solution is possible.
from anvil.
Facing exact same problem, as most of our modules encapsulate logic behind interface
s with internal
implementation.
from anvil.
We have the policy internally to make all Dagger code public for this exact reason. Dagger assumes public, internal
is treated as public in bytecode. The reason it doesn't fail with Dagger is because the internal code is referenced in generated Java code. Try to call an internal function from Java in a different module. You'll see an error. internal
is misleading, because it implies that nothing outside of this module uses this code. That's wrong, Dagger uses and calls this code outside of the module.
There's also this issue which is important for implementation
and api
dependencies: google/dagger#970
The solution as is works as expected.
from anvil.
I suppose here is a discussion about this problem in dagger: google/dagger#2589
from anvil.
Related Issues (20)
- Suspend lambda parameters are not supported when generating code for AssistedInject/AssistedFactory
- Anvil seems incompatible when using with Dagger KSP HOT 2
- Couldn't resolve FqName com.google.protobuf.kotlin.ProtoDslMarker for Anvil HOT 1
- Incorrect type validation for `@Binds`
- Support KSP in factory generation HOT 14
- Incremental compilation breaks when modifying constructor properties HOT 1
- IDE not syncing on fresh pull HOT 1
- How to deal with MergeSubComponent with AndroidInjector
- Dependency Dashboard
- Question about runtime performance difference between @MergeSubcomponent and @ContributesSubcomponent HOT 2
- @Component.Factory types must be nested within a @Component HOT 1
- Ir Compile Issue Kt 1.9.21 HOT 1
- Anvil making downstream gradle kotlin compilation task not cacheable HOT 4
- Generated files contain errors HOT 2
- Add ability to generate a ContributesBinding baseline? HOT 3
- AssistedFactory generation (still) fails under IC
- Stub gen FileNotFoundException with new file tracking enabled
- Compiling annotation that does not exist throws `NoSuchElementException` HOT 2
- Strange behavior: @Binds methods' parameter type must be assignable to the return type. HOT 1
- Binding module validation should check type parameters when determining if a bound type is valid HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anvil.