Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icu_datagen dependency conflicts when installing #4088

Closed
mhatzl opened this issue Sep 24, 2023 · 5 comments
Closed

icu_datagen dependency conflicts when installing #4088

mhatzl opened this issue Sep 24, 2023 · 5 comments
Labels
C-data-infra Component: provider, datagen, fallback, adapters R-fixed-elsewhere Resolution: issue was fixed outside the core repo

Comments

@mhatzl
Copy link

mhatzl commented Sep 24, 2023

There seem to be version conflicts between 1.2.0 and 1.3.0 versions.
Specifically, crates depending on zerovec versions 0.9.4 and 0.10.0.

Because versions are not pinned for icu_datagen as far as I can see,
internally some crates get set to 1.2.0 versions, while others to 1.3.0.
Trying to install icu_datagen using cargo install results in the following errors:

impl TrieValue for GeneralCategoryGroup {
    |                    ^^^^^^^^^^^^^^^^^^^^ the trait `zerovec::ule::AsULE` is not implemented for `props::GeneralCategoryGroup`
    |
    = help: the following other types implement trait `zerovec::ule::AsULE`:
              (A, B)
              (A, B, C)
              (A, B, C, D)
              (A, B, C, D, E)
              (A, B, C, D, E, F)
              NonZeroI8
              NonZeroU8
              Option<T>
            and 17 others
note: required by a bound in `TrieValue`
pub trait TrieValue: Copy + Eq + PartialEq + zerovec::ule::AsULE + 'static {
    |                                              ^^^^^^^^^^^^^^^^^^^ required by this bound in `TrieValue`

Note: There are many more errors, but the problem should be the same as far as I saw.

I assume that this gets resolved once icu_datagen version 1.3.0 is released.
However, this version conflict may happen again, because versions are now set to workspace = true,
and I don't know if that pins those versions.

@jedel1043
Copy link
Contributor

This issue is also probably related: boa-dev/boa#3299

@sffc
Copy link
Member

sffc commented Sep 26, 2023

The 1.3 rollout took about 48 hours to finish; we did it over the weekend in an attempt to reduce the impact of errors like these. Can you confirm if this is still an issue?

Note:

  • Installing ICU4X 1.3 should work
  • ICU4X 1.2 should continue to work if it was created from a lockfile before 1.3 was released
  • Unfortunately icu = "=1.2" does not resolve correctly using the default Cargo dependency resolver. To fix it, please manually make sure all icu crates are on 1.2 and zerovec is on 0.9 in the lockfile. You may need to run cargo update to pin specific versions of things.
  • ICU4X 1.3 should not have this same type of problem because it uses ~ dependencies between components so installing icu =1.3 won't get a mix of 1.3 and 1.4 components, for example.

@sffc
Copy link
Member

sffc commented Sep 26, 2023

I published a detailed postmortem of what happened and why: #4093

Closing this issue because I don't see what else needs to be done. If anyone is still having problems, the postmortem is a good place to start.

@sffc sffc closed this as completed Sep 26, 2023
@sffc sffc added R-fixed-elsewhere Resolution: issue was fixed outside the core repo C-data-infra Component: provider, datagen, fallback, adapters labels Sep 26, 2023
@mhatzl
Copy link
Author

mhatzl commented Sep 26, 2023

Thanks for the fast reply.

Installing icu_datagen 1.3.0 worked for me.
However, installing 1.2.5 is not possible, because it takes 1.3.0 versions of icu crates internally.

Pinning icu crates in my own crate works.
I went through the lockfile until all icu crates had 1.2.0,
and depend on zerovec 0.9.x`.

Unfortunately, I cannot pin versions for icu_datagen,
because I install it as binary using cargo install.

I think to resolve this, you have to pin the versions on your side.
For icu_datagen this might be the best solution to prevent incompatibilities in the future.
As far as I understood, it is important to match icu_datagen with the versions used in a crate
to get correct providers.

In my project I currently only use the GraphemeSegmenter,
and with 1.3.0 there is the new() function so this is solved for me.

@sffc
Copy link
Member

sffc commented Sep 26, 2023

Yes, starting in 1.3 we pin the minor version which should help mitigate these types of problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-data-infra Component: provider, datagen, fallback, adapters R-fixed-elsewhere Resolution: issue was fixed outside the core repo
Projects
None yet
Development

No branches or pull requests

3 participants