Repository navigation
Count link-only targets' external libraries in the link-closure check - #45
Open
anakanemison wants to merge 1 commit into
Open
anakanemison wants to merge 1 commit into
anakanemison wants to merge 1 commit into
Conversation
The differ checks external link dependencies (-lz, -lhdf5, ...) as a project-wide union over PRODUCTION targets. A target that compiles nothing of its own is an AGGREGATE and is left out, and in a Bazel migration nearly every cc_shared_library is one: its sources live in the cc_library targets it wraps, and the external libraries it links appear only on its own link line. So a library linked only by a shared library read as missing although it was there. Found by an agent migrating QGIS in any2bazel-lab: its own diff ended with seven missing_dep errors (crypto, curl, dl, hdf5, netcdf, pthread, sz), which it traced to provider_mdal, a cc_shared_library classified as an aggregate. The lab confirmed the seven are on that target's Bazel link line. Link-only targets now take part in the external-dependency union on both sides, unless exclude_targets drops them. Their translation units are still compared through the libraries they wrap. Run over the stored models of the 42 migrations the lab has judged, each with its agent's own config, this removes exactly those seven errors and changes nothing else. (One earlier QGIS model is unreadable to both versions.) The next QGIS migration, with this change, converged. Lab-Proposal: P26 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 10 of 23 of a stacked series (tracking issue: #35). Based on
U09-link-interface-flags, the previous part: review and merge that first.Kind: fix. Lab proposal: P26.
What the migration runs showed
On qgis, seven libraries linked only by a
cc_shared_libraryread asmissing_depalthough they were on its link line. On every stored model of 42 judged runs this removes exactly those seven errors and changes nothing else.The change
The differ checks external link dependencies (-lz, -lhdf5, ...) as a
project-wide union over PRODUCTION targets. A target that compiles nothing
of its own is an AGGREGATE and is left out, and in a Bazel migration nearly
every cc_shared_library is one: its sources live in the cc_library targets
it wraps, and the external libraries it links appear only on its own link
line. So a library linked only by a shared library read as missing although
it was there.
Found by an agent migrating QGIS in any2bazel-lab: its own diff ended with
seven missing_dep errors (crypto, curl, dl, hdf5, netcdf, pthread, sz),
which it traced to provider_mdal, a cc_shared_library classified as an
aggregate. The lab confirmed the seven are on that target's Bazel link line.
Link-only targets now take part in the external-dependency union on both
sides, unless exclude_targets drops them. Their translation units are still
compared through the libraries they wrap.
Run over the stored models of the 42 migrations the lab has judged, each
with its agent's own config, this removes exactly those seven errors and
changes nothing else. (One earlier QGIS model is unreadable to both
versions.) The next QGIS migration, with this change, converged.
Testing
pytest tests/at this commit: 196 passed (130 onmain).🤖 Generated with Claude Code