odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.93k stars 611 forks source link

Apparent release packaging error for odin-ubuntu-amd64-dev-2024-03.zip #3257

Closed jgaines closed 7 months ago

jgaines commented 8 months ago

Context

The latest odin-ubuntu-amd64-dev-2024-03.zip release file appears to have been packaged wrong. The contents of the zip file are another zip file named dist.zip

I'm using mise (formerly rtx) which uses the asdf plugin to install Odin. The current dev-2024-03 version is not installable with mise or asdf because the packaging of this version doesn't match the expected directory structure.

❯ mise x odin@dev-2024-02 -- odin report
Where to find more information and get into contact when you encounter a bug:

    Website: https://odin-lang.org
    GitHub:  https://github.com/odin-lang/Odin/issues

Useful information to add to a bug report:

    Odin: dev-2024-02-nightly:539cec74
    OS:   Linux Mint 21.3, Linux 6.5.0-18-generic
    CPU:  Intel(R) Core(TM) i7-9700F CPU @ 3.00GHz
    RAM:  64237 MiB

Expected Behavior

The prior release version zip file contained the correct internal structure:

❯ unzip -l odin-ubuntu-amd64-dev-2024-02.zip
Archive:  odin-ubuntu-amd64-dev-2024-02.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  2024-02-01 16:42   base/
        0  2024-02-01 16:42   core/
        0  2024-02-01 16:42   examples/
109409232  2024-02-01 16:41   libLLVM-14.so.1
     1502  2024-02-01 16:41   LICENSE
  2666960  2024-02-01 16:41   odin
        0  2024-02-01 16:41   shared/
... lots more lines ...
    29427  2024-02-01 16:42   vendor/x11/xlib/xlib_types.odin
   687622  2024-02-01 16:41   vendor/zlib/libz.lib
     1001  2024-02-01 16:41   vendor/zlib/LICENSE
    11271  2024-02-01 16:41   vendor/zlib/zlib.odin
---------                     -------
225442769                     1158 files

Current Behavior

The latest release zip contains just a dist.zip file:

❯ unzip -l odin-ubuntu-amd64-dev-2024-03.zip
Archive:  odin-ubuntu-amd64-dev-2024-03.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
 69712986  2024-03-04 12:21   dist.zip
---------                     -------
 69712986                     1 file

Extracting the dist.zip appears as though it might have the correct file, but there's yet another layer of directory in the zip:

❯ unzip -l dist.zip | head
Archive:  dist.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  2024-03-04 07:21   dist/
        0  2024-03-04 07:21   dist/vendor/
     6387  2024-03-04 07:21   dist/vendor/README.md
        0  2024-03-04 07:21   dist/vendor/miniaudio/
    60923  2024-03-04 07:21   dist/vendor/miniaudio/device_io_types.odin
        0  2024-03-04 07:21   dist/vendor/miniaudio/src/
      190  2024-03-04 07:21   dist/vendor/miniaudio/src/Makefile

Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. step 1
  2. step 2
  3. you get it...

Failure Logs

Please include any relevant log snippets or files here.

laytan commented 8 months ago

I agree the indirections aren't great.

The goal of this change was the release binary keeping executable permissions after downloading and unzipping it. See https://github.com/actions/upload-artifact/issues/38

For some reason the artifact uploading action does not support this, so you need to zip the artifact yourself, and then we now see that the releases also zip it up again unfortunately.

I have already put in a PR to the asdf plugin to fix the issue (unzip again). https://github.com/jtakakura/asdf-odin/pull/2

laytan commented 7 months ago

I think this can be closed, there isn't anything to be done here anymore, the releases are just packaged a bit differently now, and the third-party automated things like setup-odin and asdf-odin have already been updated to handle it correctly.