Skip to content

Add Swift deterministic hashing to the environment variables passed to all actions generated by the Apple rules.#2918

Open
adincebic wants to merge 2 commits intomainfrom
adin/cp-878dd666e24189fa13a715995f702f10aa478795
Open

Add Swift deterministic hashing to the environment variables passed to all actions generated by the Apple rules.#2918
adincebic wants to merge 2 commits intomainfrom
adin/cp-878dd666e24189fa13a715995f702f10aa478795

Conversation

@adincebic
Copy link
Copy Markdown
Contributor

In certain controlled environments, such as executing tools in exec config, it may be helpful to selectively disable hash seed randomization, so that hash values and the order of elements in set and dictionary values remain consistent across executions. We disable hash seed randomization by defining the environment variable SWIFT_DETERMINISTIC_HASHING with the value of 1. The Swift runtime looks at this variable during process startup and, if it’s defined, replaces the random seed with a constant value. (SE-0206)

(cherry picked from commit 878dd666e24189fa13a715995f702f10aa478795)

…o all actions generated by the Apple rules.

PiperOrigin-RevId: 899285959
(cherry picked from commit 878dd66)
@adincebic adincebic changed the title Add Swift deterministic hashing to the environment variables passed t… Add Swift deterministic hashing to the environment variables passed to all actions generated by the Apple rules. Apr 15, 2026
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.

2 participants