Mistuke / GhcChoco

Chocolatey sources for pure GHC installs
https://chocolatey.org/packages/ghc
MIT License
4 stars 1 forks source link

GHC isn't on path on Travis CI/git bash #3

Closed lukel97 closed 5 years ago

lukel97 commented 5 years ago

When installing ghc 8.6.5 via chocolatey on Travis CI and running refreshenv.exe, ghc --version immediately fails. This causes cabal to complain about not being able to find ghc (Cabal was accessible from the path ok though) I'm not sure if I'm just configuring something wrong though with my test job though: https://travis-ci.com/bubba/lsp-test/jobs/206537253

Mistuke commented 5 years ago

This isn't a bug with the package, it's an issue with Travis. The shell you're running your script in seems to be a bash or other posix environment. refreshenv has no effect on those.

Because of this chocolatey packages aren't fully functional on Travis. You could use something like what the wireshark people do to get python working https://salsa.debian.org/debian/wireshark/commit/5ed8360c21ccc5c26ca47eb59b175634415ae11f#dea01dd89a3b602828e630677fde5d77c06441c8_65_97

Cabal works because it's installed through a different mechanism, one that won't work for ghc, as it breaks a core assumption of the compiler w.r.t to where its own files are.

But in any case this is something that Travis needs to fix.