cabal sandbox add-source installs but disappears

Hello all, I am having "a bit" of an issue trying to use a source dependency with cabal. I have a very simple setup with only 2 packages: ~/code/haskell/package-tests/a-package a.cabal src/MainA.hs and ~/code/haskell/package-tests/MinhaCommon MinhaCommon.cabal setup.hs src/MainCommon.hs I have setup a sandbox for the MinhaCommon package and can build it. However, the first one (a-package) depends on the second (MinhaCommon). So, I also created a sandbox for it as such: a-package>cabal sandbox init and that seems to work fine... Writing a default package environment file to /Users/dimitri/code/haskell/package-tests/a-package/cabal.sandbox.config Creating a new sandbox at /Users/dimitri/code/haskell/package-tests/a-package/.cabal-sandbox I then add the source package and install... a-package>cabal sandbox add-source '../MinhaCommon/' a-package>cabal install --only-dep Resolving dependencies... Notice: installing into a sandbox located at /Users/dimitri/code/haskell/package-tests/a-package/.cabal-sandbox Configuring MinhaCommon-0.7.0... Building MinhaCommon-0.7.0... Installed MinhaCommon-0.7.0 Updating documentation index /Users/dimitri/code/haskell/package-tests/a-package/.cabal-sandbox/share/doc/x86_64-osx-ghc-7.10.2/index.html Here's the snag! a-package>cabal configure Resolving dependencies... Configuring a-0.1.0... cabal: At least the following dependencies are missing: MinhaCommon ==0.7.0 WTF!? I just installed that! The cabal file for package 'a' just includes the MinhaCommon package thru the build-depends section (http://pastebin.com/Wpz5845k) ------------------------------------------------ name: a version: 0.1.0 build-type: Simple cabal-version: >=1.20 ---------------------------------------------- executable a main-is: MainA.hs hs-source-dirs: ./src build-depends: base >= 4.4 , unordered-containers , unix , process , stm , MinhaCommon == 0.7.0 default-language: Haskell2010 ------------------------------------------------ Any pointers on how to get this to build are much appreciated. Thanks, Dimitri

On Fri, Aug 14, 2015 at 2:53 PM, Dimitri DeFigueiredo < defigueiredo@ucdavis.edu> wrote:
executable a main-is: MainA.hs hs-source-dirs: ./src
Looks to me like you have told it that MinhaCommon is an executable with no library component. Installing it therefore created and installed a program named "a", without registering a library. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Yes!! Thank you!!! You nailed it :-D Dimitri Em 14/08/15 13:00, Brandon Allbery escreveu:
On Fri, Aug 14, 2015 at 2:53 PM, Dimitri DeFigueiredo
mailto:defigueiredo@ucdavis.edu> wrote: executable a main-is: MainA.hs hs-source-dirs: ./src
Looks to me like you have told it that MinhaCommon is an executable with no library component. Installing it therefore created and installed a program named "a", without registering a library.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com mailto:allbery.b@gmail.com ballbery@sinenomine.net mailto:ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
participants (2)
-
Brandon Allbery
-
Dimitri DeFigueiredo