hackage-server icon indicating copy to clipboard operation
hackage-server copied to clipboard

Undefined variable when built with `MINIMAL`

Open AliasQli opened this issue 2 years ago • 1 comments

In Distribution.Server.Features, the definition of browseFeature is enclosed in a #ifndef MINIMAL/#endif block:

https://github.com/haskell/hackage-server/blob/c9952843dcdb02df7ef965c0368923f37af2f326/src/Distribution/Server/Features.hs#L346-L353

But below its usage isn't.

https://github.com/haskell/hackage-server/blob/c9952843dcdb02df7ef965c0368923f37af2f326/src/Distribution/Server/Features.hs#L406-L408

I've not really tested it myself, but I think if built with MINIMAL, this will lead to an undefined variable.

AliasQli avatar Jun 19 '22 10:06 AliasQli

Not unlikely that the flag minimal has bit-rot since it is not covered by CI.

TODO: include the flags in CI or drop them.

andreasabel avatar Jun 19 '22 18:06 andreasabel