Fix non-deterministic placeholder resource ID assignment in Placehold…#482
Open
oliviernotteghem wants to merge 1 commit intobazelbuild:mainfrom
Open
Fix non-deterministic placeholder resource ID assignment in Placehold…#482oliviernotteghem wants to merge 1 commit intobazelbuild:mainfrom
oliviernotteghem wants to merge 1 commit intobazelbuild:mainfrom
Conversation
…erIdFieldInitializerBuilder Summary: Intent: - Fix non-deterministic placeholder resource ID assignment in R.java generation that caused remote cache misses and non-reproducible outputs across incremental builds. Changes: - Replace LinkedHashMap with TreeMap for styleableAttrs and per-styleable attr maps, ensuring deterministic sorted iteration regardless of resource merge order. - Simplify assignAttrIds() by removing the inline/non-inline partition, which was itself non-deterministic (a side effect of first-come-first-served ReferenceResolver.shouldInline/markInlined semantics). All attrs are now assigned IDs in sorted order. Test Plan: Verified repeated builds of //apps/presidio/uberlite:bin_debug with remote cache disabled produce identical resources.jar outputs across multiple clean builds with Claude. USE_LOCAL_BAZEL=1 ./bazelw build uberlite builds successfully end-to-end. Revert Plan: Revert this PR via `git revert <commit_sha>`. Jira Issues: --- <sub>Generated by the 🪄 [pr-create](https://sg.uberinternal.com/code.uber.internal/uber-code/devexp-agent-marketplace/-/blob/claude-code/plugins/dev/uber-dev/skills/pr-create/SKILL.md) skill in devexp-agent-marketplace</sub>
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.
…erIdFieldInitializerBuilder
Summary:
Intent:
Changes:
Test Plan:
Verified repeated builds of //apps/presidio/uberlite:bin_debug with remote cache disabled produce identical resources.jar outputs across multiple clean builds with Claude. USE_LOCAL_BAZEL=1 ./bazelw build uberlite builds successfully end-to-end.
Revert Plan:
Revert this PR via
git revert <commit_sha>.Jira Issues:
Generated by the 🪄 pr-create skill in devexp-agent-marketplace