-
Notifications
You must be signed in to change notification settings - Fork 296
KspTaskNative is not configuration cacheable #1522
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
Comments
This is a workaround for google#1522
I submitted a hotfix as it will probably take a while until this gets fixed upstream. We have a build logic where we conditionally disable native targets based on gradle properties. This leads to the situation that the ksp tasks are skipped even though they should not. |
I've merged @PaulWoitaschek's patch and it'll be available in the 1.9.10-1.0.14-SNAPSHOT tomorrow. The formal release will take a bit longer. I'm wondering if it's possible to override the |
I tried that but the timing is very tricky. |
Not true @Override
public void setOnlyIf(final Closure onlyIfClosure) {
taskMutator.mutate("Task.setOnlyIf(Closure)", new Runnable() {
@Override
public void run() {
onlyIfSpec = createNewOnlyIfSpec().and(onlyIfClosure, "Task satisfies onlyIf closure");
}
});
} |
@yigit Would wrapping that around with |
This is a workaround for google#1522
This is a workaround for google#1522 (cherry picked from commit d0b972d)
I'm going to include the patch into 1.9.20-Beta-1.0.13 and later releases so that you won't need to work it around in build scripts. |
Thanks! Is it safe to use the 1.9.20-Beta ksp version on 1.9.10? It warns at configuration time:
|
Unfortunately, no. It is built for Kotlin 1.9.20-Beta and there may be some incompatibilities to 1.9.10. |
@ting-yuan |
Do you really need Kotlin 1.9.10, or will Kotlin 1.9.20 be OK? IIUC 1.9.20 will be out very soon and KSP 1.9.20-1.0.14 will follow very closely after that. |
As compose often times takes a bit longer we'd love a .10 version. |
KspTaskNative is not configuration cacheable due to a problem in KonanTarget. (https://youtrack.jetbrains.com/issue/KT-61657/KonanTarget-should-implement-equals-or-custom-serialization)
This especially becomes a problem due to the onlyIf check, which always fails after a KSP task is configuration cached.
I think KSP should update its onlyIf check to find the target again from
HostManager
using its name until the Kotlin plugin issue is fixed (to be able to keep the task cacheable).The text was updated successfully, but these errors were encountered: