Skip to content

Commit

Permalink
build: fix indeterminacy of icu_locales value
Browse files Browse the repository at this point in the history
`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 <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
  • Loading branch information
3ap authored and targos committed Jul 31, 2022
1 parent 72e9ca1 commit fba6e96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1662,7 +1662,7 @@ def icu_download(path):
o['variables']['icu_small'] = b(True)
locs = set(options.with_icu_locales.split(','))
locs.add('root') # must have root
o['variables']['icu_locales'] = ','.join(str(loc) for loc in locs)
o['variables']['icu_locales'] = ','.join(str(loc) for loc in sorted(locs))
# We will check a bit later if we can use the canned deps/icu-small
o['variables']['icu_default_data'] = options.with_icu_default_data_dir or ''
elif with_intl == 'full-icu':
Expand Down

0 comments on commit fba6e96

Please sign in to comment.