Unclear instructions in README how to build with stack #362

Open
opened 2022-01-05 16:17:01 +01:00 by vaclavsvejcar · 2 comments
vaclavsvejcar commented 2022-01-05 16:17:01 +01:00 (Migrated from github.com)

I'm trying to build brittany from master using stack, so I checked readme and it says to use:

stack install brittany # --resolver lts-16.31

which doesn't seem correct because obviously current version requires GHC 9.x. I also tried with latest nightly (nightly-2022-01-04) but it doesn't seem to fit as well:

Selected resolver: nightly-2022-01-04
Resolver 'nightly-2022-01-04' does not have all the packages to match your requirements.
    aeson version 1.5.6.0 found
        - brittany requires >=2.0.1 && <2.1
    butcher not found
        - brittany requires >=1.3.3 && <1.4
    data-tree-print not found
        - brittany requires >=0.1.0 && <0.2
    multistate not found
        - brittany requires >=0.8.0 && <0.9
    text version 1.2.4.1 found
        - brittany requires >=1.2.5 && <1.3
    Using package flags:
        - brittany: FlagName "pedantic" = False

Is actually brittany still intended to be built using any existing stack resolver? I know this is probably low priority stuff, but maybe it would be nice to have working stack.yaml to make it easier building brittany using stack, if possible?

I'm trying to build _brittany_ from `master` using _stack_, so I checked readme and it says to use: > stack install brittany # --resolver lts-16.31 which doesn't seem correct because obviously current version requires _GHC 9.x_. I also tried with latest nightly (`nightly-2022-01-04`) but it doesn't seem to fit as well: ``` Selected resolver: nightly-2022-01-04 Resolver 'nightly-2022-01-04' does not have all the packages to match your requirements. aeson version 1.5.6.0 found - brittany requires >=2.0.1 && <2.1 butcher not found - brittany requires >=1.3.3 && <1.4 data-tree-print not found - brittany requires >=0.1.0 && <0.2 multistate not found - brittany requires >=0.8.0 && <0.9 text version 1.2.4.1 found - brittany requires >=1.2.5 && <1.3 Using package flags: - brittany: FlagName "pedantic" = False ``` Is actually _brittany_ still intended to be built using any existing _stack resolver_? I know this is probably low priority stuff, but maybe it would be nice to have working _stack.yaml_ to make it easier building _brittany_ using _stack_, if possible?
tfausak commented 2022-01-05 20:31:32 +01:00 (Migrated from github.com)

I changed the resolver at the suggestion of #361. Brittany isn't really intended to be installed with Stack. Some of its dependencies aren't on Stackage (butcher, data-tree-print, and multistate). Others are too old (aeson). Others are too new (text).

In theory this is solvable, but I don't have the bandwidth to support the build matrix necessary to build with all these dependencies.

Brittany could supply a stack.yaml to allow building it with Stack. That would only work for checking out the whole repo and building it with stack build. It wouldn't help at all with stack install brittany.

I changed the resolver at the suggestion of #361. Brittany isn't really intended to be installed with Stack. Some of its dependencies aren't on Stackage (butcher, data-tree-print, and multistate). Others are too old (aeson). Others are too new (text). In theory this is solvable, but I don't have the bandwidth to support the build matrix necessary to build with all these dependencies. Brittany could supply a `stack.yaml` to allow building it with Stack. That would only work for checking out the whole repo and building it with `stack build`. It wouldn't help at all with `stack install brittany`.
vaclavsvejcar commented 2022-01-17 12:49:52 +01:00 (Migrated from github.com)

Just fyi, I was able to build brittany from master (0aa04af) using following stack.yaml:

resolver: nightly-2022-01-15

extra-package-dbs: []

flags: {}

packages:
  - "."

extra-deps:
  - butcher-1.3.3.2
  - data-tree-print-0.1.0.2
  - multistate-0.8.0.3
  - aeson-2.0.3.0
  - yaml-0.11.7.0
  
allow-newer: true

Given that brittany is command line tool and not library, maybe the range of supported GHC versions might not be such large and if only one major version will be supported (let's say only 9.0.x), maybe it might not be that difficult to put together some working stack.yaml to make it easier for folks willing to build brittany using Stack? If you'd be interested, I can try to help with this.

Just fyi, I was able to build `brittany` from `master` (`0aa04af`) using following `stack.yaml`: ```yaml resolver: nightly-2022-01-15 extra-package-dbs: [] flags: {} packages: - "." extra-deps: - butcher-1.3.3.2 - data-tree-print-0.1.0.2 - multistate-0.8.0.3 - aeson-2.0.3.0 - yaml-0.11.7.0 allow-newer: true ``` Given that _brittany_ is command line tool and not library, maybe the range of supported _GHC_ versions might not be such large and if only one major version will be supported (let's say only `9.0.x`), maybe it might not be that difficult to put together some working `stack.yaml` to make it easier for folks willing to build _brittany_ using _Stack_? If you'd be interested, I can try to help with this.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hexagoxel/brittany#362
There is no content yet.