1

Hackage shows the union of the dependencies of the Library section as well as all Executable sections, even when I conditionally hide them behind a flag set to false.

I've only found this ancient, supposedly-fixed bug which claims that specifying cabal >= 1.18 solves things, but that doesn't seem to be the case.

What do I need to do to have hackage show only dependencies for the Library section, when the package includes Executable sections?

Here is the package that's giving me issues.

jberryman
  • 16,334
  • 5
  • 42
  • 83
  • 1
    I hope I don't sound a bit stupid, but... what's your question? – Daniel Wagner Apr 30 '15 at 00:49
  • @DanielWagner edited to add "What do I need to do to have hackage show only dependencies for the Library section, when the package includes Executable sections?" – jberryman Apr 30 '15 at 05:00

1 Answers1

1

This is not something you can control: If there is an executable section, hackage will expect that users will want to build them. This makes sense, and making that configurable will only cause unnecessary complications.

The proper fix in this case is to put the test suite and benchmark programs into proper Cabal sections of that type. See https://www.haskell.org/cabal/users-guide/developing-packages.html#test-suites and https://www.haskell.org/cabal/users-guide/developing-packages.html#benchmarks for their documentation.

Joachim Breitner
  • 25,395
  • 6
  • 78
  • 139
  • FWIW I don't think it makes sense personally, and it seems like at one point it was declared a bug (unless I'm misreading that old bug report mailing list post). I guess I'll probably just make all the sections `test` sections so I only have to do `--enable-tests` or something. – jberryman Apr 30 '15 at 14:23
  • 1
    @jberryman I think you are misreading the old bug report. That report is about Cabal, not Hackage. – Daniel Wagner May 01 '15 at 00:06