Filter v1 symbols in API compatibility report for unstable ABI #1458
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.
Prompted by #1447:
Updates the abi-compliance-check script so that v1 API is not reported as part of the unstable ABI (v_noabi) API compatibility report. Although only
/v_noabi/headers are being included for analysis, because they transitively include/v1/headers,v1namespace entities are being included in the unstable ABI's API compatibility report. Furthermore, it unfortunately seems the namespaces must be listed relative to the root namespace:According to Perl docs,
\Amatches the "beginning of string" and\Zmatches the "end of string". Therefore, a<skip_namespace>entry likebsoncxx::v1will match (all relative to the root namespace) bothbsoncxx::v1andbsoncxx::v1::foo, but it will not matchfoo::bsoncxx::v1. It also seems the XML descriptors do not support reopening XML tags (i.e.<skip_namespaces>); therefore, the XML file generation is updated accordingly to support both stable vs. unstable and old vs. new properly.There remains a confusing set of supposed potential API breaking changes to constructors in the API compatibility report for #1447, e.g. concerning
v_noabi::types::bson_value::value:"Removed Symbols":
"Problems with Symbols, Medium Severity":
I do not understand what is causing these "Removed" and "Changed" entries to be reported. As far as I can tell, these are related to the inlining of previously-exported constructors, which however should not be considered an API breaking change (though it is of course an ABI breaking change).
The "removed" symbols are being reported as "parameter type changed" entries whose resulting mangled name is completely identical to the removed entry (there is no change in parameter types):
It is possible these are compiler internal representation details being misinterpreted as significant API breaking changes (failure to recognized the old vs. new symbols are the same)...? In other words, I do not believe these to be significant.
Note
The "[CN]" and "[DN]" alongside ctor/dtor symbols in the report where
Nis an integer are explained by the Itanium ABI specification concerning ctor/dtor mangling:and concerning "optional":
Unrelated to changes in #1447, there is also this entry in the API compatibility report:
I do not understand what is causing this entry to be emitted either. I am unable to filter out this entry by adding
stdto<skip_namespaces>, and I'm not sure it's supposed be reported in the first place due to being an entity provided by a system header, thus it is not included in this PR. Given this is concerning the instantiation of a template whose definition should be visible (+ not owned by us anyways), I do not believe this is a significant issue either.