You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering a KSP compilation failure where an unresolved error.NonExistentClass appears during the processing of MarketDaoImpl and LocalDatasourceModule. This issue occurs while attempting to process constructor and method parameters that reference a class that cannot be resolved.
Full error message:
Task :data:market-local:kspDebugKotlin FAILED
e: [ksp] InjectProcessingStep was unable to process 'MarketDaoImpl(error.NonExistentClass)' because 'error.NonExistentClass' could not be resolved.
Dependency trace:
=> element (CLASS): ir.composenews.localdatasource.database.MarketDaoImpl
=> element (CONSTRUCTOR): MarketDaoImpl(error.NonExistentClass)
=> type (EXECUTABLE constructor): (error.NonExistentClass)void
=> type (ERROR parameter type): error.NonExistentClass
If type 'error.NonExistentClass' is a generated type, check above for compilation errors that may have prevented the type from being generated. Otherwise, ensure that type 'error.NonExistentClass' is on your classpath.
The error suggests that a class required for dependency injection or some other processing step isn't being generated or included in the classpath, preventing compilation from succeeding.
Steps to reproduce:
The class MarketDaoImpl depends on a type that either should be generated or resolved during compilation.
The LocalDatasourceModule class in the DI module also fails to provide the correct class reference for dependency injection.
I’ve ensured that necessary dependencies are included in the classpath, but the issue persists during the KSP processing step.
Environment:
KSP version: 2.0.20-1.0.25
Gradle version: 8.6.0
Kotlin version: 2.0.20
Operating System: Windows 11
If error.NonExistentClass is supposed to be generated by KSP, it seems that the class generation process is not occurring correctly, or there's an issue with the classpath.
The text was updated successfully, but these errors were encountered:
VahidGarousi
changed the title
KSP Compilation Failure: Unresolved error.NonExistentClass during MarketDaoImpl and LocalDatasourceModule processing
KSP Compilation Failure: Unresolved error.NonExistentClass during MarketDaoImpl and LocalDatasourceModule processing
Sep 9, 2024
Move SQLDelight into its own module, where it only has the .sql files and it is an api of your database module
Force the SQLDelight task to run before KSP and possibly add the SQLDelight generated sources directory as part of Kotlin Comilation sources (I think this is already done by SQLDelight plugin).
Description:
I'm encountering a KSP compilation failure where an unresolved
error.NonExistentClass
appears during the processing ofMarketDaoImpl
andLocalDatasourceModule
. This issue occurs while attempting to process constructor and method parameters that reference a class that cannot be resolved.Full error message:
The error suggests that a class required for dependency injection or some other processing step isn't being generated or included in the classpath, preventing compilation from succeeding.
Steps to reproduce:
MarketDaoImpl
depends on a type that either should be generated or resolved during compilation.LocalDatasourceModule
class in the DI module also fails to provide the correct class reference for dependency injection.Environment:
If
error.NonExistentClass
is supposed to be generated by KSP, it seems that the class generation process is not occurring correctly, or there's an issue with the classpath.I think this is the root of the error:
https://github.com/Kaaveh/ComposeNews/blob/1c9549eb47a3845179de7e4744dcdf62b30bdbb0/data/market-local/src/main/java/ir/composenews/localdatasource/di/LocalDatasourceModule.kt#L21
The text was updated successfully, but these errors were encountered: