ci: enforce the name equality rules/mcpp.toml calls load-bearing - #7
Merged
Conversation
rules/mcpp.toml states that the package name and the module name are kept EQUAL, and that this is what makes the package work on every engine rather than on the newest one. Nothing enforced it. The check next to this one compares the three versions, which is a different invariant. mcpp before 2026.8.29.1 registers a host module under the dependency's `package.name`; from that release it uses the name the interface declares. Only equality satisfies both. The break is asymmetric, so one compiler cannot reveal it: renaming either alone still builds under GCC, which locates a BMI by its declared name through gcm.cache, and fails under Clang and MSVC, which are handed an explicit `<name>=<bmi>` mapping built from the registered name. A consumer on an older engine would see this package work on one compiler and not on the others. Both names are read in a single awk rather than a `sed | head -1` pipeline, so a successful match cannot be reported as 141 through SIGPIPE under `pipefail`, and an empty result fails instead of passing -- an extractor that matched nothing would otherwise report success on a file it never parsed. Comment lines begin with `#` and match neither pattern, so the prose in this very file that explains the rule cannot answer the assertion. Measured: passes on the current tree, red when the package name is changed, green again once restored.
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.
rules/mcpp.tomlstates that the package name and the module name are keptEQUAL, and that this is what makes the package work on every engine rather
than on the newest one. Nothing enforced it — the check beside this one
compares the three versions, which is a different invariant.
mcpp before 2026.8.29.1 registers a host module under the dependency's
package.name; from that release it uses the name the interface declares.Only equality satisfies both.
The break is asymmetric, so a single compiler cannot reveal it: renaming
either name alone still builds under GCC, which locates a BMI by its declared
name through
gcm.cache, and fails under Clang and MSVC, which are handed anexplicit
<name>=<bmi>mapping built from the registered name.What the check avoids
sed | head -1: underpipefailthe writer can take SIGPIPE and report141 for a successful match. Both names are read in one
awk.#and match neither pattern, so the prose in thisfile that explains the rule cannot answer the assertion.
Measurement
package.namechangedThe same guard is proposed for
mcpplibs/clangtidyin its PR #1.