Skip to content

Count link-only targets' external libraries in the link-closure check - #45

Open
anakanemison wants to merge 1 commit into
mschaller/u09-link-interface-flagsfrom
mschaller/u10-link-only-external-deps
Open

anakanemison wants to merge 1 commit into
mschaller/u09-link-interface-flagsfrom
mschaller/u10-link-only-external-deps

Conversation

@anakanemison

@anakanemison anakanemison commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

The external-dependency check covers production targets only, and a cc_shared_library that compiles nothing of its own is classed as an aggregate and left out, so a library linked only by it read as missing. Link-only targets now take part in the external-dependency union on both sides, unless excluded; their translation units are still compared through the libraries they wrap.

A QGIS agent in any2bazel-lab traced seven missing_dep errors to this. Over the stored models of 42 judged migrations, the change removes exactly those seven errors and nothing else, and the next QGIS migration converged.

Stacked on #44 (tracking issue: #35). pytest tests/: 186 passed (132 on main). Lab proposal: P26.

🤖 Generated with Claude Code

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>
@anakanemison
anakanemison force-pushed the mschaller/u10-link-only-external-deps branch from 98245b4 to fb65f42 Compare November 9, 2026 18:45
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