raamcosta / compose-destinations

Annotation processing library for type-safe Jetpack Compose navigation with no boilerplate.
https://composedestinations.rafaelcosta.xyz
Apache License 2.0
3.14k stars 129 forks source link

[2.1.0-beta03] Navgraphs.* cannot be imported in the generated NavGraphs #630

Closed SorrowBlue closed 1 month ago

SorrowBlue commented 1 month ago

I had a problem after updating to 2.1.0-beta03. No problem with 2.1.0-beta02.

I created MainGraph in the app module and only included XXXDestination and XXXXNavGraph in another module. ※There is no @Destination<MainGraph> in the app module.

@NavHostGraph
annotation class MainGraph {

    @ExternalNavGraph<BookshelfNavGraph>(start = true)
    @ExternalDestination<FavoriteAddScreenDestination>
    companion object Includes
}

navgraphs.* cannot be imported in the generated NavGraphs. image

This problem does not occur if create a destination that is not used.

@Destination<MainGraph>
@Composable
fun EmptyScreen() {}
raamcosta commented 1 month ago

Definitely seems like a bug. Will look into it later in the evening, thank you for reporting 🙏

raamcosta commented 1 month ago

beta04 builds are running, expect to see them available in about 30min or so.

Let me know that it fixed the issue! Thank you once again.

szymonchaber commented 1 month ago

@raamcosta This fix is super important for multi-module projects, so it would be great to add that to releases tab in the repository as well, so others will know about it