goto-bus-stop / setup-zig

use a @ziglang compiler in your github actions workflows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

version: master fails with unhandled promise rejection

Vexu opened this issue · comments

bin/tar x -C /home/runner/work/_temp/d6b098d2-58ec-433e-89ab-e3e9dfcc38e6 -f /home/runner/work/_temp/e7f54a5e-4597-4306-905a-cd556da6d3b6
(node:2710) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat '/home/runner/work/_temp/d6b098d2-58ec-433e-89ab-e3e9dfcc38e6/zig-linux-x86_64-master'
    at Object.statSync (fs.js:915:3)
    at Object.<anonymous> (/home/runner/work/_actions/goto-bus-stop/setup-zig/v1.2.0/dist/index.js:3612:17)
    at Generator.next (<anonymous>)
    at /home/runner/work/_actions/goto-bus-stop/setup-zig/v1.2.0/dist/index.js:3352:71
    at new Promise (<anonymous>)
    at module.exports.533.__awaiter (/home/runner/work/_actions/goto-bus-stop/setup-zig/v1.2.0/dist/index.js:3348:12)
    at Object.cacheDir (/home/runner/work/_actions/goto-bus-stop/setup-zig/v1.2.0/dist/index.js:3607:12)
    at downloadZig (/home/runner/work/_actions/goto-bus-stop/setup-zig/v1.2.0/dist/index.js:1150:16)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:2710) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:2710) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
on: [push]
jobs:
  test:
    strategy:
      matrix:
        os: [ubuntu-latest]
    runs-on: ${{matrix.os}}
    steps:
      - uses: actions/checkout@v1
      - uses: goto-bus-stop/setup-zig@v1.2.0
        with:
          version: master
      - run: zig build test

Hmm, does it work with other versions? It seems like it's a problem when calling into the cacheDir() function from @actions/cache, but that code shooooooooould be the same for other versions too.

I'm away for work at the moment so probably won't have time to look into it further this week.

Version 0.5.0 worked as expected and failed in zig build test step with a compile error.

Ahh. It's not cache-related, it's assuming the wrong name for the unpacked zig binary folder. I think I have a fix but the WiFi I'm on is blocking git pushes 🙃 should be able to get it up later today tho.

@goto-bus-stop Wifi improved by any chance? 😀

yea. fix is in this branch https://github.com/goto-bus-stop/setup-zig/tree/fix-4. i'm having issues getting github to actually test the frickin thing though.

ok don't know what i changed but it's doing the right thing now. just need to tweak the zig test case because it used zig 0.5.0 style stdout and it changed on master. will be ready in a few mins.

1.2.1 should finally do it!