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

Globals (GHC boot packages) pruning #4547

Merged
merged 10 commits into from
Feb 5, 2019
Merged

Globals (GHC boot packages) pruning #4547

merged 10 commits into from
Feb 5, 2019

Conversation

qrilka
Copy link
Contributor

@qrilka qrilka commented Jan 28, 2019

Please include the following checklist in your PR:

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

Tested manually, plan to run integration tests.
Failure to build global packages as targets results in 2 errors (using stack.yaml from #4510 with time overriden):

$ stack build directory --dry-run

Error: While constructing the build plan, the following exceptions were encountered:

Can't use GHC boot package directory when it has an overriden dependency, you need to add the following as explicit dependencies to the
project: 
 unix

Some different approaches to resolving this:

  * Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be
    convenient when dealing with many complicated constraint errors, but results may be unpredictable.


Plan construction failed.

or

$ stack build process --dry-run

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for process-1.6.5.0:
    directory must match >=1.1 && <1.4, but the stack configuration has no specified version  (latest matching version is 1.3.3.2)
    unix must match >=2.5 && <2.9, but the stack configuration has no specified version  (latest matching version is 2.7.2.2)
needed since process is a build target.

Some different approaches to resolving this:

  * Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be
    convenient when dealing with many complicated constraint errors, but results may be unpredictable.

  * Recommended action: try adding the following to your extra-deps in /home/qrilka/ws/h/stack4510/stack.yaml:

directory-1.3.3.2@sha256:79e15a62f90cb9f20f46b2b56fe67d00d71ed54cfad07ea337695f9ebb74baa4,2829
unix-2.7.2.2@sha256:4ef1d010d70a4a07a717e853d4a440c105dad38c6199316e320fdd4c48dacd34,3495

Plan construction failed.

Fixes #4510

Also I plan to update curator to take these details into account (probably as a separate PR)

@qrilka qrilka requested a review from snoyberg January 28, 2019 15:04
src/Stack/SourceMap.hs Show resolved Hide resolved
@qrilka
Copy link
Contributor Author

qrilka commented Jan 29, 2019

I have fixed integration test 345-override-bytestring and added this pruning to curator. It looks like build-constraints.yaml doesn't include parsec (while mtl is overriden) - PR on https://github.com/commercialhaskell/stackage will follow

@qrilka
Copy link
Contributor Author

qrilka commented Feb 4, 2019

This package pruning implementation partially relies on information in global-hints.yaml but as e.g. Michael demonstrated in his blog post packages shipped with GHC could have no (or bad) corresponding version on Hackage so I'm changing it to to use correct package information from ghc-pkg

@qrilka
Copy link
Contributor Author

qrilka commented Feb 4, 2019

I have changed the code quite a lot, also it looks like the refactoring I promised almost a month ago #4480 (comment) could be quite helpful in improving code around SkipCompilerDownload.
@snoyberg could I ask you for another look?

Copy link
Contributor

@snoyberg snoyberg left a comment

Choose a reason for hiding this comment

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

Just some minor comments.

subs/pantry/src/Pantry.hs Outdated Show resolved Hide resolved
src/Stack/Types/SourceMap.hs Outdated Show resolved Hide resolved
@qrilka qrilka merged commit 6ec4ac4 into master Feb 5, 2019
@qrilka qrilka deleted the globals-pruning branch February 5, 2019 09:16
qrilka added a commit to qrilka/stackage that referenced this pull request Feb 7, 2019
qrilka added a commit to qrilka/stackage that referenced this pull request Apr 11, 2019
DanBurton added a commit to commercialhaskell/stackage that referenced this pull request Apr 14, 2019
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.

None yet

2 participants