Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add versions to base dependency #142

Closed
chshersh opened this issue Aug 30, 2018 · 3 comments
Closed

Add versions to base dependency #142

chshersh opened this issue Aug 30, 2018 · 3 comments
Labels
feature generated project Files, folder generation by the summoner

Comments

@chshersh
Copy link
Contributor

It's possible since we know GHC versions for project.

@chshersh chshersh added this to the v1.2: `summon update` milestone Aug 30, 2018
@vrom911 vrom911 added the Hacktoberfest https://hacktoberfest.digitalocean.com/ label Sep 30, 2018
@Leschonander
Copy link

I'd be interested in helping out with this for Hacktoberfest. For Adding versions to base dependency, that would involve going through the YAML files and updating the versions to the latest GHC?

@chshersh chshersh added the generated project Files, folder generation by the summoner label Oct 1, 2018
@chshersh
Copy link
Contributor Author

chshersh commented Oct 1, 2018

@Leschonander I appreciate your desire to help! The issue is about adding version constraints for base package in build-depends in generated by summoner projects. This is relevant to lines like this one:

build-depends: $base

Currently summoner generates project with the following .cabal piece:

build-depends: base

While in reality it should add version constraints according to the chosen GHC versions. Something like this:

build-depends: base >= 4.10 && < 5

We already have a function for detecting base versions according to GHC version, only need to use it in templates for generating project:

baseVer :: GhcVer -> Text
baseVer = \case
Ghc7103 -> "4.8.0.2"
Ghc801 -> "4.9.0.0"
Ghc802 -> "4.9.1.0"
Ghc822 -> "4.10.1.0"
Ghc843 -> "4.11.1.0"

@Leschonander
Copy link

Ahh, that makes sense. Will get to it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature generated project Files, folder generation by the summoner
Projects
None yet
Development

No branches or pull requests

3 participants