kowainik / summoner

🔮 🔧 Tool for scaffolding batteries-included production-level Haskell projects
https://kowainik.github.io/projects/summoner
Mozilla Public License 2.0
692 stars 73 forks source link

Fails to compile #568

Open mouse07410 opened 1 year ago

mouse07410 commented 1 year ago

I'm trying to install summoner (and summoner-tui, but that can wait). It fails to compile:

$ cabal install summoner -w ghc-9.2.6 --allow-newer --verbose=3 > ~/summon-build.txt
CallStack (from HasCallStack):
  withMetadata, called at src/Distribution/Simple/Utils.hs:370:14 in Cabal-3.8.1.0-inplace:Distribution.Simple.Utils
Error: cabal: Failed to build smmnr-2.0.1.1-4da9c4c0.
Failed to build summoner-2.0.1.1 because it depends on summoner-2.0.1.1 which
itself failed to build.

$ 

Excerpt from the summon-build.txt log:

/Users/ur20980/.ghcup/bin/ghc-9.2.6 --make -fbuilding-cabal-package -O2 -static -dynamic-too -dynosuf dyn_o -dynhisuf dyn_hi -outputdir dist/build -odir dist/build -hidir dist/build -stubdir dist/build -i -idist/build -isrc -idist/build/autogen -idist/build/global-autogen -Idist/build/autogen -Idist/build/global-autogen -Idist/build -I/opt/local/include -I/usr/local/include -optP-include -optPdist/build/autogen/cabal_macros.h -this-unit-id smmnr-2.0.1.1-4da9c4c0 -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /Users/ur20980/.cabal/store/ghc-9.2.6/package.db -package-db dist/package.conf.inplace -package-id 'base-4.16.4.0 (Control.Applicative, Control.Arrow, Control.Category, Control.Concurrent, Control.Concurrent.Chan, Control.Concurrent.MVar, Control.Concurrent.QSem, Control.Concurrent.QSemN, Control.Exception, Control.Exception.Base, Control.Monad, Control.Monad.Fail, Control.Monad.Fix, Control.Monad.IO.Class, Control.Monad.Instances, Control.Monad.ST, Control.Monad.ST.Lazy, Control.Monad.ST.Lazy.Safe, Control.Monad.ST.Lazy.Unsafe, Control.Monad.ST.Safe, Control.Monad.ST.Strict, Control.Monad.ST.Unsafe, Control.Monad.Zip, Data.Bifoldable, Data.Bifunctor, Data.Bitraversable, Data.Bits, Data.Bool, Data.Char, Data.Coerce, Data.Complex, Data.Data, Data.Dynamic, Data.Either, Data.Eq, Data.Fixed, Data.Foldable, Data.Function, Data.Functor, Data.Functor.Classes, Data.Functor.Compose, Data.Functor.Const, Data.Functor.Contravariant, Data.Functor.Identity, Data.Functor.Product, Data.Functor.Sum, Data.IORef, Data.Int, Data.Ix, Data.Kind, Data.List, Data.List.NonEmpty, Data.Maybe, Data.Monoid, Data.Ord, Data.Proxy, Data.Ratio, Data.STRef, Data.STRef.Lazy, Data.STRef.Strict, Data.Semigroup, Data.String, Data.Traversable, Data.Tuple, Data.Type.Bool, Data.Type.Coercion, Data.Type.Equality, Data.Type.Ord, Data.Typeable, Data.Unique, Data.Version, Data.Void, Data.Word, Debug.Trace, Foreign, Foreign.C, Foreign.C.Error, Foreign.C.String, Foreign.C.Types, Foreign.Concurrent, Foreign.ForeignPtr, Foreign.ForeignPtr.Safe, Foreign.ForeignPtr.Unsafe, Foreign.Marshal, Foreign.Marshal.Alloc, Foreign.Marshal.Array, Foreign.Marshal.Error, Foreign.Marshal.Pool, Foreign.Marshal.Safe, Foreign.Marshal.Unsafe, Foreign.Marshal.Utils, Foreign.Ptr, Foreign.Safe, Foreign.StablePtr, Foreign.Storable, GHC.Arr, GHC.Base, GHC.Bits, GHC.ByteOrder, GHC.Char, GHC.Clock, GHC.Conc, GHC.Conc.IO, GHC.Conc.Signal, GHC.Conc.Sync, GHC.ConsoleHandler, GHC.Constants, GHC.Desugar, GHC.Enum, GHC.Environment, GHC.Err, GHC.Event, GHC.Event.TimeOut, GHC.Exception, GHC.Exception.Type, GHC.ExecutionStack, GHC.ExecutionStack.Internal, GHC.Exts, GHC.Fingerprint, GHC.Fingerprint.Type, GHC.Float, GHC.Float.ConversionUtils, GHC.Float.RealFracMethods, GHC.Foreign, GHC.ForeignPtr, GHC.GHCi, GHC.GHCi.Helpers, GHC.Generics, GHC.IO, GHC.IO.Buffer, GHC.IO.BufferedIO, GHC.IO.Device, GHC.IO.Encoding, GHC.IO.Encoding.CodePage, GHC.IO.Encoding.Failure, GHC.IO.Encoding.Iconv, GHC.IO.Encoding.Latin1, GHC.IO.Encoding.Types, GHC.IO.Encoding.UTF16, GHC.IO.Encoding.UTF32, GHC.IO.Encoding.UTF8, GHC.IO.Exception, GHC.IO.FD, GHC.IO.Handle, GHC.IO.Handle.FD, GHC.IO.Handle.Internals, GHC.IO.Handle.Lock, GHC.IO.Handle.Text, GHC.IO.Handle.Types, GHC.IO.IOMode, GHC.IO.StdHandles, GHC.IO.SubSystem, GHC.IO.Unsafe, GHC.IOArray, GHC.IOPort, GHC.IORef, GHC.Int, GHC.Integer, GHC.Integer.Logarithms, GHC.Ix, GHC.List, GHC.MVar, GHC.Maybe, GHC.Natural, GHC.Num, GHC.Num.BigNat, GHC.Num.Integer, GHC.Num.Natural, GHC.OldList, GHC.OverloadedLabels, GHC.Pack, GHC.Profiling, GHC.Ptr, GHC.RTS.Flags, GHC.Read, GHC.Real, GHC.Records, GHC.ResponseFile, GHC.ST, GHC.STRef, GHC.Show, GHC.Stable, GHC.StableName, GHC.Stack, GHC.Stack.CCS, GHC.Stack.Types, GHC.StaticPtr, GHC.Stats, GHC.Storable, GHC.TopHandler, GHC.TypeLits, GHC.TypeLits.Internal, GHC.TypeNats, GHC.TypeNats.Internal, GHC.Unicode, GHC.Weak, GHC.Word, Numeric, Numeric.Natural, System.CPUTime, System.Console.GetOpt, System.Environment, System.Environment.Blank, System.Exit, System.IO, System.IO.Error, System.IO.Unsafe, System.Info, System.Mem, System.Mem.StableName, System.Mem.Weak, System.Posix.Internals, System.Posix.Types, System.Timeout, Text.ParserCombinators.ReadP, Text.ParserCombinators.ReadPrec, Text.Printf, Text.Read, Text.Read.Lex, Text.Show, Text.Show.Functions, Type.Reflection, Type.Reflection.Unsafe, Unsafe.Coerce)' -package-id 'rld-1.1.0.0-7a6beefd (Relude as Prelude, Relude.Extra.Enum)' -package-id sn-2.1.1.0-3651ac25 -package-id clrst-0.1.0.2-d3e182b8 -package-id containers-0.6.5.1 -package-id directory-1.3.6.2 -package-id filepath-1.4.2.2 -package-id gnrc-dt-1.0.0.1-de9819cc -package-id gtrv-1.3.1-5507955d -package-id nt-ntrpltn-0.5.1.3-9ec9b792 -package-id ptprs-pplctv-0.17.0.0-6d9dac64 -package-id process-1.6.16.0 -package-id shllmt-0.0.4.1-5403033c -package-id text-1.2.5.0 -package-id time-1.11.1.1 -package-id tmlnd-1.3.3.2-a0187529 -package-id vldtn-slctv-0.1.0.2-f5615b70 -XHaskell2010 -XDeriveGeneric -XDerivingStrategies -XGeneralizedNewtypeDeriving -XInstanceSigs -XLambdaCase -XOverloadedStrings -XRecordWildCards -XScopedTypeVariables -XTypeApplications Summoner Summoner.CLI Summoner.Config Summoner.CustomPrelude Summoner.Decision Summoner.Default Summoner.GhcVer Summoner.License Summoner.Mode Summoner.Project Summoner.Question Summoner.Settings Summoner.Source Summoner.Template Summoner.Template.Cabal Summoner.Template.Doc Summoner.Template.GitHub Summoner.Template.Haskell Summoner.Template.Script Summoner.Template.Stack Summoner.Text Summoner.Tree Paths_summoner -Wall -Wcompat -Widentities -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints -fhide-source-paths -Wmissing-export-lists -Wpartial-fields -Wmissing-deriving-strategies '-Werror=missing-deriving-strategies' -Wunused-packages -hide-all-packages

<no location info>: warning: [-Wunused-packages]
    The following packages were specified via -package or -package-id flags,
    but were not needed for compilation:
      - rld-1.1.0.0-7a6beefd
      - base-4.16.4.0
[ 1 of 23] Compiling Paths_summoner
[ 2 of 23] Compiling Summoner.GhcVer

src/Summoner/GhcVer.hs:25:27: error:
    Module ‘Relude.Extra.Enum’ does not export ‘inverseMap’
   |
25 | import Relude.Extra.Enum (inverseMap, universe)
   |                           ^^^^^^^^^^

src/Summoner/GhcVer.hs:25:39: error:
    Module ‘Relude.Extra.Enum’ does not export ‘universe’
   |
25 | import Relude.Extra.Enum (inverseMap, universe)
   |                                       ^^^^^^^^
/Users/ur20980/.ghcup/bin/ghc-9.2.6 returned ExitFailure 1

Full build log: summon-build.txt

MacOS Ventura 13.2.1, Cabal-3.8.1.0, GHC-9.2.6 (and most any other version).

P.S. No, I don't and can't use (or install) HomeBrew.

vrom911 commented 1 year ago

Hi @mouse07410 ,

Thanks for sharing.

Currently the version with the support of GHC-9.2 is not on Hackage, so that's why you are getting the error.

I would suggest to try to install from the sources. You can find the instructions for that in README: https://github.com/kowainik/summoner#tui-from-source

Alternatively, I would create the new release and update this ticket when it is ready 🙂

mouse07410 commented 1 year ago

Both suggestions sound good.

Also, are you considering support for GHC 9.4.4, 9.6.1, and 9.2.7?