-
Notifications
You must be signed in to change notification settings - Fork 4.3k
build: WebKit → preview-pr-181-ebf11e28 #29250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+1
−1
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2c2b1ca
build: WebKit → preview-pr-181-e38dd2fc (Windows libpas/WTF resource …
Jarred-Sumner 6f011fb
build: WebKit → preview-pr-181-68e2ebfa (restore do_mprotect gate in …
Jarred-Sumner c63706b
build: WebKit → preview-pr-181-4596a6f6 (is_exiting flag for TLC tear…
Jarred-Sumner 7d5ca23
build: WebKit → preview-pr-181-ebf11e28 (fix pthread_once on Windows)
Jarred-Sumner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 The build diagnostic in config.ts uses cfg.webkitVersion.slice(0, 10) to emit a feature tag, but for the new preview-format version string "preview-pr-181-ebf11e28" this always produces "preview-pr" — identical for every preview PR build regardless of PR number or commit hash. The unique portion (PR number + 8-char hash) only starts at position 12+, so the 'forgot to revert my WebKit test branch' warning is now useless for preview builds; consider using the full version string or slicing from the end to capture the commit hash.
Extended reasoning...
What the bug is and how it manifests
The build diagnostic in config.ts (line 797) pushes a feature tag via
features.push(webkit-version:${cfg.webkitVersion.slice(0, 10)}). For the previous 40-char SHA format (e.g.42f80a684c5df57121a97e20825a3bcab7a0741b),slice(0, 10)yielded42f80a684c— 10 hex digits providing enough uniqueness to tell builds apart at a glance. Now with the new preview-style version string"preview-pr-181-ebf11e28", the sameslice(0, 10)always yields"preview-pr"— independent of PR number or commit hash.The specific code path that triggers it
config.ts:797 is guarded by
cfg.webkitVersion \!== versionDefaults.webkitVersion, so it only fires when a developer overrides via--webkit-version=<value>. Any override using a preview-format string (e.g.--webkit-version=preview-pr-181-ebf11e28or--webkit-version=preview-pr-182-abc12345) will push the identical tag"webkit-version:preview-pr"into the build features list.Why existing code doesn't prevent it
The
slice(0, 10)was designed assuming a 40-char hex SHA as input, where the first 10 hex chars captured ~40 bits of unique entropy. The preview formatpreview-pr-NNN-XXXXXXXXhas its unique payload (PR number at position 11-13, 8-char commit hash at positions 16-23) entirely beyond the 10-char window. There is no validation or normalization at the point where the slice is taken.What the impact would be
Developers who accidentally leave
WEBKIT_VERSIONset to a preview build cannot be warned by the usual mechanism — all preview builds show the samewebkit-version:preview-prtag in build summaries. The intent of this diagnostic (per the comment: 'show a short hash so you catch forgot to revert my WebKit test branch') is completely defeated. Two different preview builds from different PRs or different commits are indistinguishable in CI build output.How to fix it
Replace the fixed
slice(0, 10)with something that captures the unique suffix regardless of format. Options include: (a) use the full version string if short enough, (b) take the last N characters (e.g.slice(-16)captures the PR number and full commit hash for preview strings while still giving 16 chars of a SHA), or (c) detect the preview format and handle it separately.Step-by-step proof
WEBKIT_VERSION = "preview-pr-181-ebf11e28".--webkit-version=preview-pr-181-ebf11e28(or any otherpreview-pr-*value)."preview-pr-181-ebf11e28".slice(0, 10)→"preview-pr"."webkit-version:preview-pr".--webkit-version=preview-pr-999-ffffffff."preview-pr-999-ffffffff".slice(0, 10)→ also"preview-pr".webkit-version:preview-prtags — zero diagnostic signal.