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

HLS check fails by trying to access the network

Open srid opened this issue 2 years ago • 2 comments

The check works on my local machine but not on Github Actions runner or Garnix CI.

https://github.com/srid/haskell-template/runs/8060856223?check_suite_focus=true

default-hls-check> Severity: DsError
default-hls-check> Message:
default-hls-check>   Error when calling cabal exec -v0 -- ghc --print-libdir
default-hls-check>   dieVerbatim: user error (cabal: Couldn't establish HTTP connection. Possible cause: HTTP proxy
default-hls-check>   server
default-hls-check>   is down.
default-hls-check>   )

Very strange.

srid avatar Aug 28 '22 22:08 srid

Because this check requires disabling the Nix sandbox for it to work, I think we should disable the enableHLSCheck option by default.

srid avatar Aug 28 '22 22:08 srid

This fails on Hercules CI, understandably: https://hercules-ci.com/github/srid/haskell-template/jobs/100

So, I'd have to hlsCheck.enable = false; and add a Hercules CI effect that runs the HLS check. For this to be doable, however, haskell-flake has to expose the check derivation itself in some form, like config.haskellProjects.default.hlsCheck.drv.

EDIT: n/m it won't work

srid avatar Dec 23 '22 18:12 srid