Closed nocko closed 4 years ago
Stack doesn't seem to even try on the same system:
root@mms-wiki:~# apt install haskell-stack
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
make
Suggested packages:
make-doc
The following NEW packages will be installed:
haskell-stack make
0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
Need to get 6921 kB of archives.
After this operation, 51.4 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://mirrors.digitalocean.com/ubuntu bionic/main amd64 make amd64 4.1-9.1ubuntu1 [154 kB]
Get:2 http://mirrors.digitalocean.com/ubuntu bionic/universe amd64 haskell-stack amd64 1.5.1-1 [6767 kB]
Fetched 6921 kB in 0s (40.7 MB/s)
Selecting previously unselected package make.
(Reading database ... 72583 files and directories currently installed.)
Preparing to unpack .../make_4.1-9.1ubuntu1_amd64.deb ...
Unpacking make (4.1-9.1ubuntu1) ...
Selecting previously unselected package haskell-stack.
Preparing to unpack .../haskell-stack_1.5.1-1_amd64.deb ...
Unpacking haskell-stack (1.5.1-1) ...
Setting up make (4.1-9.1ubuntu1) ...
Setting up haskell-stack (1.5.1-1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
root@mms-wiki:~# su - wiki
wiki@mms-wiki:~/devel$ git clone https://github.com/jgm/gitit.git
Cloning into 'gitit'...
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 6881 (delta 0), reused 0 (delta 0), pack-reused 6877
Receiving objects: 100% (6881/6881), 2.03 MiB | 24.16 MiB/s, done.
Resolving deltas: 100% (4237/4237), done.
wiki@mms-wiki:~/devel$ cd gitit/
wiki@mms-wiki:~/devel/gitit$ stack install
Downloaded lts-12.4 build plan.
AesonException "Error in $.packages.cassava.constraints.flags['bytestring--lt-0_10_4']: Invalid flag name: \"bytestring--lt-0_10_4\""
I updated stack and it worked. I guess gitit 0.12.3.2 just cannot be built with ghc 8.0.2?
wiki@mms-wiki:~/devel/gitit$ stack ghc -- --version
The Glorious Glasgow Haskell Compilation System, version 8.4.3
The haskell motto should perhaps be: Always bring everything with you and ensure you have a few spare hours.
This due to API change in the filestore package, which should have been marked by a major version bump but wasn't. If you constrain to Diff < 0.4 it should work.
I'm releasing a filestore update which should help with this.
Thank you for looking into it.
The current dev version of gitit should work with both stack and cabal.
@jgm , when you said this, above:
The current dev version of gitit should work with both stack and cabal.
Did you mean that, if I:
gitit
repo (master
branch),gitit
directory, andexecute the following commands, in order:
cabal configure --ghc
cabal build
cabal install
that it should work?
I tried the above and got:
[10 of 22] Compiling Network.Gitit.Page ( src/Network/Gitit/Page.hs, /Users/dbanas/Documents/Projects/gitit/dist-newstyle/build/x86_64-osx/ghc-8.6.5/gitit-0.12.3.2/build/Network/Gitit/Page.o )
[11 of 22] Compiling Network.Gitit.Authentication.Github ( src/Network/Gitit/Authentication/Github.hs, /Users/dbanas/Documents/Projects/gitit/dist-newstyle/build/x86_64-osx/ghc-8.6.5/gitit-0.12.3.2/build/Network/Gitit/Authentication/Github.o )
src/Network/Gitit/Authentication/Github.hs:106:22: error:
• Couldn't match type ‘BSL.ByteString’ with ‘OAuth2Error OA.Errors’
Expected type: IO (OAuth2Result OA.Errors GithubUser)
Actual type: IO (Either BSL.ByteString GithubUser)
• In the expression: authGetJSON mgr token $ githubUri "/user"
In an equation for ‘userInfo’:
userInfo mgr token = authGetJSON mgr token $ githubUri "/user"
|
106 | userInfo mgr token = authGetJSON mgr token $ githubUri "/user"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/Network/Gitit/Authentication/Github.hs:109:22: error:
• Couldn't match type ‘BSL.ByteString’ with ‘OAuth2Error OA.Errors’
Expected type: IO (OAuth2Result OA.Errors [GithubUserMail])
Actual type: IO (Either BSL.ByteString [GithubUserMail])
• In the expression:
authGetJSON mgr token $ githubUri "/user/emails"
In an equation for ‘mailInfo’:
mailInfo mgr token
= authGetJSON mgr token $ githubUri "/user/emails"
|
109 | mailInfo mgr token = authGetJSON mgr token $ githubUri "/user/emails"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/Network/Gitit/Authentication/Github.hs:114:3: error:
• Couldn't match type ‘BSL.ByteString’ with ‘OAuth2Error OA.Errors’
Expected type: IO (OAuth2Result OA.Errors BSL.ByteString)
Actual type: IO (Either BSL.ByteString BSL.ByteString)
• In a stmt of a 'do' block: authGetBS mgr token url
In the expression:
do let url
= githubUri
$ "/orgs/" `BS.append` encodeUtf8 githubOrg `BS.append` "/members/"
`BS.append` encodeUtf8 gitLogin
authGetBS mgr token url
In an equation for ‘orgInfo’:
orgInfo gitLogin githubOrg mgr token
= do let url = ...
authGetBS mgr token url
|
114 | authGetBS mgr token url
| ^^^^^^^^^^^^^^^^^^^^^^^
cabal: Failed to build gitit-0.12.3.2 (which is required by exe:gitit from
gitit-0.12.3.2).
looking at our CI, cabal builds seem to be failing now but stack still works.
The cabal version use hoauth2 >= 1.9.0 and the stack -lts 14.14 used hoauth2 = 1.8.9, The type of authGetBS (from hoauth2) changes between these two versions. Having a look at it.
@capn-freako, I have been able to cabal install
gitit by modifying in the file gitit.cabal
the lines in the buil-depends
section mentioning pandoc
, hoauth2
and network
:
pandoc >= 2.8 && < 2.9,
...
hoauth2 >= 1.3.0 && < 1.9,
...
network >= 2.6 && < 2.7,
@jgm , if you think this work on the cabal build is worth a PR, I can submit one. ... There will be more work to upgrade the stack build...
@freiric , Thank you!
I am confirming that I was able to complete a cabal build/install, using the suggested modifications to gitit.cabal
.
-db
Oh, I spoke too soon.
I'm getting the following run-time error, when I try to launch my newly built gitit
executable:
$ /Users/dbanas/.cabal/bin/gitit -f wikidata/my.conf
Could not read mime types file: /etc/mime.types
/etc/mime.types: openFile: does not exist (No such file or directory)
Using defaults instead.
Loading plugin 'Network.Gitit.Plugin.Ordinal'...
gitit: Could not find module ‘Network.Gitit.Plugin.Ordinal’
Use -v to see a list of the files searched for.
Could not find module ‘Network.Gitit.Interface’
Use -v to see a list of the files searched for.
The Network.Gitit.Plugin.Ordinal
module does appear to be missing from the build/...
tree, but the Network.Gitit.Interface
module is there.
@freiric - sure, PR welcome. (Or even better an upgrade to use the latest versions rather than setting an upper bound.) stack build works for me already though.
Network.Gitit.Plugin.Ordinal is not part of gitit. This must be a 3rd party plugin you're trying to use. Check your conf.
Apologies; you are correct. It (cabal-ified) is working fine. Thanks! :)
Should be fixed by #646
I just installed GHC 8.8.3 and did "cabal update" followed by "cabal install gitit" and got the following failure:
bash-3.2$ which ghc
/usr/local/ghc-versions/8.8.3/bin/ghc
bash-3.2$ cabal update
Downloading the latest package list from hackage.haskell.org
To revert to previous state run:
cabal v2-update 'hackage.haskell.org,2020-03-08T16:48:38Z'
bash-3.2$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.8.3
bash-3.2$ cabal install gitit
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: gitit-0.12.3.2 (user goal)
[__1] trying: zlib-0.6.2.1 (dependency of gitit)
[__2] trying: parsec-3.1.14.0/installed-3.1... (dependency of gitit)
[__3] next goal: pandoc-types (dependency of gitit)
[__3] rejecting: pandoc-types-1.20 (conflict: gitit => pandoc-types>=1.17.4.2
&& <1.18)
[__3] trying: pandoc-types-1.17.6.1
[__4] next goal: pandoc (dependency of gitit)
[__4] rejecting: pandoc-2.9.2, pandoc-2.9.1.1, pandoc-2.9.1, pandoc-2.9,
pandoc-2.8.1, pandoc-2.8.0.1, pandoc-2.8 (conflict: pandoc-types==1.17.6.1,
pandoc => pandoc-types>=1.20 && <1.21)
[__4] trying: pandoc-2.7.3
[__5] next goal: haddock-library (dependency of pandoc)
[__5] rejecting: haddock-library-1.8.0 (conflict: pandoc =>
haddock-library>=1.7 && <1.8)
[__5] rejecting: haddock-library-1.7.0 (conflict: parsec =>
base==4.13.0.0/installed-4.1..., haddock-library => base>=4.5 && <4.13)
[__5] rejecting: haddock-library-1.6.0, haddock-library-1.5.0.1,
haddock-library-1.4.5, haddock-library-1.4.4, haddock-library-1.4.3,
haddock-library-1.4.2, haddock-library-1.4.1, haddock-library-1.2.1,
haddock-library-1.2.0, haddock-library-1.1.1, haddock-library-1.1.0,
haddock-library-1.0.1, haddock-library-1.0.0, haddock-library-1.6.1 (conflict:
pandoc => haddock-library>=1.7 && <1.8)
[__5] fail (backjumping, conflict set: haddock-library, pandoc, parsec)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: pandoc, haddock-library, pandoc-types,
gitit, base, parsec, binary, zlib
Try running with --minimize-conflict-set to improve the error message.
bash-3.2$ cabal install gitit --minimize-conflict-set
Resolving dependencies...
cabal: Reached backjump limit while trying to minimize the conflict set to
create a better error message. Original error message:
Could not resolve dependencies:
[__0] trying: gitit-0.12.3.2 (user goal)
[__1] trying: zlib-0.6.2.1 (dependency of gitit)
[__2] trying: parsec-3.1.14.0/installed-3.1... (dependency of gitit)
[__3] next goal: pandoc-types (dependency of gitit)
[__3] rejecting: pandoc-types-1.20 (conflict: gitit => pandoc-types>=1.17.4.2
&& <1.18)
[__3] trying: pandoc-types-1.17.6.1
[__4] next goal: pandoc (dependency of gitit)
[__4] rejecting: pandoc-2.9.2, pandoc-2.9.1.1, pandoc-2.9.1, pandoc-2.9,
pandoc-2.8.1, pandoc-2.8.0.1, pandoc-2.8 (conflict: pandoc-types==1.17.6.1,
pandoc => pandoc-types>=1.20 && <1.21)
[__4] trying: pandoc-2.7.3
[__5] next goal: haddock-library (dependency of pandoc)
[__5] rejecting: haddock-library-1.8.0 (conflict: pandoc =>
haddock-library>=1.7 && <1.8)
[__5] rejecting: haddock-library-1.7.0 (conflict: parsec =>
base==4.13.0.0/installed-4.1..., haddock-library => base>=4.5 && <4.13)
[__5] rejecting: haddock-library-1.6.0, haddock-library-1.5.0.1,
haddock-library-1.4.5, haddock-library-1.4.4, haddock-library-1.4.3,
haddock-library-1.4.2, haddock-library-1.4.1, haddock-library-1.2.1,
haddock-library-1.2.0, haddock-library-1.1.1, haddock-library-1.1.0,
haddock-library-1.0.1, haddock-library-1.0.0, haddock-library-1.6.1 (conflict:
pandoc => haddock-library>=1.7 && <1.8)
[__5] fail (backjumping, conflict set: haddock-library, pandoc, parsec)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: pandoc, haddock-library, pandoc-types,
gitit, base, parsec, binary, zlib
Same (or similar) result from "cabal new-install" and with a current clone of the gitit repo.
Am I using the wrong build incantation? Or maybe too fresh a GHC 8.8.x?
Looks like it's failing on our GitHub Actions CI as well for GHC 8.8. This is unexpected, since the PR I merged claimed to be supporting 8.8. I'll comment over on #646
@conal Does running cabal build
in the current clone of the gitit repo (if current, should show as gitit-0.13.0.0
) complain about the library MissingH
in its error message?
The inability to build MissingH
using GHC 8.8.x is an outstanding problem for https://github.com/jgm/gitit/pull/646.
@conal Does running
cabal build
in the current clone of the gitit repo (if current, should show asgitit-0.13.0.0
) complain about the libraryMissingH
in its error message?
Yes it does (with a fresh git pull
).
Has anyone taken any steps to try to get MissingH fixed in Hackage so that it works with GHC 8.8.x? It's not a direct dependency of gitit -- which of our dependencies requires it?
There is also https://github.com/haskell-hvr/missingh/pull/51 which has been open with no response from the dev since November, and https://github.com/haskell-infra/hackage-trustees/issues/253.
Gitit depends on it through gitit -> ConfigFile -> MissingH
.
Might be easier to rewrite Network.Gitit.Config to avoid the dependency than to get this fixed. I don't have time for this but maybe someone else would want to. Looks like https://hackage.haskell.org/package/ini does something similar to ConfigFile with saner dependencies.
MissingH
has updated and released, so rerunning the gitit
CI build now should have it succeed on GHC 8.8.
I'll rerun them.
All the dependencies build successfully, but gitit fails