-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
KtLint CLI 0.43 doesn't work with JDK 1.8 #1271
Comments
Please provide a sample file which causes this problem. |
I can't provide my work project. but this problem i have in some my work projects on android / kotlin |
Maybe you can strip a file in which the problem occurs to a bare minimum so that you do not have to provide any proprietary code. I can not investigate this without an example that causes this problem. |
Just i create file "/tmp/3/test.kt" and fill him random data.
|
Also when i create empty files:
Can't reproduce problem on apple m1. Only on linux x64 Also i can't reproduce problem on other linux x64 pc Ktlint required java? On pc with problem version of java is: |
I think problem really in java version:
|
I cannot reproduce it on Gentoo with following JDK:
|
If you just run |
|
Yep, with JDK 1.8 I could reproduce it. |
Reproduced this with the latest ktlint. Let's pin this issue, so new people won't create duplicates? Btw, it works fine with the jar from maven central. The problem is in the executable jar plugin (shadow). The following works fine:
|
Run into the same issue with the homebrew update
|
Here I have the following setup:
When I run just |
Hi, thx for fixing the issue. Is it planned to release a "bug fix" or a new minor version just containing the kotlin update, to solve this issue? |
hopefully, new minor release soon will be done. Meanwhile you could try to use snapshot or build CLI yourself (run |
I'll work on pushing a minor release today. |
|
@paul-dingemans thanks. I noticed you had a bunch of PRs open that I'll take a look at. If it's not too much trouble, could you link the ones that are 0.43.0 regressions? It's hard for me to tell which ones are existing issues and which ones we should consider for a minor release. We could also do an entirely new 0.44.0 release with a whole bunch of fixes if there are many, and only do a .1 release for the JDK fix. |
@shashachu see or 1293, 1292, 1284, 1283, 1279 and 1276 |
In my case, temurin 1.8.0_322, adopt@1.8.0-292 works with 0.43.0. |
0.46.1 still not working |
Gentoo linux latest
Ktlint 0.43 binary from you repository
Run in clean kotlin project
Command:
git diff --name-only --cached --relative | grep '\.kt[s"]\?$' | xargs ktlint --relative
Command:
git diff --name-only --cached --relative | grep '\.kt[s"]\?$' | xargs ktlint .
Error:
Command:
ktlint
Error:
The text was updated successfully, but these errors were encountered: