Skip to content

Relax mozjs_icu_normalizer's icu_properties requirement - #836

Merged
sagudev merged 1 commit into
servo:mainfrom
rockwotj:normalizer-drop-icu-properties
Oct 29, 2026
Merged

sagudev merged 1 commit into
servo:mainfrom
rockwotj:normalizer-drop-icu-properties

Conversation

@rockwotj

@rockwotj rockwotj commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

SpiderMonkey never enables the normalizer's optional icu_properties
dependency, but Cargo still locks optional dependencies that weak
icu_properties?/... features refer to. Its ~2.1.1 requirement then
pins icu_properties for every crate that depends on mozjs, so a crate
that also needs ICU4X 2.2 or later (for example through icu_collator)
fails to resolve, even with the intl feature off.

update.py now rewrites the requirement to a caret 2.1.1 when it
extracts the crate.

Testing: We're using this at Tasklet in a WASM build to successfully
run mozjs, this is needed because we have another crate that uses
ICU but the versions conflict.

@rockwotj
rockwotj force-pushed the normalizer-drop-icu-properties branch from 90182d5 to bf33637 Compare October 26, 2026 17:49
@sagudev

sagudev commented Oct 26, 2026

Copy link
Copy Markdown
Member

Would it be enough to just relax the version requirement here, because as far as I can tell we still use it

via other crates, but I guess they are not problematic because of less strict semver?

@rockwotj

rockwotj commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Ah yes relaxing it works too. I'll push a fix to do that. I'm compiling without the intl feature so the properties_glue dependency never resolved, but I'm happy to just relax as that works around the conflicts

@rockwotj
rockwotj force-pushed the normalizer-drop-icu-properties branch from bf33637 to 1573cd0 Compare October 26, 2026 18:08
@sagudev

sagudev commented Oct 26, 2026

Copy link
Copy Markdown
Member

We need to test this in servo before landing too as some earlier experiments showed problems #831 (comment)

@rockwotj rockwotj changed the title Drop the unused icu_properties dependency from mozjs_icu_normalizer Relax mozjs_icu_normalizer's icu_properties requirement Oct 26, 2026
@rockwotj

Copy link
Copy Markdown
Contributor Author

We need to test this in servo before landing too as some earlier experiments showed problems #831 (comment)

BTW this only changes the version requirement if the intl feature is off - which servo has the feature on so it's still pinned to the existing version

@rockwotj

Copy link
Copy Markdown
Contributor Author

We need to test this in servo before landing too as some earlier experiments showed problems #831 (comment)

BTW this only changes the version requirement if the intl feature is off - which servo has the feature on so it's still pinned to the existing version

To verify this I pulled servo and pointed it to this commit and the lockfile is unchanged after regeration, so this only helps folks like me who disable intl and now the version isn't pinned

@rockwotj
rockwotj force-pushed the normalizer-drop-icu-properties branch from 222cd38 to 352f84f Compare October 28, 2026 03:37
@rockwotj

Copy link
Copy Markdown
Contributor Author

Gentle ping

@sagudev sagudev left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but needs rebase otherwise we cannot land it.

We have no machinery to bump mozjs-extracted-crates versions (cuz integrity check) so we need to wait for new SpiderMonkey bump that will also do the release.

SpiderMonkey never enables the normalizer's optional icu_properties
dependency, but Cargo still locks optional dependencies that weak
`icu_properties?/...` features refer to. Its `~2.1.1` requirement then
pins icu_properties for every crate that depends on mozjs, so a crate
that also needs ICU4X 2.2 or later (for example through icu_collator)
fails to resolve, even with the intl feature off.

update.py now rewrites the requirement to a caret `2.1.1` when it
extracts the crate.

Signed-off-by: Tyler Rockwood <rockwotj@gmail.com>
@sagudev
sagudev force-pushed the normalizer-drop-icu-properties branch from 352f84f to b6549e1 Compare October 29, 2026 05:28
@sagudev
sagudev enabled auto-merge (squash) October 29, 2026 05:30
@sagudev
sagudev merged commit 2a3b079 into servo:main Oct 29, 2026
45 checks passed
@rockwotj
rockwotj deleted the normalizer-drop-icu-properties branch October 29, 2026 10:49
@rockwotj

Copy link
Copy Markdown
Contributor Author

thanks all!

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