Bug 236805 - [NEW PORT] lang/elm: Delightful language for reliable webapps
Summary: [NEW PORT] lang/elm: Delightful language for reliable webapps
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-haskell mailing list
Keywords: needs-patch, needs-qa
Depends on:
Reported: 2019-03-26 14:52 UTC by Geoffroy Lorieux
Modified: 2019-06-07 18:59 UTC (History)
6 users (show)

See Also:
koobs: maintainer-feedback? (glorieux)

Port shar file (2.68 KB, patch)
2019-03-26 14:52 UTC, Geoffroy Lorieux
no flags Details | Diff
elm.shar (2.65 KB, text/plain)
2019-05-29 09:35 UTC, Geoffroy Lorieux
no flags Details
elm-lang.shar -- fixed to build under Poudriere with network, but still doesn't build by default (3.08 KB, text/plain)
2019-06-05 10:53 UTC, Kamila Součková
glorieux: maintainer-approval+

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffroy Lorieux 2019-03-26 14:52:06 UTC
Port of the elm programming language. https://elm-lang.org

The patch applied before compiling elm comes from the following discussion: https://github.com/elm/compiler/issues/1892
Comment 1 Geoffroy Lorieux 2019-03-26 14:52:46 UTC
Created attachment 203163 [details]
Port shar file
Comment 2 w.schwarzenfeld freebsd_triage 2019-03-26 14:58:44 UTC
bin/elm would conflict with mail/elm.
Comment 3 w.schwarzenfeld freebsd_triage 2019-03-26 15:00:15 UTC
And for one file you need no pkg-plist. You can put it under PLIST_FILES in the Makefile.
Comment 4 Steve Wills freebsd_committer 2019-05-26 23:55:49 UTC
This fails to build for me, I think because it tries to fetch during the build.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2019-05-28 03:43:07 UTC
COMMENT needs the leading indefinite article ("A ") removed, and port needs confirmation of QA passing (portlint, poudriere)
Comment 6 Geoffroy Lorieux 2019-05-29 09:35:08 UTC
Created attachment 204689 [details]
Comment 7 Geoffroy Lorieux 2019-05-29 09:36:50 UTC
Comment on attachment 204689 [details]

Removes the plist file and fixes COMMENT.
Comment 8 Kamila Součková 2019-06-05 10:53:33 UTC
Created attachment 204835 [details]
elm-lang.shar -- fixed to build under Poudriere with network, but still doesn't build by default

I made small changes to the port, so that it at least builds under Poudriere with ALLOW_NETWORKING_PACKAGES="elm-lang" (previously it did not, as cabal was trying to write to a non-existent directory). This way it can at least be built, and afterwards the packaged binary works as expected.

Me and Evilham (subscribed) spent quite a bit of effort trying to make this build without network, but we were not successful. The reason is that the Haskell bits are throwing logs under our feet: cabal does not actually really resolve dependencies until it tries to build things. Therefore, moving fetching of dependencies into the fetch part without also moving the build itself there doesn't work.

The workaround used in other Haskell packages is to manually figure out the right dependencies and use the substantial machinery in Mk/Uses/cabal.mk. This is, unfortunately, also not quite usable, because cabal.mk assumes that the package in question is on Hackage, which Elm is not (well it is, but it is very much out of date). Evilham might be able to provide more details on this. I believe that the best way to make a "proper" port out of this would be to update the Elm package on Hackage, and do it the cabal.mk way.

Would the elm people be willing to add up-to-date Elm to Hackage? If yes, we could ask the FreeBSD Haskell folks for help and hopefully make this work and  get it committed.