Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unresolvable iOS reference on Linux host #2173

Closed
ting-yuan opened this issue Oct 25, 2024 · 1 comment · Fixed by #2186
Closed

Unresolvable iOS reference on Linux host #2173

ting-yuan opened this issue Oct 25, 2024 · 1 comment · Fixed by #2186
Milestone

Comments

@ting-yuan
Copy link
Collaborator

Original discussion: https://kotlinlang.slack.com/archives/C013BA8EQSE/p1729726539158869

Failing PR: amzn/kotlin-inject-anvil#54
Unresolvable reference: https://github.com/amzn/kotlin-inject-anvil/blob/main/sample/app/src/iosSimulatorArm64Main/kotlin/software/amazon/lastmile/kotlin/inject/anvil/sample/IosAppComponent.kt

Execution failed for task ':sample:app:kspKotlinIosSimulatorArm64'.
> A failure occurred while executing com.google.devtools.ksp.gradle.KspAAWorkerAction
   > Error type '<ERROR TYPE: UIApplication>' is not resolvable in the current round of processing. 
@ting-yuan ting-yuan added this to the 1.0.27 milestone Oct 25, 2024
@ting-yuan
Copy link
Collaborator Author

The difference between the build on Mac and on Linux is the kotlinCompilation.compileDependencyFiles from the corresponding Kotlin compilation task. On Mac, it has all the binding klibs. On Linux, it has none.

During Gradle configuration, this warning pops up on the Linux build:

w: The following Kotlin/Native targets cannot be built on this machine and are disabled:
iosSimulatorArm64

And it is why the dependencies are not populated.

On KSP1, the reproducer doesn't fail because the corresponding KSP task is disabled alone with the compilation. So what should be fixed here is that the task should be disabled for KSP2 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant