dhall-haskell icon indicating copy to clipboard operation
dhall-haskell copied to clipboard

dhall-nix nix-shell does not work

Open Profpatsch opened this issue 3 years ago • 3 comments
trafficstars

When running nix-shell from the dhall-nix subdir like described in the README, it fails at the dhall build, because it tries to run a bunch of tests which require networking:

[39 of 50] Compiling Nix.Type.Infer   ( src/Nix/Type/Infer.hs, dist/build/Nix/Type/Infer.p_o )
Dhall Tests
  import tests
    discover
      ./dhall-lang/tests/import/success/customHeaders:                                                                         FAIL
        tests/Dhall/Test/Import.hs:186:

        Error: Remote host not found

        URL: https://httpbin.org/user-agent

        Use -p '/.\/dhall-lang\/tests\/import\/success\/customHeaders/' to rerun this test only.
      ./dhall-lang/tests/import/success/noHeaderForwarding:                                                                    FAIL
        tests/Dhall/Test/Import.hs:186:

        Error: Remote host not found

        URL: https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/tests/import/success/customHeadersA.dhall

        Use -p '/.\/dhall-lang\/tests\/import\/success\/noHeaderForwarding/' to rerun this test only.


… a bunch more …

17 out of 1723 tests failed (5.71s)
Test suite tasty: FAIL
Test suite logged to: dist/test/dhall-1.41.1-tasty.log

This is from:

> cd dhall-nix
> nix-shell
> … wait an hour or two …

Profpatsch avatar Apr 28 '22 20:04 Profpatsch

Should the expression disable the network-tests flags introduced in https://github.com/dhall-lang/dhall-haskell/pull/2383 ?

TristanCacqueray avatar Apr 28 '22 21:04 TristanCacqueray

I temporary “fixed” it by commenting out this line:

https://github.com/dhall-lang/dhall-haskell/blob/a9043ea193fe47f14c6eb83afeaf7c89d385a3b5/nix/shared.nix#L105-L106

It wasn’t easy to figure out where to pull to make the tests go away, even though I consider myself to be a quite advanced nix/haskellPackages user …

Profpatsch avatar Apr 28 '22 21:04 Profpatsch

Esp. the whole extension business looks like quite a non-abstraction to me, that could be easier solved by some functions.

Profpatsch avatar Apr 28 '22 21:04 Profpatsch