-
Notifications
You must be signed in to change notification settings - Fork 696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix assertion failure when combining build-tool-depends and --enable-documentation #9446
Conversation
cc7f455
to
b519ddf
Compare
b519ddf
to
6ebb279
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
BTW, the CI failure looks like a server filesystem or network issue, so let me rebase to restart it... |
@mergify rebase |
✅ Branch has been successfully rebased |
75ea384
to
82afa90
Compare
I accidentally force pushed to the wrong branch, should be fixed now. |
Time for the merge label? |
This got stuck due to changes CI mandatory tests rule. Rebasing... |
@mergify rebase |
✅ Branch has been successfully rebased |
…documentation The `setDocumentation` function was modifying the elaborated package after the hash was computed. This led to the assertion failing as the computed hash was different to what was computed in the initial install plan. Therefore in order to fix this we either needed to: 1. Set elabBuildHaddocks = False at the point where the hash is initially computed. 2. Verify that elabBuildHaddocks = True will not lead to unexpected results. The latter has been implemented. The elabBuildHaddocks option is only consulted in `hasValidHaddockTargets`, at which point documentation building the executable component is disabled because elabHaddockExecutables is False. In the added test we ensure this by checking that we didn't build documentation for the executable which is built because of build-tool-depends. Fixes haskell#6006 haskell#8313
Fix assertion failure when combining build-tool-depends and --enable-documentation
The
setDocumentation
function was modifying the elaborated packageafter the hash was computed. This led to the assertion failing as the
computed hash was different to what was computed in the initial install
plan.
Therefore in order to fix this we either needed to:
. Set elabBuildHaddocks = False at the point where the hash is
initially computed.
2 Verify that elabBuildHaddocks = True will not lead to unexpected
results.
The latter has been implemented.
The elabBuildHaddocks option is only consulted in
hasValidHaddockTargets
, at which point documentation building theexecutable component is disabled because elabHaddockExecutables is
False.
In the added test we ensure this by checking that we didn't build
documentation for the executable which is built because of
build-tool-depends.
Fixes #6006 #8313