If anyone has any free time, do you mind seeing if...
# ktfmt
c
If anyone has any free time, do you mind seeing if you can reproduce this bug? https://github.com/facebookincubator/ktfmt/issues/249 It's been going on for months and it drives me absolutely insane. Calling reformat code with the ktfmt plugin literally breaks my code. 😭
2
j
I am using ktfmt + compose daily with no issues
with kotlinlang style tho
Havent tried rest
c
@Javier thank you so much for responding. I will set my style to kotlinlang to see if it fixes it. What version of AS are you using? I'm on chipmunk canaries. I wonder if maybe that's the issue?
j
Artic Fox mainly
beta and canary a few
c
hm. I can't use AF, but maybe I'll "downgrade" to bumblebee beta and see if it has the same issue. I did switch to kotlinlang and seemed to have the same issue. /shruggie
j
Why you can't use AF?
c
We're using some newer features of AGP that are pinning us to agp 7.2.0 alpha
j
Is it only happening when it autocompletes? I don't use it a lot with Compose because it was broken (root issue and so on caused by compose). Maybe disabling that ktfmt applies when autocompletes solves the problem.
c
Auto complete has always worked for me. How can I disable ktfmt applying on auto-complete?
also, what do you mean by "(root issue and so on caused by compose)" Compose has an issue with formatting code?
j
compose with autocomplete some times added a huge package which starts with root, it is fixed in new AS versions
c
hm. I get the same issue in canary. Do you know where the setting is to disable reformat code on autocomplete? I can't find it.
I don't understand how I'm the only one that can reproduce. 😭
j
That settings doesn't exist, but it is a good feature request
c
But this issue isn't happening to you? Are you sure you use the ktfmt plugin? I've tried stable, beta and canary AS and all of them have this issue.
j
yes I use it. But I don't autocomplete a lot, first because it is slower than my writing speed, and second because it is bugged without ktfmt (root issue), so I am not using it in compose files a lot. Even imports are not being added some times by the IDE and I have to copy and paste them (not a ktfmt issue)
c
Gotcha. Okay. Thanks for following up. Any idea what logs or anything I can do to help debug the issue? Should I file an issue with IJ at this point?
j
About the root bug, it is reported. About the ktfmt one, probably only wait until ktfmt maintainers can take a look to it
with cmd alt L it is failing too?
or only when autocompleting
c
cmd + alt + L fails too
j
that is really weird
I saw that issue zero times with that command
with kotlinlang, not sure if latest kftmt tho
monday I can check the version
c
yep. It wasn't always like this. at some point ktfmt plugin (or AS) had an update and broke things.
j
but ktfmt probably is the latest one
c
I might try to start backtracking and seeing if I can figure out when it started happening.
thanks for checking though Javier. I only have one other team member, and they have reported the same issue. so it kind of sucks. dont know what to do. lol
j
not sure how to get logs from intellij plugin (without cloning the repo)
try forking ktfmt and open the project in the IDE "created" for using the plugin so you can debug it and see all exceptions
but it looks like it is not crashing
@Carmi Grushko, can you take a look to the reproducer created by @Colton Idle?
🙏 1
c
Just reporting back that it also happens with kotlinlang selected