Skip to content

Add compiler packages to list of packages in Stackage LTS #83

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

Merged
merged 1 commit into from
Mar 24, 2020

Conversation

serras
Copy link
Contributor

@serras serras commented Mar 22, 2020

As described in input-output-hk/haskell.nix#481, the import logic for the new Stackage format does not include the "compiler packages" as provided by the snapshot. This PR fixes that logic by including those packages with their default revisions.

@@ -76,3 +78,5 @@ lts2plan compilerPackagesMap lts = Plan { packages, compilerVersion, compilerPac
_ -> Nothing
, packageFlags = Map.lookupDefault Map.empty name flags
})

packages = packages' `Map.union` compilerPackages'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want the union the other way around. If packages provides overrides for the compilerPackages, we want them to override those, not rely on the compilerPackages.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was my idea too. According to the docs:

The union of two maps. If a key occurs in both maps, the mapping from the first will be the mapping in the result.

so packages' has preference over compilerPackages'.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh... that's somewhat counter intuitive... thanks!

@serras
Copy link
Contributor Author

serras commented Mar 23, 2020

By the way, it would be great if the Nix expressions for LTS 15.x in the stackage.nix repo could be fixed, since right now you cannot use them if you depend on any compiler package.

@angerman angerman merged commit b24da60 into input-output-hk:master Mar 24, 2020
@angerman
Copy link
Collaborator

By the way, it would be great if the Nix expressions for LTS 15.x in the stackage.nix repo could be fixed, since right now you cannot use them if you depend on any compiler package.

Yep. This will need some wrangling, but certainly needs doing!

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

Successfully merging this pull request may close these issues.

2 participants