-
Notifications
You must be signed in to change notification settings - Fork 12
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]: Add Hackage frontend support #39
base: master
Are you sure you want to change the base?
Conversation
@mojca can you please test this out a bit and see if it works ? |
I would also suggest to also ask @essandess to test (if he's interested and if someone can quickly explain what needs to be done). He contributed macports/macports-ports#4794 (and a few others), and testing hackage is definitely related to having a working Haskell available. The ultimate test would be to get pandoc port working this way :) |
@Korusuke @mojca I’d be happy to test, but there are caveats:
|
That’s too strong. These are great for But for building Haskell packages, using the standard development tools is the way to go. |
Codecov Report
@@ Coverage Diff @@
## master #39 +/- ##
======================================
Coverage ? 88%
======================================
Files ? 1
Lines ? 200
Branches ? 10
======================================
Hits ? 176
Misses ? 24
Partials ? 0
Continue to review full report at Codecov.
|
So the issue is this: for several languages (python, ocaml, haskell, etc.) there are language-specific package systems available, but they are all-encompassing/totalizing systems that don't fit well inside the MacPorts world. Meanwhile, we have individual applications some users want to run that have nothing to do with ocaml or haskell or what have you per se; they have no idea what the program is written in, but they want a macports-style build of the package. So it makes some sense for MacPorts to maintain packages for a limited number of such language-specific packages in order to build such apps. I've been wanting to do such a thing myself for OCaml even though opam is the better way to build ocaml apps. In fact, I'd like a opam front end developed for upt-macports for just this reason. |
@pmetzger can you please open a separate issue for this and provide a little more background information? I have personally no experience with ocaml/opam, so one would need to check whether all the metadata is easily available to use with Again, right now @Korusuke is working on some other things but we can certainly take a look at this at a slightly later point in time. |
@reneeotten It might be easier if you were to get in touch with me by email; address is on my github home page. I believe that opam files contain essentially everything one would need in order to generate Portfiles automatically, and I'd be happy to work along with you guys making this happen. There's even an ocaml package for parsing opam files that could be twisted into extracting data without needing to rewrite the parser. |
I have also opened an issue... #46 |
back to the
|
Sorry, forgot to add it to the commit.
Apparently few packages doesn't declare homepage...in that case now it sets homepage to the hackage url itself.....this is already done by haskell 1.0 portgroup too, so maybe we don't need to set the homepage.
Fixed!
I checked a few existing haskell packages and they don't declare any of this so maybe it's not needed but I will check about this more.... @mojca can help here maybe.
Fixed! |
I think we should set the homepage to whatever upstream gives and otherwise set it to the hackage url itself. I see indeed that this is the default in the PortGroup; so if you can leave the homepage out of the template if it's not specified upstream.
Good, now there are however two newlines between |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two more comments left on the template - after you changed that, please squash the commits.
I think that the required changes were merged into upt-hackage
(https://framagit.org/upt/upt-hackage/) as well, correct? There is still a PR there to add tests though, that should probably still be finalized.
@Korusuke after you made the changes, please do verify that there are no errors reported anymore by port lint
and check for a subset of haskell ports that they actually install correctly. Once that is done, we should be good to merge this PR and then it could be more easily tested by others as well.
also as I said earlier, please remove the |
@@ -21,7 +21,7 @@ PortSystem 1.0 | |||
|
|||
# categories-append | |||
platforms darwin | |||
{% if pkg.upt_pkg.frontend != 'rubygems' -%} | |||
{% if pkg.upt_pkg.frontend != 'rubygems' and pkg.upt_pkg.frontend != 'hackage' -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this become: {% if pkg.upt_pkg.frontend not in ('rubygems', 'hackage') -%}
@Korusuke okay, so you made the changes I suggested but didn't comment on how much testing you've actually done on installing the haskell ports. There are currently 145 |
Yeah few days back, I had tested packaging ghc itself....I did not hope it work but atleast was expecting some error but after a whole night(10+ hours) of compiling/installing and a zillion warning and debug log, I had no more patience left so I quit it and never tried it again till now. This time as suggested by @reneeotten, I took normal hs-* ports which are already there and tried to package those and in the way found a few issues with upt-hackage and upt. Following are the issues faced...I will be creating a issue if not already there for each oneof the following:
After "kinda" solving or bypassing all the above issues finally a port hs-mmap is installing but I am not sure if it will install properly cause of old ghc version but yeah as of now from past 2 hours ghc is compiling/installing, so I am gonna sleep now and continue tomorrow morning. |
@Korusuke There’s a working, bootstrapped ghc v. 8.6.5 compiler in macports/macports-ports#4794 This uses straight-up make etc. command from the upstream district without any complicating MacPorts We’ve all been waiting on the merge for a while now. Not sure what’s causing the delay. |
Thanks!!! @essandess , after many many hours finally it installed.
Quickly trying to install hs-mmap seems to work after removing all it's dependency as they are the ones that #4794 ghc already installs so as mentioned in #53 we should not have them in packages again. Trying a batch install as originally suggested by @reneeotten would be hard right now because of the manual dependency editing issue. So I would say first we will have to solve #52 #53 and then we can get back to testing this. |
Fixes macports#52
This can be tested now