Skip to content

[ports] Initialize ICU source path early in get()#27019

Open
sbc100 wants to merge 1 commit into
emscripten-core:mainfrom
sbc100:fix-icu-cache-bug
Open

[ports] Initialize ICU source path early in get()#27019
sbc100 wants to merge 1 commit into
emscripten-core:mainfrom
sbc100:fix-icu-cache-bug

Conversation

@sbc100
Copy link
Copy Markdown
Collaborator

@sbc100 sbc100 commented May 28, 2026

Currently, icu_source_path is only initialized inside prepare_build(), which is deferred to the create_libicu_common creator.

If libicu_common is already cached, but other ICU libraries (like libicu_stubdata) are missing from the cache, the common creator is skipped. This results in prepare_build() never being called, leaving icu_source_path as None and causing subsequent builders to crash with a TypeError in os.path.join.

Fix this by initializing icu_source_path immediately at the top of get(), and removing the redundant prepare_build() logic.

Currently, icu_source_path is only initialized inside prepare_build(),
which is deferred to the `create_libicu_common` creator.

If `libicu_common` is already cached, but other ICU libraries (like
`libicu_stubdata`) are missing from the cache, the common creator is
skipped. This results in `prepare_build()` never being called, leaving
icu_source_path as None and causing subsequent builders to crash with a
TypeError in os.path.join.

Fix this by initializing icu_source_path immediately at the top of
get(), and removing the redundant prepare_build() logic.
@sbc100 sbc100 requested a review from kripken May 28, 2026 00:14
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.

1 participant