Skip to content

Fix assert stanza disabled not available#12080

Open
philderbeast wants to merge 2 commits into
haskell:masterfrom
cabalism:fix/assert-stanza-disabled-not-available
Open

Fix assert stanza disabled not available#12080
philderbeast wants to merge 2 commits into
haskell:masterfrom
cabalism:fix/assert-stanza-disabled-not-available

Conversation

@philderbeast

Copy link
Copy Markdown
Collaborator

Fix #11568. This is the work of @hasufell in #11567 but isolated and extracted to only fix the assertion.

Note

Tests were added previously in #12069. The assertion was removed then. We add it back with this fix.


Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:

philderbeast and others added 2 commits July 5, 2026 07:28
- Fix assertion failure wrt haskell#11568 'lookupLocalPackageConfig' would ignore --'projectConfigAllPackages'
(`package *`) and thus diverge from 'lookupPerPkgOption'. This would then cause further divergence between 'elabStanzasRequested'
and 'elabStanzasAvailable'.
Change arg order with perPkgOptionFlag, def first
Use function composition for perPkgOption*
Add type sigs for all perPkgOption* functions
Inline each perPkgOption* only used once
Use -XViewPatterns in perPkgOptionLibExeFlag
Partially apply then use lookupPerPkgOption
Move Map.fromList in list comprehension
Use -XViewPattern in Just pkgId branch
Defer (TestStanzas,) & (BenechStanzas,) tuples
Remove lookupLocalPackageConfig

Co-Authored-By: Julian Ospald <hasufell@posteo.de>
@philderbeast philderbeast force-pushed the fix/assert-stanza-disabled-not-available branch from 6078c65 to 09d9332 Compare July 5, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assertion failure for "stanzas explicitly disabled should not be available"

1 participant