Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inaccurate version bounds in .cabal file #2

Open
hvr opened this issue Feb 11, 2016 · 2 comments
Open

Inaccurate version bounds in .cabal file #2

hvr opened this issue Feb 11, 2016 · 2 comments

Comments

@hvr
Copy link

hvr commented Feb 11, 2016

plugins-1.5.5.0 fails to build with ghc-8.0 as well as with its bundled Cabal-1.23 (soon to become Cabal-1.24):

[ 5 of 12] Compiling System.Plugins.Env ( src/System/Plugins/Env.hs, /tmp/plugins-1.5.5.0/dist-newstyle/build/plugins-1.5.5.0/build/System/Plugins/Env.o )

src/System/Plugins/Env.hs:326:21: error:
    • Couldn't match expected type ‘IO (PackageIndex PackageConfig)’
                  with actual type ‘ProgramConfiguration -> IO InstalledPackageIndex’
    • Probable cause: ‘getInstalledPackages’ is applied to too few arguments
      In a stmt of a 'do' block:
        pkgIndex <- getInstalledPackages
                      silent [GlobalPackageDB, UserPackageDB] pc
      In the expression:
        do { pc <- configureAllKnownPrograms
                     silent defaultProgramConfiguration;
             pkgIndex <- getInstalledPackages
                           silent [GlobalPackageDB, UserPackageDB] pc;
             return $ [] `union` allPackages pkgIndex }
      In an equation for ‘grabDefaultPkgConf’:
          grabDefaultPkgConf
            = do { pc <- configureAllKnownPrograms
                           silent defaultProgramConfiguration;
                   pkgIndex <- getInstalledPackages silent [GlobalPackageDB, ....] pc;
                   return $ [] `union` allPackages pkgIndex }

src/System/Plugins/Env.hs:326:49: error:
    • Couldn't match expected type ‘Compiler’
                  with actual type ‘[PackageDB]’
    • In the second argument of ‘getInstalledPackages’, namely
        ‘[GlobalPackageDB, UserPackageDB]’
      In a stmt of a 'do' block:
        pkgIndex <- getInstalledPackages
                      silent [GlobalPackageDB, UserPackageDB] pc
      In the expression:
        do { pc <- configureAllKnownPrograms
                     silent defaultProgramConfiguration;
             pkgIndex <- getInstalledPackages
                           silent [GlobalPackageDB, UserPackageDB] pc;
             return $ [] `union` allPackages pkgIndex }

src/System/Plugins/Env.hs:326:82: error:
    • Couldn't match type ‘Distribution.Simple.Program.Db.ProgramDb’
                     with ‘[PackageDB]’
      Expected type: PackageDBStack
        Actual type: Distribution.Simple.Program.Db.ProgramDb
    • In the third argument of ‘getInstalledPackages’, namely ‘pc’
      In a stmt of a 'do' block:
        pkgIndex <- getInstalledPackages
                      silent [GlobalPackageDB, UserPackageDB] pc
      In the expression:
        do { pc <- configureAllKnownPrograms
                     silent defaultProgramConfiguration;
             pkgIndex <- getInstalledPackages
                           silent [GlobalPackageDB, UserPackageDB] pc;
             return $ [] `union` allPackages pkgIndex }

src/System/Plugins/Env.hs:335:17: error:
    • Couldn't match expected type ‘IO (PackageIndex PackageConfig)’
                  with actual type ‘ProgramConfiguration -> IO InstalledPackageIndex’
    • Probable cause: ‘getInstalledPackages’ is applied to too few arguments
      In a stmt of a 'do' block:
        pkgIndex <- getInstalledPackages
                      silent [GlobalPackageDB, UserPackageDB, SpecificPackageDB f] pc
      In the expression:
        do { pc <- configureAllKnownPrograms
                     silent defaultProgramConfiguration;
             pkgIndex <- getInstalledPackages
                           silent [GlobalPackageDB, UserPackageDB, ....] pc;
  tests/PackageTests/TemplateHaskell/dynamic/Lib.hs
             return $ allPackages pkgIndex }
      In an equation for ‘readPackageConf’:
          readPackageConf f
            = do { pc <- configureAllKnownPrograms
                           silent defaultProgramConfiguration;
                   pkgIndex <- getInstalledPackages silent [GlobalPackageDB, ....] pc;
                   return $ allPackages pkgIndex }

src/System/Plugins/Env.hs:335:45: error:
    • Couldn't match expected type ‘Compiler’
                  with actual type ‘[PackageDB]’
    • In the second argument of ‘getInstalledPackages’, namely
        ‘[GlobalPackageDB, UserPackageDB, SpecificPackageDB f]’
      In a stmt of a 'do' block:
        pkgIndex <- getInstalledPackages
                      silent [GlobalPackageDB, UserPackageDB, SpecificPackageDB f] pc
      In the expression:
        do { pc <- configureAllKnownPrograms
                     silent defaultProgramConfiguration;
             pkgIndex <- getInstalledPackages
                           silent [GlobalPackageDB, UserPackageDB, ....] pc;
             return $ allPackages pkgIndex }

  tests/PackageTests/TemplateHaskell/profiling/Lib.hs
src/System/Plugins/Env.hs:335:99: error:
    • Couldn't match type ‘Distribution.Simple.Program.Db.ProgramDb’
                     with ‘[PackageDB]’
      Expected type: PackageDBStack
        Actual type: Distribution.Simple.Program.Db.ProgramDb
    • In the third argument of ‘getInstalledPackages’, namely ‘pc’
      In a stmt of a 'do' block:
        pkgIndex <- getInstalledPackages
                      silent [GlobalPackageDB, UserPackageDB, SpecificPackageDB f] pc
      In the expression:
        do { pc <- configureAllKnownPrograms
                     silent defaultProgramConfiguration;
             pkgIndex <- getInstalledPackages
                           silent [GlobalPackageDB, UserPackageDB, ....] pc;
             return $ allPackages pkgIndex }
[ 8 of 12] Compiling System.Plugins.Load ( src/System/Plugins/Load.hs, /tmp/plugins-1.5.5.0/dist-newstyle/build/plugins-1.5.5.0/build/System/Plugins/Load.o )

src/System/Plugins/Load.hs:76:46: error:
    Module ‘Module’ does not export ‘packageKeyString’
@sboosali
Copy link

sboosali commented May 4, 2017

Any update from the author?

@hvr
Copy link
Author

hvr commented May 21, 2017

It appears that plugins-1.5.6.0 did address the original issue, however now we're back to square one with GHC 8.2.1 and Cabal-2.0:

In order, the following will be built (use -v for more details):
 - plugins-1.5.6.0 {plugins-1.5.6.0-inplace} (lib:plugins) (first run)
Configuring plugins-1.5.6.0...
configure: WARNING: unrecognized options: --with-compiler
checking build system type... x86_64-unknown-linux-gnu
checking for ghc... ghc
checking for value of __GLASGOW_HASKELL__... 802
checking for ghc library directory... /opt/ghc/8.2.1/lib/ghc-8.2.0.20170505
checking for gcc... /usr/bin/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/gcc accepts -g... yes
checking for /usr/bin/gcc option to accept ISO C89... none needed
checking for arc4random... no
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating config.mk
config.status: creating testsuite/makewith/io/TestIO.conf
config.status: creating testsuite/makewith/unsafeio/Unsafe.conf
config.status: creating config.h
configure: WARNING: unrecognized options: --with-compiler
Preprocessing library for plugins-1.5.6.0..
Building library for plugins-1.5.6.0..
[ 1 of 12] Compiling System.Plugins.Consts ( src/System/Plugins/Consts.hs, /tmp/matrix-worker/1495350818/dist-newstyle/build/x86_64-linux/ghc-8.2.0.20170505/plugins-1.5.6.0/build/System/Plugins/Consts.o )
[ 2 of 12] Compiling System.Plugins.LoadTypes ( src/System/Plugins/LoadTypes.hs, /tmp/matrix-worker/1495350818/dist-newstyle/build/x86_64-linux/ghc-8.2.0.20170505/plugins-1.5.6.0/build/System/Plugins/LoadTypes.o )
[ 3 of 12] Compiling System.Plugins.Env ( src/System/Plugins/Env.hs, /tmp/matrix-worker/1495350818/dist-newstyle/build/x86_64-linux/ghc-8.2.0.20170505/plugins-1.5.6.0/build/System/Plugins/Env.o )

src/System/Plugins/Env.hs:138:33: error:
    Ambiguous occurrence ‘Module’
    It could refer to either ‘System.Plugins.LoadTypes.Module’,
                             imported from ‘System.Plugins.LoadTypes’ at src/System/Plugins/Env.hs:54:34-39
                             (and originally defined
                                at src/System/Plugins/LoadTypes.hs:(42,1)-(47,22))
                          or ‘Distribution.Package.Module’,
                             imported from ‘Distribution.Package’ at src/System/Plugins/Env.hs:(72,1)-(76,3)
                             (and originally defined in ‘Distribution.Types.Module’)
    |
138 | type ModEnv = FiniteMap String (Module,Int)
    |                                 ^^^^^^

src/System/Plugins/Env.hs:140:25: error:
    Ambiguous occurrence ‘Module’
    It could refer to either ‘System.Plugins.LoadTypes.Module’,
                             imported from ‘System.Plugins.LoadTypes’ at src/System/Plugins/Env.hs:54:34-39
                             (and originally defined
                                at src/System/Plugins/LoadTypes.hs:(42,1)-(47,22))
                          or ‘Distribution.Package.Module’,
                             imported from ‘Distribution.Package’ at src/System/Plugins/Env.hs:(72,1)-(76,3)
                             (and originally defined in ‘Distribution.Types.Module’)
    |
140 | type DepEnv = FiniteMap Module [Module]
    |                         ^^^^^^

src/System/Plugins/Env.hs:140:33: error:
    Ambiguous occurrence ‘Module’
    It could refer to either ‘System.Plugins.LoadTypes.Module’,
                             imported from ‘System.Plugins.LoadTypes’ at src/System/Plugins/Env.hs:54:34-39
                             (and originally defined
                                at src/System/Plugins/LoadTypes.hs:(42,1)-(47,22))
                          or ‘Distribution.Package.Module’,
                             imported from ‘Distribution.Package’ at src/System/Plugins/Env.hs:(72,1)-(76,3)
                             (and originally defined in ‘Distribution.Types.Module’)
    |
140 | type DepEnv = FiniteMap Module [Module]
    |                                 ^^^^^^

src/System/Plugins/Env.hs:221:24: error:
    Ambiguous occurrence ‘Module’
    It could refer to either ‘System.Plugins.LoadTypes.Module’,
                             imported from ‘System.Plugins.LoadTypes’ at src/System/Plugins/Env.hs:54:34-39
                             (and originally defined
                                at src/System/Plugins/LoadTypes.hs:(42,1)-(47,22))
                          or ‘Distribution.Package.Module’,
                             imported from ‘Distribution.Package’ at src/System/Plugins/Env.hs:(72,1)-(76,3)
                             (and originally defined in ‘Distribution.Types.Module’)
    |
221 | addModule :: String -> Module -> IO ()
    |                        ^^^^^^

src/System/Plugins/Env.hs:243:24: error:
    Ambiguous occurrence ‘Module’
    It could refer to either ‘System.Plugins.LoadTypes.Module’,
                             imported from ‘System.Plugins.LoadTypes’ at src/System/Plugins/Env.hs:54:34-39
                             (and originally defined
                                at src/System/Plugins/LoadTypes.hs:(42,1)-(47,22))
                          or ‘Distribution.Package.Module’,
                             imported from ‘Distribution.Package’ at src/System/Plugins/Env.hs:(72,1)-(76,3)
                             (and originally defined in ‘Distribution.Types.Module’)
    |
243 | addModules :: [(String,Module)] -> IO ()
    |                        ^^^^^^

src/System/Plugins/Env.hs:266:18: error:
    Ambiguous occurrence ‘Module’
    It could refer to either ‘System.Plugins.LoadTypes.Module’,
                             imported from ‘System.Plugins.LoadTypes’ at src/System/Plugins/Env.hs:54:34-39
                             (and originally defined
                                at src/System/Plugins/LoadTypes.hs:(42,1)-(47,22))
                          or ‘Distribution.Package.Module’,
                             imported from ‘Distribution.Package’ at src/System/Plugins/Env.hs:(72,1)-(76,3)
                             (and originally defined in ‘Distribution.Types.Module’)
    |
266 | addModuleDeps :: Module -> [Module] -> IO ()
    |                  ^^^^^^

src/System/Plugins/Env.hs:266:29: error:
    Ambiguous occurrence ‘Module’
    It could refer to either ‘System.Plugins.LoadTypes.Module’,
                             imported from ‘System.Plugins.LoadTypes’ at src/System/Plugins/Env.hs:54:34-39
                             (and originally defined
                                at src/System/Plugins/LoadTypes.hs:(42,1)-(47,22))
                          or ‘Distribution.Package.Module’,
                             imported from ‘Distribution.Package’ at src/System/Plugins/Env.hs:(72,1)-(76,3)
                             (and originally defined in ‘Distribution.Types.Module’)
    |
266 | addModuleDeps :: Module -> [Module] -> IO ()
    |                             ^^^^^^

src/System/Plugins/Env.hs:272:18: error:
    Ambiguous occurrence ‘Module’
    It could refer to either ‘System.Plugins.LoadTypes.Module’,
                             imported from ‘System.Plugins.LoadTypes’ at src/System/Plugins/Env.hs:54:34-39
                             (and originally defined
                                at src/System/Plugins/LoadTypes.hs:(42,1)-(47,22))
                          or ‘Distribution.Package.Module’,
                             imported from ‘Distribution.Package’ at src/System/Plugins/Env.hs:(72,1)-(76,3)
                             (and originally defined in ‘Distribution.Types.Module’)
    |
272 | getModuleDeps :: Module -> IO [Module]
    |                  ^^^^^^

src/System/Plugins/Env.hs:272:32: error:
    Ambiguous occurrence ‘Module’
    It could refer to either ‘System.Plugins.LoadTypes.Module’,
                             imported from ‘System.Plugins.LoadTypes’ at src/System/Plugins/Env.hs:54:34-39
                             (and originally defined
                                at src/System/Plugins/LoadTypes.hs:(42,1)-(47,22))
                          or ‘Distribution.Package.Module’,
                             imported from ‘Distribution.Package’ at src/System/Plugins/Env.hs:(72,1)-(76,3)
                             (and originally defined in ‘Distribution.Types.Module’)
    |
272 | getModuleDeps :: Module -> IO [Module]
    |                                ^^^^^^

src/System/Plugins/Env.hs:279:17: error:
    Ambiguous occurrence ‘Module’
    It could refer to either ‘System.Plugins.LoadTypes.Module’,
                             imported from ‘System.Plugins.LoadTypes’ at src/System/Plugins/Env.hs:54:34-39
                             (and originally defined
                                at src/System/Plugins/LoadTypes.hs:(42,1)-(47,22))
                          or ‘Distribution.Package.Module’,
                             imported from ‘Distribution.Package’ at src/System/Plugins/Env.hs:(72,1)-(76,3)
                             (and originally defined in ‘Distribution.Types.Module’)
    |
279 | rmModuleDeps :: Module -> IO ()
    |                 ^^^^^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants