Skip to content

Write manifest of pre-build rule monitored files#11776

Open
sheaf wants to merge 1 commit intohaskell:masterfrom
sheaf:hooks-monitor-manifest
Open

Write manifest of pre-build rule monitored files#11776
sheaf wants to merge 1 commit intohaskell:masterfrom
sheaf:hooks-monitor-manifest

Conversation

@sheaf
Copy link
Copy Markdown
Collaborator

@sheaf sheaf commented May 4, 2026

Companion to HLS PR #4923.

After executing pre-build rules for a component, cabal-install now writes a manifest file to the pre-build-monitors file in the component's build directory.

This manifest contains:

  1. The files that are monitored by the pre-build rules computation. When any of these change, we need to re-run the computation of pre-build rules.
  2. File dependencies of the pre-build rules. When any of these change, we need to re-run rules (the recompilation checking logic will take care to only re-run stale rules).
  3. Rule outputs, i.e. files generated by the pre-build rules.

Writing this information to a file makes it available to external tools such as HLS, without needing to link against the Cabal library. This allows external tools to know when to re-run the pre-build rules.


Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:

@sheaf sheaf force-pushed the hooks-monitor-manifest branch 4 times, most recently from 2a320ca to dacb056 Compare May 4, 2026 15:11
After executing pre-build rules for a component, `cabal-install` now
writes a manifest file to the `pre-build-monitors` file in the
component's build directory.

This manifest contains:

  1. The files that are monitored by the pre-build rules computation.
     When any of these change, we need to re-run the computation of
     pre-build rules.
  2. File dependencies of the pre-build rules. When any of these change,
     we need to re-run rules (the recompilation checking logic will take
     care to only re-run stale rules).
  3. Rule outputs, i.e. files generated by the pre-build rules.

Writing this information to a file makes it available to external tools
such as HLS, without needing to link against the Cabal library.
This allows external tools to know when to re-run the pre-build rules.
@sheaf sheaf force-pushed the hooks-monitor-manifest branch from dacb056 to 45e9e27 Compare May 4, 2026 15:25
@sheaf sheaf marked this pull request as ready for review May 4, 2026 18:19
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