digital-asset / daml

The Daml smart contract language
https://www.digitalasset.com/developers
797 stars 199 forks source link

`daml install` fails for versions with processor architecture in filenames #18766

Open moisesackerman-da opened 6 months ago

moisesackerman-da commented 6 months ago

On macOS, daml install 3.0.0-snapshot.20240312.0 (the latest 3.0.0 snapshot) fails with

Installing SDK version 3.0.0-snapshot.20240312.0
Downloading SDK release.
daml: Failed to download release from https://github.com/digital-asset/daml/releases/download/v3.0.0-snapshot.20240312.0/daml-sdk-3.0.0-snapshot.20240301.12838.0.vfea93c8e-macos.tar.gz.
  context: Installing the SDK.
  details: Status {statusCode = 404, statusMessage = "Not Found"}

This is because the daml assistant expects the tarball to be at https://github.com/digital-asset/daml/releases/download/v{version}/daml-sdk-{version}-{os}.tar.gz but now it's at https://github.com/digital-asset/daml/releases/download/v{version}/daml-sdk-{version}-{os}-{architecture}.tar.gz.

this is the relevant code:

https://github.com/digital-asset/daml/blob/d1453ece3e4d62e758927e852134f914ec3ededb/daml-assistant/src/DA/Daml/Assistant/Version.hs#L662-L674

Note that simply adding uname -m to the URL isn't enough - we don't (yet) publish aarch64 tarballs for macOS so at least that case should fall back to x86_64

garyverhaegen-da commented 6 months ago

As a workaround, curl -sSL https://get.daml.com | sh -s 3.0.0-snapshot.20240312.0 works as expected.

moisesackerman-da commented 4 months ago

This is still true as of 3.1.0-snapshot.20240424.0. The 2.x line is unaffected.