Hi. Got this on my mac today: > Downloading Kot...
# kotlin-toolchain
j
Hi. Got this on my mac today:
Downloading Kotlin Toolchain distribution v0.12.1...
################################################################ 100.0%
ERROR: Checksum mismatch for /Users/jakub.g/Library/Caches/JetBrains/Kotlin/cli/download-file-64711.bin (downloaded from packages.jetbrains.team/maven/…/kotlin-cli-0.12.1-dist.tgz): expected checksum 614494004c77b917a6247c26fb62d767fb449b2467d6b226e949fa0f1350608a but got ce48f9401e26312e6cbca77177bc847ace33028db730028de46fbe6269abd0eb
(repeatable) everything was working on my linux, i committed the new wrapper in my project, pushed and tried to pull and run on my macbook. so I deleted kotlin wrapper files, ran
kotlin update --create
from my sdkman installation, and indeed:
Copy code
➜ git diff kotlin
diff --git a/kotlin b/kotlin
index 87ea800..612d604 100755
--- a/kotlin
+++ b/kotlin
@@ -19,7 +19,7 @@ set -e -u
 # The version of the Kotlin Toolchain (and CLI) distribution to provision and use
 kotlin_cli_version=0.12.1
 # Establish chain of trust from here by specifying exact checksum of Kotlin Toolchain (and CLI) distribution to be run
-kotlin_cli_sha256=614494004c77b917a6247c26fb62d767fb449b2467d6b226e949fa0f1350608a
+kotlin_cli_sha256=ce48f9401e26312e6cbca77177bc847ace33028db730028de46fbe6269abd0eb

 KOTLIN_CLI_DOWNLOAD_ROOT="${KOTLIN_CLI_DOWNLOAD_ROOT:-<https://packages.jetbrains.team/maven/p/amper/amper>}"
is it possible that your install sets different sha256 on linux and on mac?
j
It should not set different checksums, because it's the same JVM-based distribution on all OSes right now. However, doing
kotlin update
might actually give you a different version, which would have a different sha
j
i cannot reproduce it anymore, might've been some strange hiccup. is it possible that some update changed the version in wrapper, but not the sha fingerprint?
j
Ok it's actually a very serious issue, thanks for noticing. For some reason our artifacts repo was not marked as immutable AND we had a bug in our CI that made it overwrite the publication when we ran it in a special mode to fix the SDKMAN stuff. KTC-5888 kotlin-cli-0.12.1-dist.tgz was overwritten with a main-branch build; wrapper checksum check fails
j
🙇
p
I experience the same on Windows! My lesson starts in 5 minutes🫣
j
I'd say: remove the kotlin.bat file and reinstall
j
I'm currently releasing 0.12.2 because dealing with the current state of 0.12.1 is a bit tricky and will take a little bit more time
🙏 1
j
or change the kotlin_cli_sha to the expected value
j
@Jakub Gwóźdź while that works, you effectively get a recent dev version from
main
. So at that point you might as well
kotlin update --dev
j
ah!
j
0.12.2 should be out in ~10min (let's be conservative)
j
adventurous!
j
0.12.2 is available now! Sorry for the inconvenience
amper intensifies 1
p
Can I update to this specific version?
j
If you have a globally installed Kotlin Toolchain,
kotlin update
should work, but you can also do
kotlin update --target-version=0.12.2
.
If your local Kotlin wrapper is broken because of the checksum, you can delete it and run the global
kotlin update --create
to re-create them in the latest (0.12.2) version, as described by Jakub as the first post of this thread.
If you don't have a global installation at all, I would advise to just replace the wrapper by hand with kotl.in/cli.bat or kotl.in/cli.sh (depending on your OS) or use the installer command from our homepage.
thank you color 1