-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[WIP] Fix broken Haskell world #5050
Conversation
grep -lR 'PortGroup.*haskell' . | xargs -n 1 sh -c "awk '/revision/{sub(/[[:digit:]]+/,\$NF+1)}1' \$0 > \$0.new; mv \$0.new \$0"
The version has been removed from the homepage, so use GitHub instead.
TODO: Figure out how to handle lost epoch (subports don't allow epoch?)
Notifying maintainers: |
I think @essandess wanted to switch to builds based on stack, see #4633 and #4698. That would likely make most of our ports for haskell libraries obsolete (which I think is a good thing). We might then eventually drop haskell-platform completely. |
@amake Perhaps these modules will all compile with the latest ghc 8.6.5, but the great majority (perhaps all) are years out of date. For example, the MacPorts As @neverpanic points out, just use Haskell development tools cabal (#4715) or stack (#4633), which will take care of downloading whatever It’s completely unnecessary and counterproductive to use MacPorts as a package manager for a package manager. I can envision scenarios where some of these ports would be convenient to download for specific projects, but in general just let cabal and stack take care of it. |
Travis Build #7780 Errored. Lint results
Port darcs's dependencies fail on xcode9.4. Log The build timed out. |
I agree completely. However the fact is that your update to ghc broke a whole bunch of stuff, and
At the very least there could have been an effort to keep existing ports working: make the old ghc portfile available as e.g. "ghc7" and set the haskell portgroup to use that. I may give up on this PR and look into that (a ghc7 port) instead. |
Comments:
|
@pmetzger @neverpanic @mf2k @mojca @cjones051073 Would one of you please drive a decision getting It was predicable and predicted that Haskell-dependent ports would break without these modern Haskell development tools after |
I'm talking about restoring the version of the portfile previous to your update. It was working. And I'm not talking about maintaining it: I would mark it obsolete and it would only exist to fix the current breakage while application ports (as opposed to
It's not a matter of what's better; it's a matter of keeping the existing MacPorts Haskell world working while we transition to the new way of doing things.
You might think so, but because the compiled files are stored in a versioned directory (
This is not acceptable when things that were working just days ago now don't. Even if "use this unmerged portfile" was reasonable (it's not), end users have no way of even knowing about these things without crawling through PRs on GitHub. If it seems like I'm annoyed by all this, then yes, I am: comments in the ghc port made it clear that updating ghc had huge implications for the entire MacPorts Haskell world, yet they were entirely ignored and now there's a ton of breakage. But I should also say that something absolutely needed to be done about the status quo by someone knowledgeable, so thank you @essandess for bringing your expertise to bear and for all your hard work in this area. |
I honestly don't believe that's possible given both the fragility of Haskell world tools and the half-decade+ age of the existing MacPorts versions. The entire MacPorts Haskell world is a house of cards—that's why no one touched it for so long. I get the frustration, but really a six-year-old version of a package under active development can't considered to be "working" anymore. The most efficient path forward is to use modern Haskell development tools to fix what needs fixing, and if those aren't available or working yet, please open a ticket at https://trac.macports.org. |
With those ports merged now and #5264 around the corner, should we now continue to remove the rest of the ports? I'm not sure going through the obsoleting process makes sense for those, since we don't have a replacement, so I'd in fact just outright delete them. Should we also look at DoCon, HaXml, distract and hedgewars? Those don't seem that important to me, thuogh… |
In the hedgewars port, haskell is used to build only the server component. So I think just that part can be disabled until such time as I see if it works with the new stack-based layout. |
Here's a MacPorts puzzle for you. I'd like to simplify the The No problem, I thought, I'll simply delete it in the refactored Portfile like this:
But
Shouldn't that simply work without modding the portgroup? Any idea why I can't edit out a build dependency? |
By the time you delete the stack dependency, it isn't in the list yet. This is due to the PortGroup's use of
In this case (and others where we have done the same thing), just add an if in the PortGroup so that it doesn't add the dependency if |
Generally speaking, its always better to use
|
@amake can you please address the conflicts? |
Oh I see now. I was scratching my head about your suggestion above to use I have a refactor ready to go, but I don't know how to do a local test with a modified portgroup, so I'll just kick it into an azure build and see what happens. |
That is easy. Just configure macports to use your ports checkout as its primary source. Then whatever you change in that checkout is what is used. |
🤷🏼♂️🤷🏼♂️🤷🏼♂️🧐 Easier:
|
Thats far from ideal as running port sync will just over write whatever you do there. Also using sudo just to edit is unpleasant. Just follow |
I just need a 3 second debug before throwing this over the wall to azure. How do I write the portgroup to detect that I'm calling it from the port
Badness on a local Portfile of
|
You need to define the fact you are using a global variable. Add
In the callback before using it. |
Thanks, using Otherwise, |
This code:
|
I don’t know enough tcl to comment. All i can say is if you check other PGs doing similar things, they use the global declarations for used variables. So if that works i would do the same. If you want more clarification, best asking on the devel list for someone with more tcl experience to comment. |
Separate MacPorts question for the I need to make sure that How do I tell MacPorts grab this distfile from this location, and this other distfile from this other location? Not-working Portfile code:
|
As usual @cjones051073 is right. See PR #5275. |
I've been copy-and-pasting descriptions and the like from the existing See what was necessary to pull in pieces of the missing Haskell Platform ( Ultimately, all the things in Haskell Platform should probably be organized as supports in a |
The descriptions are verbatim copies from hackage.haskell.org. Also, deleting these ports doesn't mean they will be gone from the git history. |
Sounds good. |
I'm going to discard the PR in its current state and instead remove all I investigated DoCon, and even the newest version (2.12 from 2014) is simply too old to be built with stack, cabal, or current ghc. So I think we may just have to abandon that one. Now to look at the others... |
I've updated HaXml.
Then there are some more ports I noticed are likely affected:
My appetite for this is waning rapidly. |
I can look into fixing hedgewars if it's fixable; I have the fpc version of hedgewars here in a repo. Please leave it with me. |
I'm looking to kill off ancient PRs that aren't going anywhere -- is this one? |
Yeah I'm not working on it anymore. I'll close it. |
Note that there remains of ton of dead or obsolete Haskell ports: https://github.com/macports/macports-ports/search?p=1&q=haskell&unscoped_q=haskell |
We should probably just delete those, unless somebody objects? |
Any progress on cleaning up obsolete ports? See comments on https://trac.macports.org/ticket/61263 |
Description
#4699 / #4794 bumped the ghc port, but in doing so appears to have broken the entire Haskell world. These important comments in the ghc portfile were deleted without explanation or action:
Now, for instance, all existing Haskell library port binaries will install but fail to be found because they install to
${prefix}/lib/ghc-7.8.3
instead of-8.6.5
.This PR attempts to address all of this, but it's a lot of work so I will do it incrementally.
Type(s)
Tested on
macOS 10.14.6 18G87
Xcode 10.3 10G8
Verification
Have you
port lint
?sudo port test
?sudo port -vst install
?