You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wrong "cabal: Encountered missing or private dependencies" error on sublibraries that start with "z" #7375
Basically, the example should compile fine, just as the version listed before it that differs only in that the main library is changed to private library z, but instead it bugs out with "cabal: Encountered missing or private dependencies".
This may be a different bug. In particular, adding an empty main (and so public) library doesn't fix compilation, unlike with the test you mention. Perhaps it's similar, but errors out not when public libraries are absent in the .cabal file, but when they are absent in the build-depends stanza (some private libraries present, but not a single public library from the same package present).
looks like Setup.hs does not have this problem. only cabal-install fails.
I made a (more) minimal reproducer:
cabal-version: 2.2
name: issue5782
version: 0.1build-type: Simple
library a
hs-source-dirs: .
build-depends: base
default-language: Haskell2010
library z
hs-source-dirs: .
build-depends: a, base
default-language: Haskell2010
library c
hs-source-dirs: .
build-depends: z, base
default-language: Haskell2010
The weird thing is, if you rename "z" into "b"... it works.
Do stanzas have to be lexicographically ordered now?? Something must be very wrong for this to happen
changed the title [-]Wrong "cabal: Encountered missing or private dependencies" error[/-][+]Wrong "cabal: Encountered missing or private dependencies" error on sublibraries that start with "z"[/+]on May 17, 2022
Activity
fgaz commentedon May 1, 2021
Looks like a regression: #6038
But we have a test for this (#6842), why didn't it fail?
Mikolaj commentedon May 1, 2021
This may be a different bug. In particular, adding an empty main (and so public) library doesn't fix compilation, unlike with the test you mention. Perhaps it's similar, but errors out not when public libraries are absent in the .cabal file, but when they are absent in the build-depends stanza (some private libraries present, but not a single public library from the same package present).
fgaz commentedon May 17, 2022
looks like Setup.hs does not have this problem. only cabal-install fails.
I made a (more) minimal reproducer:
The weird thing is, if you rename "z" into "b"... it works.
Do stanzas have to be lexicographically ordered now?? Something must be very wrong for this to happen
fgaz commentedon May 17, 2022
of course it's the munged package name...
workaround: don't start the name of your sublibrary with (an arbitrary number of) "z" (unless followed by something other than "z" or "-")
[-]Wrong "cabal: Encountered missing or private dependencies" error[/-][+]Wrong "cabal: Encountered missing or private dependencies" error on sublibraries that start with "z"[/+]