Skip to content

Cabal confused with sublibrary when same-named remote package exists #9122

Closed
@merijn

Description

@merijn

Describe the bug
According to the documentation, the correct way to refer to the (unnamed) main library of a package foo is foo:foo, however specifying bounds on foo:foo when a local library named foo exists, gets interpreted as a bound on the local library. As a result it's impossible to have a package with local library foo:conduit that depends on conduit or conduit:conduit, as any bounds get interpreted as bounds on foo:conduit.

To Reproduce
Steps to reproduce the behavior:

Create a package with a local library whose name matches an existing package, and try to add a bound on the existing package.

$ cabal build ...

Expected behavior
Any bounds on conduit:conduit apply to the conduit package/library, not the local library named conduit.

System information

  • cabal version 3.10

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions