Comments (23)
If you want your app module to be able to call this destination and get result from it, something like that is needed.
That said, the library shouldn't fail just because you have a public modal destination that you're not using on a client module. Luckily, it's an easy fix :)
from compose-destinations.
Hi @nazarabd3005 π
I need a little help here. Could you please try a special version I made just to test this? It should have more logs in the build tab so we can try to see what exactly is null and why.
Version 2.0.0-alpha05-test01
.
It is still building right now, I'll let you know as soon as it's available.
from compose-destinations.
It's up @nazarabd3005.
Please try it and past here the log warnings you get!
from compose-destinations.
Hi @raamcosta
this is the result of build with test version
w: [ksp] path infos declarations = [_PathInfo_ModuleRegistry_d50bc146_2445_415d_adc2_fd6f30b5dbda, _PathInfo_ModuleRegistry_41c62ed4_f9c9_4c1f_a00a_436732bda73c, _PathInfo_ModuleRegistry_11989043_45c3_4926_80a2_c781ff1b7ea6, _PathInfo_ModuleRegistry_f818ac4c_d41c_4f6a_ac3f_f4c8cf65532a, _PathInfo_ModuleRegistry_bdcf53b4_7cda_4c01_842f_fffde3ae12ea, _PathInfo_ModuleRegistry_0c3addf0_4e8d_4f43_98f7_e7750fa974bd, _PathInfo_ModuleRegistry_d83b5b36_83df_4fa2_9208_8f0a5378c6e3, _PathInfo_ModuleRegistry_db73aee8_6d9a_4d73_b610_de27d9ba1f34, _PathInfo_ModuleRegistry_abe25b29_9a5f_495d_acc9_12997797bc5c]
w: [ksp] path infos final = {d50bc146_2445_415d_adc2_fd6f30b5dbda=/Users/nazarabdullah/AndroidStudioProjects/KesiaMobile/feature/auth/build/generated/ksp/debug/kotlin/_generated/_ramcosta/_composedestinations/_moduleregistry/_ModuleRegistry_d50bc146_2445_415d_adc2_fd6f30b5dbda.kt, 41c62ed4_f9c9_4c1f_a00a_436732bda73c=/Users/nazarabdullah/AndroidStudioProjects/KesiaMobile/feature/telemedicine/build/generated/ksp/debug/kotlin/_generated/_ramcosta/_composedestinations/_moduleregistry/_ModuleRegistry_41c62ed4_f9c9_4c1f_a00a_436732bda73c.kt, 11989043_45c3_4926_80a2_c781ff1b7ea6=/Users/nazarabdullah/AndroidStudioProjects/KesiaMobile/feature/profile/build/generated/ksp/debug/kotlin/_generated/_ramcosta/_composedestinations/_moduleregistry/_ModuleRegistry_11989043_45c3_4926_80a2_c781ff1b7ea6.kt, f818ac4c_d41c_4f6a_ac3f_f4c8cf65532a=/Users/nazarabdullah/AndroidStudioProjects/KesiaMobile/feature/pharmacy_online/build/generated/ksp/debug/kotlin/_generated/_ramcosta/_composedestinations/_moduleregistry/_ModuleRegistry_f818ac4c_d41c_4f6a_ac3f_f4c8cf65532a.kt, bdcf53b4_7cda_4c01_842f_fffde3ae12ea=/Users/nazarabdullah/AndroidStudioProjects/KesiaMobile/feature/order/build/generated/ksp/debug/kotlin/_generated/_ramcosta/_composedestinations/_moduleregistry/_ModuleRegistry_bdcf53b4_7cda_4c01_842f_fffde3ae12ea.kt, 0c3addf0_4e8d_4f43_98f7_e7750fa974bd=/Users/nazarabdullah/AndroidStudioProjects/KesiaMobile/feature/home/build/generated/ksp/debug/kotlin/_generated/_ramcosta/_composedestinations/_moduleregistry/_ModuleRegistry_0c3addf0_4e8d_4f43_98f7_e7750fa974bd.kt, d83b5b36_83df_4fa2_9208_8f0a5378c6e3=/Users/nazarabdullah/AndroidStudioProjects/KesiaMobile/feature/online_booking/build/generated/ksp/debug/kotlin/_generated/_ramcosta/_composedestinations/_moduleregistry/_ModuleRegistry_d83b5b36_83df_4fa2_9208_8f0a5378c6e3.kt, db73aee8_6d9a_4d73_b610_de27d9ba1f34=/Users/nazarabdullah/AndroidStudioProjects/KesiaMobile/feature/shared/build/generated/ksp/debug/kotlin/_generated/_ramcosta/_composedestinations/_moduleregistry/_ModuleRegistry_db73aee8_6d9a_4d73_b610_de27d9ba1f34.kt, abe25b29_9a5f_495d_acc9_12997797bc5c=/Users/nazarabdullah/AndroidStudioProjects/KesiaMobile/feature/doctor_schedule/build/generated/ksp/debug/kotlin/_generated/_ramcosta/_composedestinations/_moduleregistry/_ModuleRegistry_abe25b29_9a5f_495d_acc9_12997797bc5c.kt}
w: [ksp] module registry declarations = [_ModuleRegistry_db73aee8_6d9a_4d73_b610_de27d9ba1f34, _ModuleRegistry_f818ac4c_d41c_4f6a_ac3f_f4c8cf65532a, _ModuleRegistry_d83b5b36_83df_4fa2_9208_8f0a5378c6e3, _ModuleRegistry_bdcf53b4_7cda_4c01_842f_fffde3ae12ea, _ModuleRegistry_d50bc146_2445_415d_adc2_fd6f30b5dbda, _ModuleRegistry_0c3addf0_4e8d_4f43_98f7_e7750fa974bd, _ModuleRegistry_41c62ed4_f9c9_4c1f_a00a_436732bda73c, _ModuleRegistry_abe25b29_9a5f_495d_acc9_12997797bc5c, _ModuleRegistry_11989043_45c3_4926_80a2_c781ff1b7ea6]
w: [ksp] declaration _ModuleRegistry_db73aee8_6d9a_4d73_b610_de27d9ba1f34 --- moduleRegistryId db73aee8_6d9a_4d73_b610_de27d9ba1f34
w: [ksp] processing module annotation @_Info_db73aee8_6d9a_4d73_b610_de27d9ba1f34
w: [ksp] map result /Users/nazarabdullah/AndroidStudioProjects/KesiaMobile/feature/shared/build/generated/ksp/debug/kotlin/_generated/_ramcosta/_composedestinations/_moduleregistry/_ModuleRegistry_db73aee8_6d9a_4d73_b610_de27d9ba1f34.kt
w: [ksp] destination qualifiedName = id.kesia.feature.shared.destinations.FilterDoctorBottomScreenDestination
w: [ksp] resultType qualifiedName = id.kesia.feature.shared.filter_doctor.FilterDoctorNavArgs
w: [ksp] destination qualifiedName = id.kesia.feature.shared.destinations.DoctorSchedulePoliListScreenDestination
w: [ksp] resultType qualifiedName = id.kesia.feature.shared.filter_doctor.FilterDoctorNavArgs
w: [ksp] destination qualifiedName = id.kesia.feature.shared.destinations.ForgotMrScreenDestination
w: [ksp] resultType qualifiedName = kotlin.String
w: [ksp] destination qualifiedName = id.kesia.feature.shared.destinations.InsurerListBottomScreenDestination
e: [ksp] java.lang.NullPointerException
at com.ramcosta.composedestinations.ksp.processors.Processor$getSubModuleInfos$3$2.invoke(Processor.kt:324)
at com.ramcosta.composedestinations.ksp.processors.Processor$getSubModuleInfos$3$2.invoke(Processor.kt:157)
at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
at kotlin.sequences.FlatteningSequence$iterator$1.next(Sequences.kt:299)
at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:811)
at com.ramcosta.composedestinations.ksp.processors.Processor.getSubModuleInfos(Processor.kt:177)
at com.ramcosta.composedestinations.ksp.processors.Processor.process(Processor.kt:91)
at com.google.devtools.ksp.AbstractKotlinSymbolProcessingExtension$doAnalysis$8$1.invoke(KotlinSymbolProcessingExtension.kt:306)
at com.google.devtools.ksp.AbstractKotlinSymbolProcessingExtension$doAnalysis$8$1.invoke(KotlinSymbolProcessingExtension.kt:304)
at com.google.devtools.ksp.AbstractKotlinSymbolProcessingExtension.handleException(KotlinSymbolProcessingExtension.kt:410)
at com.google.devtools.ksp.AbstractKotlinSymbolProcessingExtension.doAnalysis(KotlinSymbolProcessingExtension.kt:304)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:112)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:77)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:256)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:247)
at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:115)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:247)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:87)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:43)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:165)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:50)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:104)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:48)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1523)
at jdk.internal.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source)
at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.rmi/sun.rmi.transport.Transport.serviceCall(Unknown Source)
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
from compose-destinations.
Hi again @nazarabd3005
Can you please open file:
/Users/nazarabdullah/AndroidStudioProjects/KesiaMobile/feature/shared/build/generated/ksp/debug/kotlin/_generated/_ramcosta/_composedestinations/_moduleregistry/_ModuleRegistry_<something>
And show me its contents?
It seems like there is an annotation _Info_<something>
that has an issue with typeResult. I need to understand what that is.
More specifically, it seems like it is something like this:
@_Info_<something>(
moduleName = "",
packageName = ????
typeResults = [
_Destination_Result_Info_<something>(
destination = InsurerListBottomScreenDestination::class, // π this is what I got from logs, it should be here
resultType = ??WHAT IS THIS??, // π I need to know what is this
isResultNullable = ????
)
],
topLevelGraphs = [
????
]
)
object _ModuleRegistry_<something>
where <something>
will be like a UUID looking string, and "????" I don't know what it is, and it's irrelevant, but the ??WHAT IS THIS??
is what I really need to know π
Thank you!
from compose-destinations.
hi @raamcosta
here the class
package _generated._ramcosta._composedestinations._moduleregistry
import com.ramcosta.composedestinations.spec.DestinationSpec
import id.kesia.domain.patient.type.DebiturTypeEvent
import id.kesia.feature.shared.destinations.DoctorSchedulePoliListScreenDestination
import id.kesia.feature.shared.destinations.FilterDoctorBottomScreenDestination
import id.kesia.feature.shared.destinations.ForgotMrScreenDestination
import id.kesia.feature.shared.destinations.InsurerListBottomScreenDestination
import id.kesia.feature.shared.destinations.MrValidationScreenDestination
import id.kesia.feature.shared.filter_doctor.FilterDoctorNavArgs
import kotlin.reflect.KClass
annotation class _Info_db73aee8_6d9a_4d73_b610_de27d9ba1f34(
val moduleName: String,
val packageName: String,
val typeResults: Array<_Destination_Result_Info_db73aee8_6d9a_4d73_b610_de27d9ba1f34> = emptyArray(),
val topLevelGraphs: Array<String> = emptyArray()
)
annotation class _Destination_Result_Info_db73aee8_6d9a_4d73_b610_de27d9ba1f34(
val destination: KClass<out DestinationSpec>,
val resultType: KClass<*>,
val isResultNullable: Boolean
)
@_Info_db73aee8_6d9a_4d73_b610_de27d9ba1f34(
moduleName = "",
packageName = "id.kesia.feature.shared",
typeResults = [
_Destination_Result_Info_db73aee8_6d9a_4d73_b610_de27d9ba1f34(
destination = FilterDoctorBottomScreenDestination::class,
resultType = FilterDoctorNavArgs::class,
isResultNullable = false
),
_Destination_Result_Info_db73aee8_6d9a_4d73_b610_de27d9ba1f34(
destination = DoctorSchedulePoliListScreenDestination::class,
resultType = FilterDoctorNavArgs::class,
isResultNullable = false
),
_Destination_Result_Info_db73aee8_6d9a_4d73_b610_de27d9ba1f34(
destination = ForgotMrScreenDestination::class,
resultType = String::class,
isResultNullable = false
),
_Destination_Result_Info_db73aee8_6d9a_4d73_b610_de27d9ba1f34(
destination = InsurerListBottomScreenDestination::class,
resultType = DebiturTypeEvent::class,
isResultNullable = false
),
_Destination_Result_Info_db73aee8_6d9a_4d73_b610_de27d9ba1f34(
destination = MrValidationScreenDestination::class,
resultType = Boolean::class,
isResultNullable = false
)
],
topLevelGraphs = [
]
)
object _ModuleRegistry_db73aee8_6d9a_4d73_b610_de27d9ba1f34
from compose-destinations.
Is there something specific to "DebiturTypeEvent"? Is it a class maybe from another module or something like that?
from compose-destinations.
Does the module that uses this module have access to it?
I believe I may know the reason and how to fix it, but I'm curious.
from compose-destinations.
Yes, the DebiturTypeEvent is in another module
and Yes the main app module doesn't have access to it
this is the module tree branch
appmodule -> featureModule -> domainModule (DebiturTypeEvent is here)
from compose-destinations.
Ok thank you so much for helping me debug this.
I am already working on a fix. Should be up in like an hour or so!
from compose-destinations.
No worries π
from compose-destinations.
For what it's worth, this means that this Destination InsurerListBottomScreenDestination
can probably be internal. Given that you cannot really navigate to it from the app module (or at least you cannot wait for its result)
from compose-destinations.
Maybe need to move DebiturTypeEvent to feature module so app module can access the class
from compose-destinations.
Once 2.0.0-alpha06 is up, I'll post it here and then please test it and let me know that it works! Thank you once again π
from compose-destinations.
It's up! Let me know it works now :)
from compose-destinations.
"Hey,
The bug's fixed, but now the app module isn't generating navgraphs. Any ideas on how to fix this?"
this is the annotation class graphs in app module
@NavGraph<RootGraph>
annotation class MainGraphs {
@ExternalNavGraph<HomeGraphsNavGraph>(start = true)
@ExternalNavGraph<AuthGraphsNavGraph>
@ExternalNavGraph<ProfileGraphsNavGraph>
@ExternalNavGraph<OnlineBookingGraphsNavGraph>
@ExternalNavGraph<TelemedicineGraphsNavGraph>
@ExternalNavGraph<PharmacyOnlineGraphsNavGraph>
@ExternalNavGraph<DoctorScheduleGraphsNavGraph>
@ExternalNavGraph<OrderGraphsNavGraph>
companion object Includes
}
from compose-destinations.
Do you see ksp task running for this module?
Can you try having a Composable annotated with Destination<MainGraphs>
?
from compose-destinations.
Seems Iβm able to reproduce this. Sorry Iβm on it, Iβll let you know π
thank you again
from compose-destinations.
In the mean time add this code and it should work
@Destination<MainGraphs>
@Composable
fun Asd() {}
one thing though: is this graph βmainβ the one you want to pass to DestinationsNavHosf? Or does root contain anything else?
if it is the one to pass to the NavHost, then it needs to be annotated with @NavHostGraph. Instead of NavGraph<RootGraph>
from compose-destinations.
(Found the issue! It was a missing commit on 2.0.0 version.. 2.1.0 has a commit that fixes fixes this but I forgot to include it on this branch π . Iβll make a new version!)
from compose-destinations.
2.0.0-alpha07 is up for a while now.
Let me know if things look good now!
from compose-destinations.
Hi @raamcosta
the latest update is now able to generate and app running well π―
from compose-destinations.
Thatβs great news! Thank you π
from compose-destinations.
Related Issues (20)
- ModuleDestinations$Includes is defined multiple times in Multi-Module project HOT 4
- [ksp] java.lang.NullPointerException when using custom NavArgument type HOT 13
- No NavGraphs in V2 HOT 14
- Support for Shared Element Transition. HOT 2
- Tab navigation support. HOT 1
- Can not make dependenciesContainerBuilder example work HOT 2
- Serializer for class 'DirectionImpl' is not found in v2 HOT 10
- [2.1.0-beta03] Navgraphs.* cannot be imported in the generated NavGraphs HOT 3
- navargs.* cannot be imported in ArgsToSavedStateHandle.kt HOT 2
- HorizontalPager pageContent can't save state HOT 2
- NavGraphArhs are visible only in "start" destination HOT 6
- Removing from composition and re-adding when navigating HOT 3
- java.lang.IllegalStateException: Duplicate route found X_destination'. Routes must be unique!. In Muli-module project. HOT 2
- Missing classes detected while running R8 on AGP 8.4.0 HOT 2
- Video tutorials for using the library. HOT 1
- [KSP][2.1.0] _ModuleRegistry missing visibility modifiers HOT 4
- [DEEPLINK][2.1.0] Request to bring back withDeepLink() HOT 9
- Can compose-destinations used in compose for desktop project ? HOT 1
- Accompanist Navigation Material functionality now available in androidx.compose.material.navigation.*
- "Reproducible build" possible with Compose Destinations? HOT 3
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 compose-destinations.