Skip to content

Commit 69ac672

Browse files
3apdanielleadams
authored andcommitted
build: fix indeterminacy of icu_locales value
`icu_locales` is generated by joining values from `set` data structure. However, `set` doesn't guarantee an order, so the result of `icu_locales` is not determined. For example, the result value could be 'en,root' or 'root,en'. This fix makes it deterministic. The main reason of this fix is to restore the reproducibility of the build because the value of `icu_locales` is embedded into `node` binary. PR-URL: #42865 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Mestery <[email protected]>
1 parent 44b1090 commit 69ac672

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1654,7 +1654,7 @@ def icu_download(path):
16541654
o['variables']['icu_small'] = b(True)
16551655
locs = set(options.with_icu_locales.split(','))
16561656
locs.add('root') # must have root
1657-
o['variables']['icu_locales'] = ','.join(str(loc) for loc in locs)
1657+
o['variables']['icu_locales'] = ','.join(str(loc) for loc in sorted(locs))
16581658
# We will check a bit later if we can use the canned deps/icu-small
16591659
o['variables']['icu_default_data'] = options.with_icu_default_data_dir or ''
16601660
elif with_intl == 'full-icu':

0 commit comments

Comments
 (0)