Ticket #255 (closed enhancement: duplicate)

Opened 5 years ago

Last modified 5 years ago

avoid rebuilding shared code

Reported by: guest Owned by:
Priority: normal Milestone:
Component: Cabal library Version: 1.2.3.0
Severity: normal Keywords:
Cc: Difficulty: normal
GHC Version: 6.8.2 Platform:

Description

It seems like a common use of Cabal is to build a library and an executable based on that library. Is there a good way to do this right now?

If you specify a stanza for each, the code gets compiled twice (or N+1 times for N executables). That gets annoying if there is a lot of shared code (consider a libdarcs).

It would be nice if the executable could just build-depends the library we are currently trying to build. (One could also imagine a version constraint like 'this version' which explicitly says to use the version being built in this cabal file)

Thanks! (Eric Kow)

Change History

Changed 5 years ago by guest

  • status changed from new to closed
  • resolution set to duplicate

Argh. This looks like a duplicate of #89 so I will resolve this unless somebody disagrees. (Eric)

Changed 5 years ago by duncan

Right, this is something that'd be nice, to allow the executables to depend on the library within the package. I think that's exactly what #89 is about.

Note: See TracTickets for help on using tickets.