So I just synced our Chromium fork with Chromium 104.0.5112.81. When compiling debug version, am getting this hash collision error:
D:\workspace\workstream-browser\src>ninja -C out\debug chrome
ninja: Entering directory `out\debug'
[19/31600] ACTION //chrome/browser/metrics/variations:chrome_ui_string_overrider_factory_gen_sources(//build/toolchain/win:win_clang_x64)
FAILED: gen/chrome/browser/metrics/variations/ui_string_overrider_factory.h gen/chrome/browser/metrics/variations/ui_string_overrider_factory.cc
D:/workspace/depot_tools/bootstrap-2@3_8_10_chromium_23_bin/python3/bin/python3.exe ../../components/variations/service/generate_ui_string_overrider.py -Nchrome_variations -ogen -Hchrome/browser/metrics/variations/ui_string_overrider_factory.h -Schrome/browser/metrics/variations/ui_string_overrider_factory.cc gen/chrome/grit/chromium_strings.h gen/chrome/grit/generated_resources.h gen/chrome/grit/google_chrome_strings.h gen/components/strings/grit/components_chromium_strings.h gen/components/strings/grit/components_google_chrome_strings.h gen/components/strings/grit/components_strings.h
Traceback (most recent call last):
File "../../components/variations/service/generate_ui_string_overrider.py", line 307, in <module>
sys.exit(main())
File "../../components/variations/service/generate_ui_string_overrider.py", line 293, in main
source_file_content = _GenerateSourceFileContent(
File "../../components/variations/service/generate_ui_string_overrider.py", line 181, in _GenerateSourceFileContent
raise HashCollisionError(error_message)
__main__.HashCollisionError:
The following names, sorted by hash value, had hash collisions (One possible cause: strings appear in different orders for Chrome and Chromium):
hash: 37524341, name: IDS_BLUETOOTH_DEVICE_CHOOSER_AUTHORIZE_BLUETOOTH
hash: 37524341, name: IDS_BLUETOOTH_DEVICE_CHOOSER_AUTHORIZE_BLUETOOTH
hash: 69582996, name: IDS_USER_MANAGER_TUTORIAL_SLIDE_YOUR_CHROME_TEXT
hash: 69582996, name: IDS_USER_MANAGER_TUTORIAL_SLIDE_YOUR_CHROME_TEXT
hash: 79457408, name: IDS_CRITICAL_NOTIFICATION_TITLE
hash: 79457408, name: IDS_CRITICAL_NOTIFICATION_TITLE
hash: 171202748, name: IDS_PRIVACY_SANDBOX_DIALOG_CONSENT_BOTTOM_SUMMARY
hash: 171202748, name: IDS_PRIVACY_SANDBOX_DIALOG_CONSENT_BOTTOM_SUMMARY
hash: 214121129, name: IDS_CHROME_CLEANUP_PROMPT_EXPLANATION
hash: 214121129, name: IDS_CHROME_CLEANUP_PROMPT_EXPLANATION
hash: 270654360, name: IDS_INBOUND_MDNS_RULE_NAME_CANARY
hash: 270654360, name: IDS_INBOUND_MDNS_RULE_NAME_CANARY
hash: 294839169, name: IDS_PRIVACY_SANDBOX_DIALOG_CONSENT_LEARN_MORE_SECTION_1_BULLET_POINT_1
hash: 294839169, name: IDS_PRIVACY_SANDBOX_DIALOG_CONSENT_LEARN_MORE_SECTION_1_BULLET_POINT_1
hash: 314687769, name: IDS_CONTENT_CONTEXT_ACCESSIBILITY_LABELS_BUBBLE_TEXT_ONCE
hash: 314687769, name: IDS_CONTENT_CONTEXT_ACCESSIBILITY_LABELS_BUBBLE_TEXT_ONCE
hash: 319649951, name: IDS_RUN_RECOVERY
hash: 319649951, name: IDS_RUN_RECOVERY
hash: 352041846, name: IDS_PRIVACY_SANDBOX_DIALOG_CONSENT_LEARN_MORE_SECTION_2_BULLET_POINT_2
hash: 352041846, name: IDS_PRIVACY_SANDBOX_DIALOG_CONSENT_LEARN_MORE_SECTION_2_BULLET_POINT_2
hash: 467740844, name: IDS_USER_MANAGER_TUTORIAL_SLIDE_INTRO_TITLE
hash: 467740844, name: IDS_USER_MANAGER_TUTORIAL_SLIDE_INTRO_TITLE
hash: 552489421, name: IDS_PROFILE_PICKER_MAIN_VIEW_TITLE_V2
hash: 552489421, name: IDS_PROFILE_PICKER_MAIN_VIEW_TITLE_V2
hash: 562495006, name: IDS_RELAUNCH_REQUIRED_TITLE_SECONDS
hash: 562495006, name: IDS_RELAUNCH_REQUIRED_TITLE_SECONDS
hash: 609764378, name: IDS_APP_SHORTCUTS_SUBDIR_NAME_CANARY
hash: 609764378, name: IDS_APP_SHORTCUTS_SUBDIR_NAME_CANARY
...
The list is very long, so I have just posted some. The reason its happening is because those names are by default defined in both
\src\chrome\app\google_chrome_strings.grd and \src\chrome\app\chromium_strings.grd
Never came across this issue before. I have tried to modify grit files etc but keep getting some other error messages later related to this issue. So may I know how can I tackle this issue?
Thanks