Repository navigation
[crater] suppress git SHA in name table version / clear cache when otl-normalizer changes - #2138
Merged
Merged
Conversation
wmedrano
approved these changes
Sep 9, 2026
fontc stamps its `git describe` version into name ID 5 of every font it builds. crater only runs when fontc's rev has changed, so that string differed on every run, which meant that the strategy of skipping the comparison when fontc's output was unchanged didn't work, since the output was never unchanged. (It worked locally, because build.rs is not rerun when HEAD moves.) vergen uses VERGEN_GIT_DESCRIBE as an override when it is set, and version_string already maps the VERGEN_IDEMPOTENT_OUTPUT sentinel back to the crate version -- the tested git-less path that `cargo install` takes. Setting it when crater builds fontc stamps a stable `;fontc 1.0.0`. This also adds a new field to the run summary that counts the number of targets for which fontc's output was identical, which will be useful for future debuging.
We were clearing when ttx-diff changes, but we want to also clear when otl-normalizer changes, sicne the cache stores the markkern output.
cmyr
force-pushed
the
crater-stable-fontc-version
branch
from
September 10, 2026 02:29
9de0c11 to
d5cccae
Compare
Member
|
Thanks for the heads up
Yes I do #2139 |
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.
Two commits.
I added logic in #2114 to check when a font generated by fontc was identical to a previous build, so we could skip comparison in that case; however this wasn't working in CI, because fontc stamps its version in the name table, and includes the current git sha. By definition, this sha is different between two crater runs, so the generated fonts were never identical.
This is fixed by suppressing the git bit of the version when building for crater.
@anthrotype an interesting bit of this is that it didn't reproduce locally, since build.rs does not rebuild just because HEAD moves. In CI, we're always cloning the repo from scratch and doing a clean build, so we always run build.rs, but locally it's possible for the sha in the version to be stale. Do we care? I think not, but wanted to at least bring it up.
(The second commit is boring, it just ensures we clear the cache if otl-normalizer has changes)