Skip to content

hadrian: improve dependency tracking for the check-* programs

The code in Rules.Register responsible for finding all the build artifacts that Cabal installs when registering a library (static/shared libs, .hi files, ...) was looking in the wrong place. This patch fixes that logic and makes sure we gather all those artifacts in a list to declare that the rule for a given .conf file, our proxy for "Hadrian, please install this package in the package db for this stage", also produces those artifacts under the said package database.

We also were completely missing some logic to declare that the check-* programs have dependencies besides their source code, at least when testing an in-tree compiler.

Finally, this patch also removes redundant packages from 'testsuitePackages', since they should already be covered by the stagePackages lists from Settings.Default.

With this patch, after a complete build and freezing stage 1, running the test target after a change to compiler/parser/Parser.y results in rebuilding the ghc lib, reinstalling it, and rebuilding the few programs that depend on it, including check-ppr and check-api-annotations (therefore fixing #17273 (closed)).

Edited by Alp Mestanogullari

Merge request reports