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

Can't be used to bootstrap GHC #13

Closed
ndmitchell opened this issue Feb 5, 2019 · 8 comments
Closed

Can't be used to bootstrap GHC #13

ndmitchell opened this issue Feb 5, 2019 · 8 comments

Comments

@ndmitchell
Copy link

In the most recent version of Shake, I added heaps as a dependency. Unfortunately, while heaps has no problematic actual dependencies, the Setup.hs file depends on Cabal and cabal-doctest. The latest cabal-doctest is no longer compatible with Cabal HEAD as used to build GHC. There are a few ways around this issue:

  1. Stop using cabal-doctest as a setup dependency.
  2. Have me inline the parts of Heap I need into Shake itself. I'm going to do that as a temporary step anyway.
  3. Upgrade cabal-doctest to work with HEAD Cabal, but that's will need to be done going forward too.

CC @snowleopard

@RyanGlScott
Copy link
Collaborator

There's a fourth option here as well:

  1. Use head.hackage to build dependencies with GHC HEAD.

Indeed, I added a head.hackage patch for cabal-doctest here for precisely this reason.

cc @phadej

@ndmitchell
Copy link
Author

I don't use head.hackage, so it doesn't fit my workflow, so while it might be enough for some people I'd still need another solution.

@RyanGlScott
Copy link
Collaborator

While I'm sympathetic to the desire to have shake build with GHC HEAD at all times, keeping cabal-doctest in sync with HEAD can prove to be a nightmare due to how quickly the Cabal API changes in its development process. We'd have to constantly be churning out new Hackage releases of cabal-doctest to stay in line with the moving target of HEAD. More than likely, most of those releases would bitrot by the time the next major release of GHC came out, which would require time and effort to go back and make metadata revisions to repair the old, broken versions of cabal-doctest that no longer compile with the new major release.

This is why I strongly encourage people to use head.hackage, since it allows people who use GHC HEAD to stay on top of the latest development changes without spamming Hackage with a bunch of releases to stay in sync with HEAD. It also means that developers don't have to worry about incurring dependencies as much as they used to, since head.hackage can ensure that they're always building without issues.

@phadej
Copy link
Contributor

phadej commented Feb 5, 2019 via email

@RyanGlScott
Copy link
Collaborator

Option (5) also sounds reasonable. Is there a way to remove the custom Setup.hs stanza while still retaining the ability to run doctests locally (within the heaps repo itself)?

@RyanGlScott
Copy link
Collaborator

@ndmitchell, #14 features a version of heaps without the cabal-doctest dependency. Would this work for your needs?

@ndmitchell
Copy link
Author

  1. would be the best option, and Change to build-type: Simple #14 gets there. I think @phadej is right that Shake should avoid build-type Custom.

RyanGlScott added a commit that referenced this issue Feb 5, 2019
@RyanGlScott
Copy link
Collaborator

I've released heaps-0.3.6.1 to Hackage without a cabal-doctest dependency. Let me know if anything else is required on heaps' end.

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

No branches or pull requests

3 participants