Skip to content

Re #6038 #9370 Deps with no main lib are accepted by Cabal (the tool) - #11931

Merged
mergify[bot] merged 1 commit into
masterfrom
re6038
Jun 6, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
re6038

Conversation

@mpilgrem

@mpilgrem mpilgrem commented Jun 3, 2026 •

Copy link
Copy Markdown
Collaborator

Template B: This PR does not modify behaviour or interface

  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions). Not applicable

See:

Cabal (the tool) v3.14.2.0 and v3.16.1.0 appear to accept dependencies on packages with public sublibraries and no main library. Consequently, the note in the Cabal User Guide stating otherwise can be deleted. For example, the following example appears to be buildable on a Windows 11 system:

-- cabal.project
packages:
    myPackageA
    myPackageB
-- myPackageA/myPackageA.cabal
cabal-version: 3.4
name:           myPackageA
version:        0.0.0

library
  exposed-modules:
      Lib
  hs-source-dirs:
      src
  build-depends:
      base
    , myPackageB:myPackageB-sub
  default-language: Haskell2010
-- myPackageB/myPackageB.cabal
cabal-version: 3.4
name:           myPackageB
version:        0.0.0

library myPackageB-sub
  visibility: public
  exposed-modules:
      Sublib
  hs-source-dirs:
      sub
  build-depends:
      base

@philderbeast

Copy link
Copy Markdown
Collaborator

Thanks @mpilgrem. I wonder if there's an existing test for that situation (maybe found by grepping for library.+$ or visibility in cabal-testsuite/**/*.cabal).

@ulysses4ever ulysses4ever left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On top of the test, it'd be interesting to know when and why this changed. But we shouldn't block the straightforward doc fix because of those questions. Thank you!

@mpilgrem mpilgrem added the merge me Tell Mergify Bot to merge label Jun 4, 2026
@mergify mergify Bot added the ready and waiting Mergify is waiting out the cooldown period label Jun 4, 2026
@mergify mergify Bot added merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days queued labels Jun 6, 2026
@mergify

mergify Bot commented Jun 6, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 1 hour 56 minutes 45 seconds in the queue, including 1 hour 44 minutes 58 seconds running CI.

Required conditions to merge
  • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Doctest Cabal
    • check-neutral = Doctest Cabal
    • check-skipped = Doctest Cabal
  • any of [🛡 GitHub branch protection]:
    • check-success = Meta checks
    • check-neutral = Meta checks
    • check-skipped = Meta checks
  • any of [🛡 GitHub branch protection]:
    • check-success = docs/readthedocs.org:cabal
    • check-neutral = docs/readthedocs.org:cabal
    • check-skipped = docs/readthedocs.org:cabal
  • any of [🛡 GitHub branch protection]:
    • check-success = Validate post job
    • check-neutral = Validate post job
    • check-skipped = Validate post job
  • any of [🛡 GitHub branch protection]:
    • check-success = fourmolu
    • check-neutral = fourmolu
    • check-skipped = fourmolu
  • any of [🛡 GitHub branch protection]:
    • check-success = hlint
    • check-neutral = hlint
    • check-skipped = hlint
  • any of [🛡 GitHub branch protection]:
    • check-success = Bootstrap post job
    • check-neutral = Bootstrap post job
    • check-skipped = Bootstrap post job
  • any of [🛡 GitHub branch protection]:
    • check-success = whitespace
    • check-neutral = whitespace
    • check-skipped = whitespace
  • any of [🛡 GitHub branch protection]:
    • check-success = Check sdist post job
    • check-neutral = Check sdist post job
    • check-skipped = Check sdist post job
  • any of [🛡 GitHub branch protection]:
    • check-success = Changelogs
    • check-neutral = Changelogs
    • check-skipped = Changelogs

mergify Bot added a commit that referenced this pull request Jun 6, 2026
@mergify
mergify Bot merged commit d738fb4 into master Jun 6, 2026
77 checks passed
@mergify
mergify Bot deleted the re6038 branch June 6, 2026 13:10
@mergify mergify Bot removed the queued label Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge ready and waiting Mergify is waiting out the cooldown period

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants