haskell / cabal

Official upstream development repository for Cabal and cabal-install
https://haskell.org/cabal
Other
1.59k stars 689 forks source link

Feature: A dedicated "profiling" target #1969

Open nikita-volkov opened 10 years ago

nikita-volkov commented 10 years ago

Motivation

Currently distributing the profiling executables with the package is not supported. Using the standard executable target for this task does not work well: the executable gets installed into the "bin" directory and its dependencies affect the "Dependencies" property of a package description on Hackage.

23Skidoo commented 10 years ago

If you're profiling an executable that you want to ship anyway, you can use ghc-prof-options to specify options to be given to GHC when you configure your package with --enable-executable-profiling.

If you have a special executable for profiling that you don't want to ship, then I think you can use benchmark together with ghc-prof-options.

nikita-volkov commented 10 years ago

If you have a special executable for profiling that you don't want to ship

Yes, that's the case I was trying to describe.

I think you can use benchmark together with ghc-prof-options.

Thanks for the suggestion. Still however, this is a workaround rather than a solution.

23Skidoo commented 10 years ago

Still however, this is a workaround rather than a solution.

I don't think the UX would improve if we just added a profiling section (a variant of executable) since it wouldn't let the user do anything not already possible with benchmark. A cabal prof command that lets you specify a target could probably be useful, but someone needs to come up with a design/think it through.

BardurArantsson commented 8 years ago

I think this is a "wontfix", then?