ixmatus / orgmode-parse

Attoparsec parser combinators for parsing org-mode structured text!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build on nixpkgs/hackage is broken

volhovm opened this issue · comments

When I'm trying to build the library from nixpkgs (for example, 88cd06d0f22cf7008e9480d804593978d5e0a45f), I'm getting this error:

Preprocessing library for orgmode-parse-0.3.0..
Building library for orgmode-parse-0.3.0..
[ 1 of 11] Compiling Data.OrgMode.Parse.Attoparsec.Util ( src/Data/OrgMode/Parse/Attoparsec/Util.hs, dist/build/Data/OrgMode/Parse/Attoparsec/Util.o )

src/Data/OrgMode/Parse/Attoparsec/Util.hs:26:1: error:
    Could not find module ‘Data.OrgMode.Parse.Attoparsec.Util.ParseLinesTill’
    Use -v to see a list of the files searched for.
   |
26 | import           Data.OrgMode.Parse.Attoparsec.Util.ParseLinesTill

At the same time when I build the project locally (after bumping LTS, otherwise stack gives me error: attribute 'ghc843' missing) it builds just alright. It also happens when I use orgmode-parse as a hackage dependency in my stack project, but If I target the last master commit on the github directly (ce152776307e3a019c2047e459a74eeab05566df), it also works. Maybe something is wrong with the particular revision uploaded to hackage?

Uh oh, thanks for the bug report. Unfortunately 0.3.0 was released with a major bug in it #49; I will have some time this weekend to spend on fixing this issue and that issue.

For the time being, I recommend 0.2.2 (I'm going to mark 0.3.0 appropriately in Hackage too, I should've done that months ago).

I set the preferred version on Hackage to (<) 0.3.0 (for now).

@volhovm I wish I could solve the error: attribute 'ghc843' missing problem. I have a project that I don't maintain breaking because of it.

@matthew-piziak as far as I understand, ghc843 is just (somehow) not included in the list of ghc versions here: https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/haskell-packages.nix#L56

So since stack picks the ghc version accordingly to the LTS chosen, the solution is just to change LTS version (to a newer one).

@matthew-piziak what nixpkgs channel are you using?

Wait, that's a dumb question because I set this project up with a pinned nixpkgs. @matthew-piziak can you provide more context?

Oh I'm just griping about having the same issue on a different project. I ended up downgrading the pinned LTS in that project and compiling it that way, but it's unsatisfying that stack defaults to the stable nixos channel, and the stable nixos channel does not provide recent GHCs.

It's terrible that Stack does all this implicitly. The advantage of Nix is that it's supposed to be explicit configuration.

No problem with orgmode-parse. I'm just complaining about this error in general.

I've run into this issue as well, it seems that the hackage version is still broken, see the Hackage build errors here: https://matrix.hackage.haskell.org/#/package/orgmode-parse/0.3.0/ghc-8.8.1@1578471833

The problem is not present for me any more and I can successfully build orgmode-parse now. Should we close this issue? Is it still happening for someone else?

Yes, the problem should not be present since I set the preferred version on Hackage to the release before 0.3.0 which still has a major regression in it that I've not found the motivation to fix.

I still recommend 0.2.x for the time being. I will close this issue for now since 0.3.0 is known to be broken and on Hackage I've set the preferred version. Preferably, we would fix #49 but I'm too busy right now to focus on it and since I don't use this library presently for anything I've lost my motivation to devote my free time to it.