Skip to content

unused package warning always report main library

Even if the unused library is a sublibrary in Cabal package, I see e.g.

<no location info>: warning: [GHC-42258] [-Wunused-packages]
    The following packages were specified via -package or -package-id flags,
    but were not needed for compilation:
      - bytestring-0.12.1.0 (exposed by flag -package-id bytestring-0.12.1.0-2ee7)
      - lsm-tree-0.1.0.0 (exposed by flag -package-id lsm-tree-0.1.0.0-inplace-bloomfilter)

Note the lsm-tree-0.1.0.0-inplace-bloomfilter, which is lsm-tree:bloomfilter sublibrary. The warning is imprecise

(#24667 is very similar issue of GHC equating packages to libraries, which isn't true anymore)

Edited by Oleg Grenrus
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information