DI discussion is clearly offtopic, but I agree tha...
# ktor
o
DI discussion is clearly offtopic, but I agree that dependency of user code on DI is not a “pure concept”, however if you want auto-discovery (which is VERY convenient during development/prototyping) via JAR scanning & reflection, you need to mark components somehow. Best of what I could ever imagine for this use case is meta-annotation. So you define your own annotation which is either annotated with DI’s annotation, or explicitly given as input to DI auto-discovery function, and then you mark your components with that annotation.
d
Sorry for continuing this off-topic a bit more, but out of the DI frameworks used I know of, you're suggesting only Dagger2, that compiles annotations, but there you also need to build the component graph in user code? So you use Dagger2, or a custom one, I don't see how any framework can avoid that kind of dependency on it's DI?