Skip to content

Fix #6896 Allow dependency package to have no main library#6928

Merged
mpilgrem merged 4 commits into
masterfrom
re6896
Jun 7, 2026
Merged

Fix #6896 Allow dependency package to have no main library#6928
mpilgrem merged 4 commits into
masterfrom
re6896

Conversation

@mpilgrem

@mpilgrem mpilgrem commented Jun 2, 2026

Copy link
Copy Markdown
Member

See:

The basic idea is:

  • The InstalledLibraryInfo constructor is modified so that the GhcPkgId of a main library is optional.

  • MungedPackageIdentifier, rather than PackageIdentifier, is used for munged package identifiers - that is, the package identifiers of installed packages.

  • 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)

  • fetchAndMarkInstalledPackage allows for the absence of a buildable main library but the presence of sublibraries.

Two integration tests are added, one dealing with custom-setup dependencies.

  • Any changes that could be relevant to users have been recorded in ChangeLog.md.
  • The documentation has been updated, if necessary

Please also shortly describe how you tested your change. Bonus points for added tests!

@mpilgrem mpilgrem marked this pull request as draft June 2, 2026 22:55
@mpilgrem mpilgrem force-pushed the re6896 branch 5 times, most recently from 62c6cd6 to 2dd86fa Compare June 5, 2026 23:33
mpilgrem added 4 commits June 7, 2026 22:22
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.
@mpilgrem mpilgrem marked this pull request as ready for review June 7, 2026 22:26
@mpilgrem mpilgrem merged commit e6170f1 into master Jun 7, 2026
13 checks passed
@mpilgrem mpilgrem deleted the re6896 branch June 7, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant