Giter VIP home page Giter VIP logo

Comments (23)

raamcosta avatar raamcosta commented on May 28, 2024 1

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.

raamcosta avatar raamcosta commented on May 28, 2024

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.

raamcosta avatar raamcosta commented on May 28, 2024

It's up @nazarabd3005.
Please try it and past here the log warnings you get!

from compose-destinations.

nazarabd3005 avatar nazarabd3005 commented on May 28, 2024

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.

raamcosta avatar raamcosta commented on May 28, 2024

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.

nazarabd3005 avatar nazarabd3005 commented on May 28, 2024

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.

raamcosta avatar raamcosta commented on May 28, 2024

Is there something specific to "DebiturTypeEvent"? Is it a class maybe from another module or something like that?

from compose-destinations.

raamcosta avatar raamcosta commented on May 28, 2024

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.

nazarabd3005 avatar nazarabd3005 commented on May 28, 2024

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.

raamcosta avatar raamcosta commented on May 28, 2024

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.

nazarabd3005 avatar nazarabd3005 commented on May 28, 2024

No worries πŸ‘

from compose-destinations.

raamcosta avatar raamcosta commented on May 28, 2024

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.

nazarabd3005 avatar nazarabd3005 commented on May 28, 2024

Maybe need to move DebiturTypeEvent to feature module so app module can access the class

from compose-destinations.

raamcosta avatar raamcosta commented on May 28, 2024

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.

raamcosta avatar raamcosta commented on May 28, 2024

It's up! Let me know it works now :)

from compose-destinations.

nazarabd3005 avatar nazarabd3005 commented on May 28, 2024

"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.

raamcosta avatar raamcosta commented on May 28, 2024

Hi @nazarabd3005

Do you see ksp task running for this module?
Can you try having a Composable annotated with Destination<MainGraphs>?

from compose-destinations.

raamcosta avatar raamcosta commented on May 28, 2024

Seems I’m able to reproduce this. Sorry I’m on it, I’ll let you know πŸ™

thank you again

from compose-destinations.

raamcosta avatar raamcosta commented on May 28, 2024

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.

raamcosta avatar raamcosta commented on May 28, 2024

(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.

raamcosta avatar raamcosta commented on May 28, 2024

2.0.0-alpha07 is up for a while now.

Let me know if things look good now!

from compose-destinations.

nazarabd3005 avatar nazarabd3005 commented on May 28, 2024

Hi @raamcosta
the latest update is now able to generate and app running well πŸ’―

from compose-destinations.

raamcosta avatar raamcosta commented on May 28, 2024

That’s great news! Thank you πŸ™

from compose-destinations.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.