Skip to content

Ensure deterministic output - #883

Merged
ExNDY merged 3 commits into
icerockdev:developfrom
bwitt:deterministic-builds
Sep 2, 2026
Merged

Ensure deterministic output#883
ExNDY merged 3 commits into
icerockdev:developfrom
bwitt:deterministic-builds

Conversation

@bwitt

@bwitt bwitt commented Jul 8, 2026

Copy link
Copy Markdown

Fix a few things that were preventing determinism:

  • Sort filesystem-derived collections so that the output is deterministic
  • fix a couple hashCode() calls to use String.hashCode() which is deterministic vs object.hashCode() which is not

Also add tests

Fixes #882

@bwitt

bwitt commented Jul 8, 2026

Copy link
Copy Markdown
Author

@owenlejeune can you check if this fixes it for you? not sure I'm testing this right.

@Alex009
Alex009 changed the base branch from master to develop July 10, 2026 05:30
@owenlejeune

Copy link
Copy Markdown

i'd be happy to test a version with this integrated!

@bwitt

bwitt commented Jul 23, 2026

Copy link
Copy Markdown
Author

@Alex009 what's a good way to do a dev build of this so we can test?

@nubesurrealista

Copy link
Copy Markdown

How can I test and help with this? I have interest on this because my case is the same as #882

@owenlejeune

Copy link
Copy Markdown

@Alex009 just wanted to check in on any updates to this

@ExNDY

ExNDY commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Hi,
Can you add prove tests for this changes? Or your metrics "was/now"? I'm try something like this in #881, but i dont remember was saved changes for PR or not. I think on current time that can be profits, but need more info for future.

@ExNDY
ExNDY self-requested a review August 27, 2026 15:40
Signed-off-by: Brian Witt <brianwitt@gmail.com>
@bwitt
bwitt force-pushed the deterministic-builds branch from caa01eb to 7c7bd82 Compare August 27, 2026 23:21
@bwitt

bwitt commented Aug 27, 2026

Copy link
Copy Markdown
Author

@ExNDY added tests, how does that look? does not seem to run the tests here in CI though

@ExNDY ExNDY added this to the 0.27.0 milestone Sep 2, 2026
@ExNDY
ExNDY merged commit dede444 into icerockdev:develop Sep 2, 2026
37 checks passed
@bwitt
bwitt deleted the deterministic-builds branch September 2, 2026 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android Resource Generation is Not-Deterministic

5 participants