Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Install.hs: cabal-ghcs shows unsupported GHC versions #1445

Closed
fendor opened this issue Nov 10, 2019 · 3 comments · Fixed by #1452
Closed

Install.hs: cabal-ghcs shows unsupported GHC versions #1445

fendor opened this issue Nov 10, 2019 · 3 comments · Fixed by #1452
Labels

Comments

@fendor
Copy link
Collaborator

fendor commented Nov 10, 2019

Based on #1436 (comment).

Example:

$ stack install.hs cabal-ghcs
run from: stack

******************************
Found the following GHC paths:
ghc-8.8.1: /opt/ghc/bin/ghc
ghc-8.0.1: /usr/bin/ghc

******************************

Build completed in 0.00s

However, since we do not support these versions, they should not be detected, since these are transitively used to show the help-message.
Bug-fix could be to intersect the found ghc versions with the supported ghc versions, which are obtained by parsing all stack-*.yaml files in the directory.

@jneira
Copy link
Member

jneira commented Nov 11, 2019

Ideally we should not rely on stack if user are executing the script with cabal so maybe we should keep a explicit list of ghc supported versions, although it would be somewhat duplicated as stack.yaml resolvers

@fendor
Copy link
Collaborator Author

fendor commented Nov 11, 2019

We are not reyling on stack but only on the existence of stack-$GHC.yaml files to support version $GHC.
This is fine since we support the same GHC versions for cabal and stack.

@jneira
Copy link
Member

jneira commented Nov 11, 2019

Oh you are right, stack itself would not be needed only access to stack*.yaml files.
But it still could be done the other way around: to have the explicit versions in the code and even check that the stack-*.yaml files match those versions (it had catch the recent reintroduction of stack-8.2.2.yaml file f.e.) so only supported versions would be available in the stack script independently of the actual stack.yaml files.

But maybe it goes so far in see the code as the unique source of truth 😉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants