The Hackage release 1.1.4 sets almost no version bounds on dependencies and therefore claims to be compatible with optparse-applicative == 0.17.1.0. However, this is not the case.
To reproduce, download the release tarball, constrain the dependency to optparse-applicative == 0.17.1.0 in the bech32.cabal file and run cabal build bech32:exe:bech32. This will give the error shown below.
Configuring executable 'bech32' for bech32-1.1.4..
Preprocessing executable 'bech32' for bech32-1.1.4..
Building executable 'bech32' for bech32-1.1.4..
[1 of 2] Compiling Paths_bech32 ( /Users/…/Documents/MeineDokumente/Programmierung/Haskell/Work/ops/bech32-1.1.4/dist-newstyle/build/x86_64-osx/ghc-9.2.8/bech32-1.1.4/x/bech32/build/bech32/autogen/Paths_bech32.hs, /Users/…/Documents/MeineDokumente/Programmierung/Haskell/Work/ops/bech32-1.1.4/dist-newstyle/build/x86_64-osx/ghc-9.2.8/bech32-1.1.4/x/bech32/build/bech32/bech32-tmp/Paths_bech32.o )
[2 of 2] Compiling Main ( app/Main.hs, /Users/…/Documents/MeineDokumente/Programmierung/Haskell/Work/ops/bech32-1.1.4/dist-newstyle/build/x86_64-osx/ghc-9.2.8/bech32-1.1.4/x/bech32/build/bech32/bech32-tmp/Main.o )
app/Main.hs:93:30: error:
• Couldn't match type ‘Prettyprinter.Internal.Doc
Prettyprinter.Render.Terminal.Internal.AnsiStyle’
with ‘ansi-wl-pprint-0.6.9:Text.PrettyPrint.ANSI.Leijen.Internal.Doc’
Expected: Options.Applicative.Help.Pretty.Doc
Actual: Prettyprinter.Internal.Doc
Prettyprinter.Render.Terminal.Internal.AnsiStyle
NB: ‘ansi-wl-pprint-0.6.9:Text.PrettyPrint.ANSI.Leijen.Internal.Doc’
is defined in ‘Text.PrettyPrint.ANSI.Leijen.Internal’
in package ‘ansi-wl-pprint-0.6.9’
‘Prettyprinter.Internal.Doc’
is defined in ‘Prettyprinter.Internal’
in package ‘prettyprinter-1.7.1’
• In the second argument of ‘($)’, namely
‘vsep
[hsep
[pretty "Supported encoding formats:",
indent 0 $ pretty "Base16, Bech32 & Base58."],
pretty "", pretty "Examples:",
indent 2
$ hsep [annotate underlined $ pretty "To", pretty "Bech32:"],
....]’
In the second argument of ‘($)’, namely
‘Just
$ vsep
[hsep
[pretty "Supported encoding formats:",
indent 0 $ pretty "Base16, Bech32 & Base58."],
pretty "", pretty "Examples:",
indent 2
$ hsep [annotate underlined $ pretty "To", pretty "Bech32:"],
....]’
In the expression:
footerDoc
$ Just
$ vsep
[hsep
[pretty "Supported encoding formats:",
indent 0 $ pretty "Base16, Bech32 & Base58."],
pretty "", pretty "Examples:",
indent 2
$ hsep [annotate underlined $ pretty "To", pretty "Bech32:"],
....]
|
93 | , footerDoc $ Just $ vsep
| ^^^^...
app/Main.hs:145:24: error:
• Couldn't match type ‘Prettyprinter.Internal.Doc ann0’
with ‘ansi-wl-pprint-0.6.9:Text.PrettyPrint.ANSI.Leijen.Internal.Doc’
Expected: Options.Applicative.Help.Pretty.Doc
Actual: Prettyprinter.Internal.Doc ann0
NB: ‘ansi-wl-pprint-0.6.9:Text.PrettyPrint.ANSI.Leijen.Internal.Doc’
is defined in ‘Text.PrettyPrint.ANSI.Leijen.Internal’
in package ‘ansi-wl-pprint-0.6.9’
‘Prettyprinter.Internal.Doc’
is defined in ‘Prettyprinter.Internal’
in package ‘prettyprinter-1.7.1’
• In the second argument of ‘($)’, namely
‘vsep
[pretty "An optional human-readable prefix (e.g. 'addr').",
indent 2
$ pretty
"- When provided, the input text is decoded from various encoding \
\formats and re-encoded to bech32 using the given prefix.",
indent 2
$ pretty
"- When omitted, the input text is decoded from bech32 to base16."]’
In the second argument of ‘($)’, namely
‘Just
$ vsep
[pretty "An optional human-readable prefix (e.g. 'addr').",
indent 2
$ pretty
"- When provided, the input text is decoded from various encoding \
\formats and re-encoded to bech32 using the given prefix.",
indent 2
$ pretty
"- When omitted, the input text is decoded from bech32 to base16."]’
In the expression:
helpDoc
$ Just
$ vsep
[pretty "An optional human-readable prefix (e.g. 'addr').",
indent 2
$ pretty
"- When provided, the input text is decoded from various encoding \
\formats and re-encoded to bech32 using the given prefix.",
indent 2
$ pretty
"- When omitted, the input text is decoded from bech32 to base16."]
|
145 | , helpDoc $ Just $ vsep
| ^^^^...
The Hackage release
1.1.4
sets almost no version bounds on dependencies and therefore claims to be compatible withoptparse-applicative == 0.17.1.0
. However, this is not the case.To reproduce, download the release tarball, constrain the dependency to
optparse-applicative == 0.17.1.0
in thebech32.cabal
file and runcabal build bech32:exe:bech32
. This will give the error shown below.Please make a revision on Hackage with appropriate version bound. As it stands, the bech32 package does not follow recommended best practices for packages on Hackage, which are documented here: https://github.com/haskell-infra/hackage-trustees/blob/master/cookbook.md#best-practice-for-managing-meta-data
Error: