com-lihaoyi / Ammonite

Scala Scripting
http://ammonite.io
MIT License
2.61k stars 368 forks source link

Installation via bootstrap fails #1491

Closed koterpillar closed 4 months ago

koterpillar commented 4 months ago

Executing this command from the home page:

curl -L https://github.com/lihaoyi/ammonite/releases/download/3.0.0-M2/2.13-3.0.0-M2-bootstrap > amm && chmod +x amm

Produces a failing script:

$ ./amm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     9    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404

Debugging the bootstrap script, turns out that AMM_DOWNLOAD_URL is set to https://github.com/lihaoyi/ammonite/releases/download/3.0.0-M2/2.132.13-3.0.0-M2, which is incorrect.

koterpillar commented 4 months ago

Looks like after 43812d49fccedfe208b5c6005a1f932cbfd18052, the bootstrap wrapper contains

if [ -z "$SCALA_VERSION" ] ; then
  SCALA_VERSION=2.13$DEFAULT_SCALA_VERSION
fi
lefou commented 4 months ago

Looks like there are some tools processing the file when a release is published, which don't distinguish between SCALA_VERSION and DEFAULT_SCALA_VERSION.

https://github.com/com-lihaoyi/Ammonite/blob/3763a1d4bfb9fab963a0ee9f6b4df12eef1da9e3/build.sc#L868

lefou commented 4 months ago

I also fixed the bootstrap scripts for 3.0.0-M2 on the release page.

koterpillar commented 4 months ago

Thanks! I'm afraid there was a mistake in file renaming, 3.3-2.0.0-M2 should be 3.3-3.0.0-M2 instead.