Gabriella439/grace

Nix build fails at `remote-import` test

mcwitt opened this issue · 5 comments

Thanks for this project!

On current main (ce01be3), I'm seeing that nix build fails while running the tasty test suite. Looking at the logs, the failure appears to be

remote-import-input - error:                            FAIL
          Missing golden value.

(expected behavior: pass, or possibly skip this test when building with Nix?)

Is that the only failure? It seems odd that only that test would fail but other import resolution tests would still succeed

Is that the only failure? It seems odd that only that test would fail but other import resolution tests would still succeed

Ah, sorry, I see now that there are indeed multiple (6) failures:

  • remote-import-input (Missing golden value)
  • remote-file-not-found-input (Result did not match golden value)
  • invalid-utf8-input (Result did not match golden value)
  • remote-invalid-parse-input (Result did not match golden value)
  • remote-referentially-insane-input (Result did not match golden value)
  • remote-transitive-import-input (Missing golden value)

Building with sandboxing disabled does work for me (on NixOS):

$ nix build --option sandbox false

Looking into whether there's a way to disable sandboxing for checks only..

I'm assuming the issue is that the failing tests require network access, but this is not allowed in a sandboxed build, which I think is the default on NixOS.

I looked around a bit for a workaround (found, e.g. this and this). The two workarounds I've come up with are

  1. Disabling the sandbox (e.g. with nix build --option sandbox false)
  2. Building the graceNoTests attribute instead

Wondering if it'd make sense to add a note to the readme about disabling sandboxing, or potentially change the default build target to graceNoTests? I'd be happy to PR this.

Alright, this should be fixed now. I ended up going with changing the default build target to not build tests