-
Notifications
You must be signed in to change notification settings - Fork 662
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
Dependency resolution problem when compiling on OSX with GHC 8 #1519
Comments
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
What is the goal of this issue? What are we actually tracking here and is there any concrete work that it is valuable to do? |
Honestly I just wanted to get elm 0.18.0 running with homebrew so I could test out the new debugging features. I'm not one to install software via .pkg files. The issue was opened because the homebrew project likes to report problems upstream in the hope that the package maintainers will incorporate fixes so changes don't need to be applied in homebrew recipes themselves.
As far as value to yourself and the project, staying on top of issues compiling with GHC 8 would make it easier to upgrade when you decide that GHC 8 should be a min requirement for the elm project. |
Elm 0.18 is built with GHC 7.10. It was already released, so that code is done. It has tags at exact commits that will not change. These constraints on GHC are also checked into our build script, so based on the information you have provided, I do not know how folks are building things wrong in the first place. So I don't meant to sound combative here, but I also do not understand why trying to build software with compiler versions that are unsupported is an upstream issue. We may move to later versions of GHC at some point, but I have heard that compile times have gone up considerably in certain cases right now. |
Maybe here's another way to ask the root question. You say:
Can you be more specific than "wouldn't hurt"? I don't know all the things you know, so I feel that there's some implicit information that you are assuming was conveyed already. If that is as specific as this can be, we should close the issue because I understand and keeping this issue open would not help organize or expedite the process. |
I was literally thinking of fixing to a version of I'm going to close this issue. I appreciate you taking the time to look at this and explaining your reasoning. |
No problem, and sorry if I sound cranky! |
@evancz Homebrew maintainer here. Since macOS 10.12 Sierra requires GHC 8, and because Homebrew only supports GHC 8, I'm thinking we will need to boneyard elm at this point until there's actually upstream support for GHC 8. We've been building elm with GHC 8 for 6 months now, with approximately 600 installs per month without a problem, so hopefully you will reconsider your stance. |
I have no stance, only trying to figure out priorities. I need a better reason than "it wouldn't hurt" to change my development environment in a serious way, which you have provided. "Sierra requires GHC 8" does not seem right to me. I'm using GHC 7.10 on macOS 10.12 Sierra. I built the Elm 0.18 binaries with it on this computer as well. But accepting that you need it to be GHC 8 for whatever reason, how would you suggest resolving the fact that Elm 0.18 is already tagged and released? We can make changes in subsequent releases, but I do not know enough about your project to know what you actually need right now. What specifically needs to happen for Elm 0.18 to be available though homebrew? |
I'm referring to https://ghc.haskell.org/trac/ghc/ticket/12479 which has been resolved by https://phabricator.haskell.org/D2611 in combination with haskell/cabal#3979 (except for cabal new-build, which is still broken). The Sierra bottle in Homebrew is currently 8.0.1.20161114 and has both the GHC and cabal sides of that fix.
Any github commit can be converted to a patch file by appending If the patches do not apply cleanly, we can manually commit an equivalent patch that does apply cleanly to our formula-patches repository, and use that. Alternatively, the relevant fixes can be made using string replacements when that's more convenient, but the outcome is no different from a patch except in terms of the mechanism. The final option is what we've been doing for the last six months, which is to write a cabal.config file to the root of the cabal sandbox we build in, with the contents
@ashleyconnor found that for his recent elm 0.18 byuld, aeson-pretty needed to be added to that list as well. The bottom line is that if you have elm building with GHC 8 successfully in your GitHub repos, there are many ways for us to backport that to 0.18. |
Thanks for explaining these things to me! If I understand correctly, is one solution is to change that
This seems like a safer way to go than the manual patching route. How do you evaluate this tradeoff from your perspective? |
You're welcome.
Yep, and that builds. So Solver's choices with that file in place should help to determine which constraints in the current elm cabal files are causing the cabal.config overrides to be necessary. |
I made an edit that I think got lost. Using From there, are there any concrete actions that I must take to get Elm to work with homebrew? If so, what are they exactly? If not, it sounds like we are all set. |
@evancz no the cabal.config approach is unacceptable except as a very short term stopgap measure, since it globally overrides the constraints in an unpredictable manner. This needs to be fixed with GHC 8 compatible settings in the elm cabal files. |
You do not build the project with cabal sandboxes? I use that approach so no build can mess with anything else on my computer, and without it, global projects can conflict whether you use Is it not possible to use cabal sandboxes? Or is it undesirable for some reason? |
We use cabal sandboxes for everything, but a global cabal.config for the sandbox elm builds in amounts to downstream patching, which is not acceptable. |
Here is a If I was building any Haskell project again and again as an install path in a sandbox, I think I'd want to pin the constraints like this to avoid getting broken by a patch release (which can happen in Haskell). So this seems like work you'd already want to do for reliability. So like I said before:
|
Your elm-compiler.cabal, elm-reactor.cabal, etc. need to be compatible with GHC 8 or we've actually made no progress in addressing this upstream. |
But from before:
And it seems we agree that having a So I don't understand what we are discussing here. If there is a problem, let's work on it instead of continuing this thread. Create a new issue that describes the problem clearly, and the stakes of the problem, and that work can be prioritized along with all the other things that people want. |
The fact that a cabal.config file inserted downstream can force it to build does not mean elm builds without downstream interventions, which is the requirement.
This is not something we agree on. This is the extent of the cabal.config usage we have currently, all of which are stop-gap measures pending proper upstream resolution:
In the case of elm, the problem was brought to your attention six months ago, and continuing to work around the incompatibility with downstream hacks is not acceptable.
This is already the second of two issues bringing the GHC 8 incompatibility of your build system to your attention. |
@evancz Also, here's what we get with the cabal.config from your gist:
|
@evancz OK, so putting aside that cabal.config (which causes conflicts versus the GHC 8 preinstalled versions for base, integer-gmp, ghc-prim, transformers, deepseq, array, process, unix, time, template-haskell, filepath, directory, containers, bytestring, and pretty) it looks like the constraints actually causing the Solver issues in your current cabal files are
If I just make those replacements, and don't use the cabal.config file you provided, then it builds. |
@evancz Here is a complete log https://gist.github.com/ilovezfs/99296a4a32419519845be9ba44958f24 and two PRs: |
With these two changes, things build with GHC 8? And you are happy about how everything would be? (Also, that |
Yep, both 8.0.1 and 8.0.1.20161114 (which is very close to what 8.0.2 will be).
Yup, I'm happy if you're satisfied that the newer versions don't actually break anything. It chose optparse-applicative-0.13.0.0 and HTTP-4000.3.3. It would be even better if you could tag an 0.18.1 or 0.18.0.1 but the string replacements in Homebrew/homebrew-core@2a5650a are acceptable if you've merged (or intend to merge) those changes. It would be great if you could enable CI for GHC 8 to prevent future regressions. Also you should personally use our Sierra bottle! And I'd like a pony. |
Yeah, those changes should be okay! I'll be able to solve to something else if needed. I forget why we disabled GHC 8 in CI, but I'm happy to have it turned back on. I'm not the primary expert in that stuff though, so maybe someone can help figure that out. |
Excellent.
That would be great. Here's a rather fancy travis file for multiple GHC versions in case that helps: https://github.com/idris-lang/Idris-dev/blob/master/.travis.yml |
So I know you guys don't officially support GHC 8 but I'm thinking if a minor change can be made to work for both GHC 7.10 and GHC 8 then it wouldn't hurt to do so.
Sierra, El Capitan, Yosemite build logs
The text was updated successfully, but these errors were encountered: