Skip to content

Conversation

@neilmayhew
Copy link
Contributor

@neilmayhew neilmayhew commented Dec 23, 2025

Description

Move blst_util.h from install-includes to extra-source-files

This avoids using the deprecated includes field and is more consistent with what we do in other packages. The only reason to put it in install-includes is for client code to be able to use it, but we want client code to use the Haskell bindings and not the C bindings.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages.
    New section is never added with the code changes. (See RELEASING.md)
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated.
    If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • Self-reviewed the diff

@neilmayhew neilmayhew requested a review from lehins as a code owner December 23, 2025 19:21
This avoids using the deprecated `includes` field and is more consistent
with what we do in other packages. The only reason to put it in
`install-includes` is for client code to be able to use it, but we want
client code to use the Haskell bindings and not the C bindings.
@neilmayhew neilmayhew force-pushed the nm/fix-multiple-definitions branch from f12c804 to f4dc539 Compare December 23, 2025 21:30
@neilmayhew neilmayhew changed the title Fix multiple-definition link errors Move blst_util.h from install-includes to extra-source-files Dec 23, 2025
@neilmayhew neilmayhew enabled auto-merge December 23, 2025 21:31
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

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

@perturbing As it turns out:

  • in order for .h files to be used in a Haskell project they need to be included in the extra-source-files
  • in order for .h files to be usable outside of the project by some dependency then instead it needs to be included in install-includes
  • includes is a long deprecated cabal field that was only need for ghc < 6.12

So, this PR fixes all of those issues.
We'll wait for your review before, merging this PR, but @neilmayhew and I felt like there is no need to make those custom size definitions from the header file available to the outside world, since there are more usable Haskell alternatives that are provided by BLS interface at the type level.

@lehins lehins requested a review from perturbing December 23, 2025 21:48
@neilmayhew neilmayhew merged commit 6974b70 into master Dec 23, 2025
22 checks passed
@neilmayhew neilmayhew deleted the nm/fix-multiple-definitions branch December 23, 2025 22:06
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.

4 participants