Building a Library and Executable project fails with cannot satisfy -package-id <package>-inplace
dashkal16 opened this issue · 2 comments
dashkal16 commented
When attempting to build a project with both a library and an executable module that depends on it, epm build produces this error:
<command line>: cannot satisfy -package-id epm-lib-with-exec-0.1.0.0-inplace
(use -v for more information)
epm-lib-with-exec.cabal
:
name: epm-lib-with-exec
version: 0.1.0.0
-- synopsis:
-- description:
-- license:
author: Byron Shelden
maintainer: bshelden@splunk.com
-- copyright:
category: Bug Example
build-type: Simple
-- extra-source-files:
cabal-version: >=1.10
library
-- exposed-modules:
-- other-modules:
-- other-extensions:
build-depends: base >=4.8 && <4.9
hs-source-dirs: src
default-language: Haskell2010
executable exec
main-is: Main.hs
hs-source-dirs: exec-src
build-depends: base >=4.8 && <4.9, epm-lib-with-exec
default-language: Haskell2010
src/Lib.hs
:
module Lib where
dummy :: a -> a
dummy a = a
src-exec/Main.hs
:
module Main where
import Lib
main :: IO ()
main = putStrLn $ dummy "Hello, World"
Full output when attempting:
% epm sandbox init
Writing a default package environment file to
/home/bshelden/devel/epm-lib-with-exec/cabal.sandbox.config
Creating a new sandbox at /home/bshelden/devel/eta-cexc/.cabal-sandbox
% epm configure
Resolving dependencies...
Configuring epm-lib-with-exec-0.1.0.0...
Warning: The 'license-file' field refers to the file 'LICENSE' which does not
exist.
% epm build
Building epm-lib-with-exec-0.1.0.0...
Preprocessing library epm-lib-with-exec-0.1.0.0...
In-place registering epm-lib-with-exec-0.1.0.0...
Preprocessing executable 'exec' for epm-lib-with-exec-0.1.0.0...
<command line>: cannot satisfy -package-id epm-lib-with-exec-0.1.0.0-inplace
(use -v for more information)
dashkal16 commented
Note that the result does not change if I remove the sandbox and try again without it.
rahulmutt commented
I was able to determine that this bug has nothing to do with epm
and is a problem with eta
. I have a hunch that it has to do with the inplace package database not being read. I'll post any updates.