srid / haskell-flake

A `flake-parts` Nix module for Haskell development
https://community.flake.parts/haskell-flake
MIT License
159 stars 19 forks source link

HLS check fails by trying to access the network #21

Open srid opened 2 years ago

srid commented 2 years ago

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 commented 2 years ago

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

srid commented 1 year ago

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