Skip to content

The drafter reads the units that feed the libraries a package installs: libcurl's tool and test units are not the library; the audit reads a join's field arm at its view type - #3555

Merged
ehartford merged 1 commit into
mainfrom
library-units
Nov 23, 2026

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

The units of a package. The drafter read every C unit in the build's compile commands. A package's build also compiles its tools and tests. For libcurl 8.23.0 that is the curl command and five test programs, six of whose units the build generates; in a configured tree they are not there, and counted as units of the package they voided proofs about library functions ("a unit of the package could not be read").

Now the units read are those that feed the libraries the package installs, taken from the build's own graph: the build <artifact>: <rule> <objects…> statement CMake's Ninja generator writes for each library, followed through the static libraries it links, matched to each compile command's object. When the graph does not answer (no build.ninja, no artifact for a library, a compile command with no object), every unit is read as before and the report says why.

On libcurl 8.23.0: "could not be read" goes from 25 report lines to 0; internal functions from 4008 to 3649. 14 functions remain blocked on the debug-callback field alone (#3124), and 11 now show their real reasons (CURLM and curl_mimepart are opaque).

Test: conan_facade_library_units_test (a library unit and a tool's missing generated unit, with and without a graph).

Found by the battery's self-audit on this change. count(if c: t.a else: t.b) into a &List[str] parameter is a valid program and runs correctly, but with analyze … audit:all reported both arms: "an expression lowered to an operand of another type (MIR &List[str], Sema List[str])". The lowering joins the two fields as views, as Sema decided, and recorded each arm beside the field's own type. The record now uses the view type Sema gave the arm, as the copy-out join's arm already does. Test: behav_join_of_fields_into_ref_param (2 violations before, 0 after).

Battery green (493 s); :release-checks green.

…s, by the build's own graph: libcurl's tool and test units are not the library. The audit reads a join's field arm at the view type Sema gave it
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