
Hello, I'm trying to understand cabal-dev, and I seem to be missing some basic point, because I can't get dependencies between projects working properly. I have two projects, let's call them P1 and P2. P2 depends on P1, as indicated by its cabal file build-depends field. I run cabal-dev add-source ..\P1 inside P2 then cabal-dev install Everything works fine, and my project compiles, with modules in P2 calling functions from P1. Then I add a new function if an exposed module of P1. I rerun the cabal-dev add-source and cabal-dev install commands to tell P2 of the change, as per the cabal-dev documentation. I change a file in P2 to use the new function, the compilation fails. If I check into the cabal-dev folder, I see the .hi file for my changed module has not been updated (old date). What am I missing? Thanks -- JP Moresmau http://jpmoresmau.blogspot.com/

You need to call cabal-dev add-source on P1 again to copy over the sdist,
then do a cabal-dev install.
See notes under "Using a sandbox-local Hackage" on
https://github.com/creswick/cabal-dev
On Feb 8, 2013 2:22 PM, "JP Moresmau"
Hello, I'm trying to understand cabal-dev, and I seem to be missing some
I have two projects, let's call them P1 and P2. P2 depends on P1, as indicated by its cabal file build-depends field. I run cabal-dev add-source ..\P1 inside P2 then cabal-dev install Everything works fine, and my project compiles, with modules in P2 calling functions from P1. Then I add a new function if an exposed module of P1. I rerun the cabal-dev add-source and cabal-dev install commands to tell P2 of the change, as per the cabal-dev documentation. I change a file in P2 to use
basic point, because I can't get dependencies between projects working properly. the new function, the compilation fails.
If I check into the cabal-dev folder, I see the .hi file for my changed module has not been updated (old date). What am I missing?
Thanks
-- JP Moresmau http://jpmoresmau.blogspot.com/
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Fri, Feb 8, 2013 at 9:53 AM, Blake Rain
You need to call cabal-dev add-source on P1 again to copy over the sdist, then do a cabal-dev install.
See notes under "Using a sandbox-local Hackage" on https://github.com/creswick/cabal-dehttps://github.com/creswick/cabal-dev
With the new cabal sandboxing (due in 1.18) this won't be necessary as we create a link to the repo, instead of installing a copy. We will rebuild the linked repo as needed.

Johan, thanks, that brings me to a point that I wanted to raise. I'm
playing with cabal-dev because users have asked me to add support for it in
EclipseFP (so projects could have their own sandbox and have dependencies
between projects without polluting the main package databases). It is worth
it, or should I just wait for cabal 1.18 and use the sandboxing facility?
Or will the two work similarly enough that supporting both will be easy?
Does the sandboxing in cabal means that tools like cabal-dev are going to
get deprecated?
Thanks
JP
On Fri, Feb 8, 2013 at 7:02 PM, Johan Tibell
On Fri, Feb 8, 2013 at 9:53 AM, Blake Rain
wrote: You need to call cabal-dev add-source on P1 again to copy over the sdist, then do a cabal-dev install.
See notes under "Using a sandbox-local Hackage" on https://github.com/creswick/cabal-dehttps://github.com/creswick/cabal-dev
With the new cabal sandboxing (due in 1.18) this won't be necessary as we create a link to the repo, instead of installing a copy. We will rebuild the linked repo as needed.
-- JP Moresmau http://jpmoresmau.blogspot.com/

On Fri, Feb 8, 2013 at 10:07 AM, JP Moresmau
Johan, thanks, that brings me to a point that I wanted to raise. I'm playing with cabal-dev because users have asked me to add support for it in EclipseFP (so projects could have their own sandbox and have dependencies between projects without polluting the main package databases). It is worth it, or should I just wait for cabal 1.18 and use the sandboxing facility? Or will the two work similarly enough that supporting both will be easy? Does the sandboxing in cabal means that tools like cabal-dev are going to get deprecated?
I think they will be similar enough that you could easily port the code. The new cabal sandboxing will work as follows: cabal sandbox --init cabal add-source <dir> and then you use cabal commands like normal (e.g. configure, build, test). No installing necessary. I cannot speak for the cabal-dev developers. We do intend to support a superset of the cabal-dev functionality eventually. What we're missing now is ghci support.

On Friday, February 8, 2013 at 1:19 PM, Johan Tibell wrote:
On Fri, Feb 8, 2013 at 10:07 AM, JP Moresmau
wrote: Johan, thanks, that brings me to a point that I wanted to raise. I'm playing with cabal-dev because users have asked me to add support for it in EclipseFP (so projects could have their own sandbox and have dependencies between projects without polluting the main package databases). It is worth it, or should I just wait for cabal 1.18 and use the sandboxing facility? Or will the two work similarly enough that supporting both will be easy? Does the sandboxing in cabal means that tools like cabal-dev are going to get deprecated?
I think they will be similar enough that you could easily port the code. The new cabal sandboxing will work as follows:
cabal sandbox --init cabal add-source <dir>
and then you use cabal commands like normal (e.g. configure, build, test). No installing necessary.
I cannot speak for the cabal-dev developers. We do intend to support a superset of the cabal-dev functionality eventually. What we're missing now is ghci support. Which, thanks to Johan's help yesterday, can still be worked around (for now) by starting ghci with:
ghci -package-conf ./cabal-sandbox/your-package-conf-folder-here/ I'm trying to get Emacs haskell-mode and inferior-haskell to play nice with this, but it's not working so far for some reason.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org (mailto:Haskell-Cafe@haskell.org) http://www.haskell.org/mailman/listinfo/haskell-cafe

On Fri, Feb 8, 2013 at 10:24 AM, Ozgun Ataman
Which, thanks to Johan's help yesterday, can still be worked around (for now) by starting ghci with:
ghci -package-conf ./cabal-sandbox/your-package-conf-folder-here/
You can indeed do this. For real ghci support in cabal we need to also pass -package flags, C libraries, etc to ghci. That's why it's not done yet. -- Johan

That's exactly what I'm doing, and I was exactly following these notes, but
it doesn't work. This google+ post and the answers to it (
https://plus.google.com/102016502921512042165/posts/TGaENqWfubP) lead me to
at least one solution that seems to work: you need to unregister the
changed package first.
So
cabal-dev ghc-pkg unregister --force P1
cabal-dev add-source ../P1
cabal-dev install
Does the trick. There seems to be a way to pass a --reinstall flag to
cabal-dev install but I haven't gotten it to work yet.
Thanks
JP
On Fri, Feb 8, 2013 at 6:53 PM, Blake Rain
You need to call cabal-dev add-source on P1 again to copy over the sdist, then do a cabal-dev install.
See notes under "Using a sandbox-local Hackage" on https://github.com/creswick/cabal-dev
On Feb 8, 2013 2:22 PM, "JP Moresmau"
wrote: Hello, I'm trying to understand cabal-dev, and I seem to be missing some
I have two projects, let's call them P1 and P2. P2 depends on P1, as indicated by its cabal file build-depends field. I run cabal-dev add-source ..\P1 inside P2 then cabal-dev install Everything works fine, and my project compiles, with modules in P2 calling functions from P1. Then I add a new function if an exposed module of P1. I rerun the cabal-dev add-source and cabal-dev install commands to tell P2 of the change, as per the cabal-dev documentation. I change a file in P2 to use
basic point, because I can't get dependencies between projects working properly. the new function, the compilation fails.
If I check into the cabal-dev folder, I see the .hi file for my changed module has not been updated (old date). What am I missing?
Thanks
-- JP Moresmau http://jpmoresmau.blogspot.com/
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- JP Moresmau http://jpmoresmau.blogspot.com/
participants (4)
-
Blake Rain
-
Johan Tibell
-
JP Moresmau
-
Ozgun Ataman