Angel
Angel copied to clipboard
Support optparse-applicative 0.13
Motivated by https://github.com/fpco/stackage/pull/2091
It's actually unrelated to that particular PR, as far as I can tell. Unfortunately, travis doesn't know how to tell the difference between new issues that arise over time with existing stackage dependencies, and issues with the PR in question.
Note that due to this revision I have temporarily removed angel from the Stackage nightly builds (which use optparse-applicative-0.13). I don't see why the upper bound was added, though.
Double checking with @hvr, did you mean to put < 0.14
instead of < 0.13
on this revision[1], or was there a reason to exclude optparse-applicative-0.13 from angel's build plans?
[1] http://hackage.haskell.org/package/angel-0.6.2/revisions/
@DanBurton I did mean to place <0.13 there, as I got this compile failure which I attributed to optparse-applicative-0.13 not reexporting (<>)
anymore and it was causing build-failures such as:
Configuring angel-0.6.2...
Preprocessing executable 'angel' for angel-0.6.2...
[1 of 9] Compiling Angel.PidFile ( src/Angel/PidFile.hs, /tmp/angel-0.6.2/dist-newstyle/build/x86_64-linux/ghc-8.0.1/angel-0.6.2/build/angel/angel-tmp/Angel/PidFile.o )
[2 of 9] Compiling Angel.Util ( src/Angel/Util.hs, /tmp/angel-0.6.2/dist-newstyle/build/x86_64-linux/ghc-8.0.1/angel-0.6.2/build/angel/angel-tmp/Angel/Util.o )
[3 of 9] Compiling Angel.Process ( src/Angel/Process.hs, /tmp/angel-0.6.2/dist-newstyle/build/x86_64-linux/ghc-8.0.1/angel-0.6.2/build/angel/angel-tmp/Angel/Process.o )
[4 of 9] Compiling Angel.Data ( src/Angel/Data.hs, /tmp/angel-0.6.2/dist-newstyle/build/x86_64-linux/ghc-8.0.1/angel-0.6.2/build/angel/angel-tmp/Angel/Data.o )
src/Angel/Data.hs:23:1: warning: [-Wmissing-import-lists]
The module ‘Control.Applicative’ does not have an explicit import list
src/Angel/Data.hs:24:1: warning: [-Wmissing-import-lists]
The module ‘Control.Monad.IO.Class’ does not have an explicit import list
src/Angel/Data.hs:25:1: warning: [-Wmissing-import-lists]
The module ‘Control.Monad.Reader’ does not have an explicit import list
[5 of 9] Compiling Angel.Files ( src/Angel/Files.hs, /tmp/angel-0.6.2/dist-newstyle/build/x86_64-linux/ghc-8.0.1/angel-0.6.2/build/angel/angel-tmp/Angel/Files.o )
[6 of 9] Compiling Angel.Log ( src/Angel/Log.hs, /tmp/angel-0.6.2/dist-newstyle/build/x86_64-linux/ghc-8.0.1/angel-0.6.2/build/angel/angel-tmp/Angel/Log.o )
src/Angel/Log.hs:5:1: warning: [-Wmissing-import-lists]
The module ‘Control.Monad.Reader’ does not have an explicit import list
src/Angel/Log.hs:12:1: warning: [-Wmissing-import-lists]
The module ‘Angel.Data’ does not have an explicit import list
[7 of 9] Compiling Angel.Job ( src/Angel/Job.hs, /tmp/angel-0.6.2/dist-newstyle/build/x86_64-linux/ghc-8.0.1/angel-0.6.2/build/angel/angel-tmp/Angel/Job.o )
src/Angel/Job.hs:41:1: warning: [-Wmissing-import-lists]
The import item ‘RunState(..)’ does not have an explicit import list
src/Angel/Job.hs:41:1: warning: [-Wmissing-import-lists]
The import item ‘Verbosity(..)’ does not have an explicit import list
[8 of 9] Compiling Angel.Config ( src/Angel/Config.hs, /tmp/angel-0.6.2/dist-newstyle/build/x86_64-linux/ghc-8.0.1/angel-0.6.2/build/angel/angel-tmp/Angel/Config.o )
src/Angel/Config.hs:15:1: warning: [-Wmissing-import-lists]
The module ‘Control.Monad.IO.Class’ does not have an explicit import list
src/Angel/Config.hs:35:1: warning: [-Wmissing-import-lists]
The import item ‘Verbosity(..)’ does not have an explicit import list
[9 of 9] Compiling Main ( src/Angel/Main.hs, /tmp/angel-0.6.2/dist-newstyle/build/x86_64-linux/ghc-8.0.1/angel-0.6.2/build/angel/angel-tmp/Main.o )
src/Angel/Main.hs:58:18: error:
• Variable not in scope:
(<>) :: InfoMod a3 -> InfoMod a4 -> InfoMod Options
• Perhaps you meant one of these:
‘<$>’ (imported from Options.Applicative),
‘*>’ (imported from Options.Applicative),
‘<$’ (imported from Options.Applicative)
src/Angel/Main.hs:62:44: error:
• Variable not in scope:
(<>) :: Mod f0 a0 -> Mod f1 Verbosity -> t2
• Perhaps you meant one of these:
‘<$>’ (imported from Options.Applicative),
‘*>’ (imported from Options.Applicative),
‘<$’ (imported from Options.Applicative)
src/Angel/Main.hs:63:43: error:
• Variable not in scope: (<>) :: t2 -> Mod f2 Verbosity -> t1
• Perhaps you meant one of these:
‘<$>’ (imported from Options.Applicative),
‘*>’ (imported from Options.Applicative),
‘<$’ (imported from Options.Applicative)
src/Angel/Main.hs:64:63: error:
• Variable not in scope: (<>) :: t1 -> Mod f3 a1 -> t0
• Perhaps you meant one of these:
‘<$>’ (imported from Options.Applicative),
‘*>’ (imported from Options.Applicative),
‘<$’ (imported from Options.Applicative)
src/Angel/Main.hs:65:54: error:
• Variable not in scope:
(<>) :: t0 -> Mod f4 a2 -> Mod OptionFields Verbosity
• Perhaps you meant one of these:
‘<$>’ (imported from Options.Applicative),
‘*>’ (imported from Options.Applicative),
‘<$’ (imported from Options.Applicative)
I tried to build angel
with stack (relatively old all-cabal-hashes
, so doesn't see the edit yet):
% stack --resolver=nightly-2016-11-11 install angel
configurator-0.3.0.0: download
configurator-0.3.0.0: configure
configurator-0.3.0.0: build
configurator-0.3.0.0: copy/register
angel-0.6.2: download
angel-0.6.2: configure
angel-0.6.2: build
Completed 2 action(s).
-- While building package angel-0.6.2 using:
/private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/.stack-work/dist/x86_64-osx/Cabal-1.24.0.0/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.0.0 build --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
Logs have been written to: /Users/ogre/.stack/global-project/.stack-work/logs/angel-0.6.2.log
[1 of 2] Compiling Main ( /private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/Setup.hs, /private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/.stack-work/dist/x86_64-osx/Cabal-1.24.0.0/setup/Main.o )
[2 of 2] Compiling StackSetupShim ( /Users/ogre/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/.stack-work/dist/x86_64-osx/Cabal-1.24.0.0/setup/StackSetupShim.o )
Linking /private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/.stack-work/dist/x86_64-osx/Cabal-1.24.0.0/setup/setup ...
Configuring angel-0.6.2...
Building angel-0.6.2...
Preprocessing executable 'angel' for angel-0.6.2...
[1 of 9] Compiling Angel.PidFile ( src/Angel/PidFile.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.0.0/build/angel/angel-tmp/Angel/PidFile.o )
[2 of 9] Compiling Angel.Util ( src/Angel/Util.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.0.0/build/angel/angel-tmp/Angel/Util.o )
[3 of 9] Compiling Angel.Process ( src/Angel/Process.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.0.0/build/angel/angel-tmp/Angel/Process.o )
[4 of 9] Compiling Angel.Data ( src/Angel/Data.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.0.0/build/angel/angel-tmp/Angel/Data.o )
/private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/src/Angel/Data.hs:23:1: warning: [-Wmissing-import-lists]
The module ‘Control.Applicative’ does not have an explicit import list
/private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/src/Angel/Data.hs:24:1: warning: [-Wmissing-import-lists]
The module ‘Control.Monad.IO.Class’ does not have an explicit import list
/private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/src/Angel/Data.hs:25:1: warning: [-Wmissing-import-lists]
The module ‘Control.Monad.Reader’ does not have an explicit import list
[5 of 9] Compiling Angel.Files ( src/Angel/Files.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.0.0/build/angel/angel-tmp/Angel/Files.o )
[6 of 9] Compiling Angel.Log ( src/Angel/Log.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.0.0/build/angel/angel-tmp/Angel/Log.o )
/private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/src/Angel/Log.hs:5:1: warning: [-Wmissing-import-lists]
The module ‘Control.Monad.Reader’ does not have an explicit import list
/private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/src/Angel/Log.hs:12:1: warning: [-Wmissing-import-lists]
The module ‘Angel.Data’ does not have an explicit import list
[7 of 9] Compiling Angel.Job ( src/Angel/Job.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.0.0/build/angel/angel-tmp/Angel/Job.o )
/private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/src/Angel/Job.hs:41:1: warning: [-Wmissing-import-lists]
The import item ‘RunState(..)’ does not have an explicit import list
/private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/src/Angel/Job.hs:41:1: warning: [-Wmissing-import-lists]
The import item ‘Verbosity(..)’ does not have an explicit import list
[8 of 9] Compiling Angel.Config ( src/Angel/Config.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.0.0/build/angel/angel-tmp/Angel/Config.o )
/private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/src/Angel/Config.hs:15:1: warning: [-Wmissing-import-lists]
The module ‘Control.Monad.IO.Class’ does not have an explicit import list
/private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/src/Angel/Config.hs:35:1: warning: [-Wmissing-import-lists]
The import item ‘Verbosity(..)’ does not have an explicit import list
[9 of 9] Compiling Main ( src/Angel/Main.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.0.0/build/angel/angel-tmp/Main.o )
/private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/src/Angel/Main.hs:58:18: error:
• Variable not in scope:
(<>) :: InfoMod a3 -> InfoMod a4 -> InfoMod Options
• Perhaps you meant one of these:
‘<$>’ (imported from Options.Applicative),
‘*>’ (imported from Options.Applicative),
‘<$’ (imported from Options.Applicative)
/private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/src/Angel/Main.hs:62:44: error:
• Variable not in scope:
(<>) :: Mod f0 a0 -> Mod f1 Verbosity -> t2
• Perhaps you meant one of these:
‘<$>’ (imported from Options.Applicative),
‘*>’ (imported from Options.Applicative),
‘<$’ (imported from Options.Applicative)
/private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/src/Angel/Main.hs:63:43: error:
• Variable not in scope: (<>) :: t2 -> Mod f2 Verbosity -> t1
• Perhaps you meant one of these:
‘<$>’ (imported from Options.Applicative),
‘*>’ (imported from Options.Applicative),
‘<$’ (imported from Options.Applicative)
/private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/src/Angel/Main.hs:64:63: error:
• Variable not in scope: (<>) :: t1 -> Mod f3 a1 -> t0
• Perhaps you meant one of these:
‘<$>’ (imported from Options.Applicative),
‘*>’ (imported from Options.Applicative),
‘<$’ (imported from Options.Applicative)
/private/var/folders/h8/h8jm3y51709_x707295yqgn00000gp/T/stack91746/angel-0.6.2/src/Angel/Main.hs:65:54: error:
• Variable not in scope:
(<>) :: t0 -> Mod f4 a2 -> Mod OptionFields Verbosity
• Perhaps you meant one of these:
‘<$>’ (imported from Options.Applicative),
‘*>’ (imported from Options.Applicative),
‘<$’ (imported from Options.Applicative)
@DanBurton how angel-0.6.2
slipped into nightly-2016-11-11
?
@phadej I'm not quite sure how that happened. I'm able to reproduce the issue like so:
$ stack unpack angel-0.6.2
$ cd angel-0.6.2/
<< edit cabal file, allow optparse-applicative-0.13 >>
$ stack init --resolver nightly-2016-11-22
$ stack build
@hvr seems like it may be an easy workaround to avoid the bounds. Wouldn't you just explicitly import (<>) from Data.Monoid?
@DanBurton The simplest explanation I can think of is the stackage nightly buildbot failed to re-check the build-status for angel-0.6.2
after optparse-applicative-0.13
entered the snapshot
@MichaelXavier yes, that would be the proper fix to make angel
compatible with optparse-applicative-0.13
Btw, you also should add a lower bound on optparse-applicative
, as angel
fails to compile with optparse-applicative < 0.11
(I fixed that up in the Hackage meta-data for a couple of older releases already)
PS: In a few years, Semigroup((<>))
will be exported from Prelude
, that's the motivation for getting rid of the re-export of Monoid.<>
from optparse-applicative-0.13
in order to make the transition a bit smoother in the long run...
@hvr I just added a lower bound on optparse-applicative >= 0.12.0.0. On my own machine I set it to 0.13.0.0 and it seemed to work. Should I go ahead and release this or does someone want to do more testing? Also, let me know if you'd like commit bit on this project. I'm not actively using Angel, and people who are should have a greater say in how it goes forward. I'm basically just the janitor.
@MichaelXavier I think you'll still have to import <>
where necessary, as it's re-exported by optparse-applicative-0.12
but not optparse-applicative-0.13
, no?