Hi! We've added arrow-optics to our project and as...
# arrow
d
Hi! We've added arrow-optics to our project and as we used more and more, we often started getting build failures when files with
@optics
are moved: it seems there are some issues with gradle build cache (either local or remote) — old entries in
build/generated
are not being deleted an conflict with newer generated declarations. Did you have some reports like this, perhaps there's a bug I could track?
s
Do you have any other KSP things on the classpath? This sounds like a KSP related issue, not
@optics
. I've never heard of it before but I don't use remote Gradle cache.
a
from my experience, KSP is quite brittle to removing things, in many cases old files are not removed
d
currently arrow-optics is the only thing using ksp.
thanks, I will look into ksp bugtracker then.
Another issue we've noticed is that for some users, files which use Arrow-Optics cause IDE (Android Studio) to report some error a-la: "IDE internal error: syntax highlighting is disabled". But I failed to reproduce this one, will report if I'll have more details, for now it's unclear if arrow-optics is a true cause, but it's usage seems to correlate with this error.
s
"IDE internal error: syntax highlighting is disabled"
There is a couple of issues related to this opened on the YouTrack for the Kotlin plugin as well. I'm encountering this in code not using KSP or arrow-optics as well 😕
d
I see! I came to ask because our devs experience this friction after adding arrow-optics, and on the one hand we love this library and on the other they tell me: let's limit it's usage until these issues are resolved. A bit sad that it's not arrow-optics' fault and can't be quickly addressed because of this.
s
Is everyone experiencing these issues? Are you working in AS, or IDEA? I know they've been making a lot of changes recently, and IIRC Kotlin plugin is now baked into IDEA. Miss-match between IDEA plugin, and Kotlin version can create some issues. At least that's what I've experienced in some cases. Not sure if miss-match with KSP version can also be related to this issue.
Looking at my IDEA, I am on
1.8.20-dev
Kotlin version, so it's not a stable release Kotlin version even 😕
d
We are using Android Studio (Electric Eel → stable), Our project is using
1.7.21
and ksp
1.7.21-1.0.8
. Kotlin plugin version is
221-1.8.0-release-for-android-studio-AS5591.52
So a newer one, yep.
Is everyone experiencing these issues?
Several people (including myself) definetly experienced issues with broken compilation due to issues with
build/generated
dir, but only one developer so far reported issues with syntax highlighting errors. We are using both gradle local + remote build cache. I will keep an eye on this and will collect errors and stacktraces to investigate a bit deeper in ksp + youtrack as you've suggested.
s
You mean these windows, right?
Screenshot 2023-03-03 at 14.00.28.png
d
yep, exactly!
We tried to find them in idea.log, but so far failed to pinpoint it: too much logs 🙂
s
Normally I get an "report issue" window, but with this issue I haven't seen that window anymore.
t
my team is seeing many android studio errors like those mentioned here however we are on the bleeding edge using ...
Android Studio Giraffe | 2022.3.1 Canary 8
Build #AI-223.8617.56.2231.9687552, built on March 3, 2023
Runtime version: 17.0.6+0-17.0.6b802.4-9586694 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.6.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 12
Metal Rendering is ON
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
ide.images.show.chessboard=true
Non-Bundled Plugins:
com.android.aas (3.5.1)
Copy code
'com.google.devtools.ksp' version '1.8.0-1.0.8'
'io.arrow-kt:arrow-stack:1.1.5'