Hey, trying to get up to speed with <#C67HDJZ2N|> ...
# koin
a
Hey, trying to get up to speed with #C67HDJZ2N (specifically, annotations) Perhaps I'm missing context on what a
module
is in kotlin (I'm still new to the language), but my question is; Does
ComponentScan
check sub packages for
@Single
and the types?
I ask, because in my package structure of:
Copy code
root/
├─ Module.kt
├─ application/
│  ├─ File.kt
├─ domain/
│  ├─ SomeFile.kt
Only
Module.kt
has a class inside, that is annotated with
@ComponentScan
And, in
File.kt
and
SomeFile.kt
I have multiple classes annotated with
@Single
But when trying to compile (and with the ksp compile check on) it fails to import the types
1
k
Hi @Adam Jarvis, yes...
@ComponentScan
should check the sub-packages. Can you please share the error you are getting or a repo to reproduce your setup?
a
@Kibet Theophilus sorry, it was an error on my side - I was getting confused why an
@Single
wasn't being 'picked up' Turns out, it was because the
@Single
class was nested inside an object - seemingly doesn't work
🆗 1