[Haskell-cafe] cabal-dev add-source

JP Moresmau jpmoresmau at gmail.com
Fri Feb 8 19:04:11 CET 2013


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 <blake.rain at gmail.com> 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-dev
>
>
> On Feb 8, 2013 2:22 PM, "JP Moresmau" <jpmoresmau at gmail.com> wrote:
> >
> > 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/
> >
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-Cafe at haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
> >
>
>


-- 
JP Moresmau
http://jpmoresmau.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130208/38ee9440/attachment.htm>


More information about the Haskell-Cafe mailing list