Conversation
62c6cd6 to
2dd86fa
Compare
The basic idea is: * The `InstalledLibraryInfo` constructor is modified so that the `GhcPkgId` of a main library is optional. * A `ConfigCacheTypeFlagLibrary` value is, like a `ConfigCacheTypeFlagExecutable` value, based on the package identifier (rather than the 'GhcPkgId' of the main library, which may not be present) * `Stack.SDist` needs to be considered more carefully. * `fetchAndMarkInstalledPackage` allows for the absence of a buildable main library but the presence of sublibraries. An integration test is added.
philippedev101
added a commit
to philippedev101/stack
that referenced
this pull request
Jun 9, 2026
Brings PR commercialhaskell#6865 up to current upstream master (e6170f1), past: * commercialhaskell#6921 / commercialhaskell#6920: don't ignore deps named like sub-libs or foreign libs, plus the reformatting/refactor in front of that fix. * commercialhaskell#6929: refactor/reformat sweep with `allDeps` documentation and a type synonym for the build-log suffix parameter. * commercialhaskell#6928 / commercialhaskell#6896 / commercialhaskell#6912: `InstalledLibraryInfo` now carries `Maybe GhcPkgId` for the main library plus a `Map StackUnqualCompName GhcPkgId` of sub-libraries (some Cabal packages have only sub-libraries with no main library, and now Stack represents that). `Task.present`, the custom-setup dependency map, and `ConfigCacheTypeFlagLibrary` are now keyed by `MungedPackageId` / `PackageIdentifier` instead of by `GhcPkgId`. Adapts the PR's code to the new shapes: * `findGhcPkgId` filters for main-library entries (`LMainLibName`) in the new `Map MungedPackageId GhcPkgId`. * `mkInstantiateWithOpts` takes the new map shape unchanged otherwise. * `addInstantiationTasks` wraps each implementing-package identifier with `toCabalMungedPackageId pid Nothing` before adding it to a CInst task's `present` map. * `ConfigCacheType`'s PersistField instance keeps the PR's `ConfigCacheTypeInstantiation Text` variant on top of upstream's `flagCache` helper restructure. `Task.allInOne` is intentionally NOT restored here; that lands as a separate commit on top of this merge. The PR's other changes (Phase 1 component-keyed plan, Phase 2 per component split path for Backpack-using packages, Phase 3 CInst tasks, the existing fixes for commercialhaskell#3996 / commercialhaskell#3959 / commercialhaskell#6451, the custom-setup TestSuite fix from PR commercialhaskell#6884, etc.) are unchanged. Verified: full stack build + 858 unit tests pass on the merged tree.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See:
The basic idea is:
The
InstalledLibraryInfoconstructor is modified so that theGhcPkgIdof a main library is optional.MungedPackageIdentifier, rather thanPackageIdentifier, is used for munged package identifiers - that is, the package identifiers of installed packages.A
ConfigCacheTypeFlagLibraryvalue is, like aConfigCacheTypeFlagExecutablevalue, based on the package identifier (rather than the 'GhcPkgId' of the main library, which may not be present)fetchAndMarkInstalledPackageallows for the absence of a buildable main library but the presence of sublibraries.Two integration tests are added, one dealing with
custom-setupdependencies.Please also shortly describe how you tested your change. Bonus points for added tests!