agraef / pure-lang

Pure programming language
https://agraef.github.io/pure-lang/
316 stars 20 forks source link

cabal: unrecognised command: v1-update, Maybe you meant `v2-update`? #37

Closed ryandesign closed 2 years ago

ryandesign commented 2 years ago

I'm trying to update pure-gen in MacPorts from 0.21 to 0.25. Since the last time I touched the pure-gen port, the ghc situation in MacPorts has completely changed so I'm trying to adapt the Portfile as needed. The ghc version in MacPorts is 9.2.1 and the cabal version is 3.6.2.0. The error I get when building pure-gen is:

cabal: unrecognised command: v1-update (try --help)
Maybe you meant `v2-update`?

I don't know anything about cabal so I don't know if I can simply replace v1-update with v2-update. Presumably they are not completely compatible with one another else they would not have renamed the command.

agraef commented 2 years ago

My understanding is that at some point the cabal package format was changed, both v1- and v2-update were available during a transition period, but with the latest cabal releases v1-update is gone. pure-gen still requires language-c 0.5 to work, which uses the old package format, so v2-update won't work. If I find the time, I can try to backport the packaging changes from a newer language-c version, but in the meantime you will have to see whether you can get hold of a cabal version which still supports v1.

Most Linux distributions, including Arch, still ship cabal 3.4 or earlier, it's version 3.4.1 here on Arch which still supports v1. (The only reason that I can think of that even Arch ships a version < 3.6 is compatibility with Haskell packages still using v1.)

ryandesign commented 2 years ago

There's only the one version of cabal in MacPorts. And the standalone versions of language-c and all the other haskell modules were deleted two years ago in favor of using stack but I don't know how to do that.

agraef commented 2 years ago

Well, then the only option which remains is to port the package over to v2, I'm afraid. I'll look into this, but it may take some time.

Yeah, the Haskell build system seems pretty arcane. It's good, but vastly different from other, more mainstream languages.

essandess commented 2 years ago

Please see the fix in https://github.com/macports/macports-ports/pull/16171.

essandess commented 2 years ago

FWIW I believe the the fix is simply to replace the action v1-update with update.