Avoid unnecessary rebuilding when running doctests#5688
Avoid unnecessary rebuilding when running doctests#5688neilmayhew wants to merge 1 commit intomasterfrom
Conversation
| # Build the packages | ||
| echo "***** cabal build ${PACKAGES[*]:-all} *****" | ||
| cabal build "${PACKAGES[@]:-all}" | ||
|
|
There was a problem hiding this comment.
This isn't necessary for avoiding rebuilding, and is just a useful safety feature for when the script is used outside of CI.
| cabal doctest --repl-options='-w -Wdefault' "${ARGS[@]}" | ||
| cabal doctest "${ARGS[@]}" |
There was a problem hiding this comment.
It seems that this was tripping cabal up and making it think modules needed to be rebuilt. cabal-doctest now sets these options anyway, so we don't need them here.
There was a problem hiding this comment.
My previous investigation (using claude) about this was that cabal is producing only .o files and not the shared .dyn_o needed by doctest, and the proposed solution was adding shared: True to cabal.project. This does affect all users too but it also means we can run doctest locally before pushing commits to make sure they pass, without having to rebuild the packages. The only concern I haven't looked into is whether the caches carry over to the intended stage of the pipeline (viz. cabal build all... -> cabal doctest). I may be completely wrong about this.
|
I am not sure if it actually helped, cause running doctests still results in bunch of modules getting rebuild |
Description
Closes #5685
Checklist
CHANGELOG.mdfiles updated for packages with externally visible changes.NOTE: New section is never added with the code changes. (See RELEASING.md).
.cabalandCHANGELOG.mdfiles when necessary, according to theversioning process.
.cabalfiles updated when necessary.NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
scripts/fourmolize.sh).scripts/cabal-format.sh).scripts/gen-cddl.sh)hie.yamlupdated (usescripts/gen-hie.sh).