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

Latest update to tinystr breaks compilation #2428

Closed
Razican opened this issue Aug 20, 2022 · 8 comments
Closed

Latest update to tinystr breaks compilation #2428

Razican opened this issue Aug 20, 2022 · 8 comments
Assignees
Labels
C-meta Component: Relating to ICU4X as a whole S-small Size: One afternoon (small bug fix or enhancement) T-techdebt Type: ICU4X code health and tech debt

Comments

@Razican
Copy link

Razican commented Aug 20, 2022

I just tried to do a cargo update tinystr in Boa, after doing a cargo update and seeing that the whole project fails to compile. It turns out that the v0.6.0 -> v0.6.1 update of tinystr breaks the compilation of multiple icu crates:

Error log
$ cargo update -p tinystr
  Updating crates.io index
  Updating tinystr v0.6.0 -> v0.6.1
    Adding zerovec v0.8.1
$ cargo check
  Checking zerovec v0.8.1
  Checking tinystr v0.6.1
  Checking icu_locid v0.6.0
  Checking icu_provider v0.6.0
  Checking icu_provider_blob v0.6.0
  Checking icu_calendar v0.6.0
  Checking icu_plurals v0.6.0
  Checking icu_locale_canonicalizer v0.6.0
  Checking icu_testdata v0.6.0
error[E0277]: the trait bound `TinyAsciiStr<7_usize>: ZeroMapKV<'data>` is not satisfied in `AliasesV1<'data>`
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:47:21
  |
47  | #[derive(PartialEq, Clone, Default)]
  |                     ^^^^^ within `AliasesV1<'data>`, the trait `ZeroMapKV<'data>` is not implemented for `TinyAsciiStr<7_usize>`
  |
  = help: the following other types implement trait `ZeroMapKV<'a>`:
            (A, B)
            (A, B, C)
            (A, B, C, D)
            (A, B, C, D, E)
            (A, B, C, D, E, F)
            Language
            OptionVarULE<T>
            Region
          and 19 others
note: required because it appears within the type `AliasesV1<'data>`
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:64:12
  |
64  | pub struct AliasesV1<'data> {
  |            ^^^^^^^^^
note: required by a bound in `Clone`
 --> ~/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/clone.rs:110:18
  |
110 | pub trait Clone: Sized {
  |                  ^^^^^ required by this bound in `Clone`
  = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `TinyAsciiStr<7_usize>: ZeroMapKV<'data>` is not satisfied in `AliasesV1<'data>`
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:47:28
  |
47  | #[derive(PartialEq, Clone, Default)]
  |                            ^^^^^^^ within `AliasesV1<'data>`, the trait `ZeroMapKV<'data>` is not implemented for `TinyAsciiStr<7_usize>`
  |
  = help: the following other types implement trait `ZeroMapKV<'a>`:
            (A, B)
            (A, B, C)
            (A, B, C, D)
            (A, B, C, D, E)
            (A, B, C, D, E, F)
            Language
            OptionVarULE<T>
            Region
          and 19 others
note: required because it appears within the type `AliasesV1<'data>`
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:64:12
  |
64  | pub struct AliasesV1<'data> {
  |            ^^^^^^^^^
note: required by a bound in `Default`
 --> ~/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/default.rs:102:20
  |
102 | pub trait Default: Sized {
  |                    ^^^^^ required by this bound in `Default`
  = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `TinyAsciiStr<7_usize>: ZeroMapKV<'data>` is not satisfied in `AliasesV1<'data>`
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:49:38
  |
49  | #[cfg_attr(feature = "serde", derive(serde::Deserialize))]
  |                                      ^^^^^^^^^^^^^^^^^^ within `AliasesV1<'data>`, the trait `ZeroMapKV<'data>` is not implemented for `TinyAsciiStr<7_usize>`
  |
  = help: the following other types implement trait `ZeroMapKV<'a>`:
            (A, B)
            (A, B, C)
            (A, B, C, D)
            (A, B, C, D, E)
            (A, B, C, D, E, F)
            Language
            OptionVarULE<T>
            Region
          and 19 others
note: required because it appears within the type `AliasesV1<'data>`
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:64:12
  |
64  | pub struct AliasesV1<'data> {
  |            ^^^^^^^^^
note: required by a bound in `Deserialize`
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.143/src/de/mod.rs:532:29
  |
532 | pub trait Deserialize<'de>: Sized {
  |                             ^^^^^ required by this bound in `Deserialize`
  = note: this error originates in the derive macro `serde::Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `TinyAsciiStr<7_usize>: ZeroMapKV<'data>` is not satisfied in `AliasesV1<'data>`
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:49:38
  |
49  | #[cfg_attr(feature = "serde", derive(serde::Deserialize))]
  |                                      ^^^^^^^^^^^^^^^^^^ within `AliasesV1<'data>`, the trait `ZeroMapKV<'data>` is not implemented for `TinyAsciiStr<7_usize>`
  |
  = help: the following other types implement trait `ZeroMapKV<'a>`:
            (A, B)
            (A, B, C)
            (A, B, C, D)
            (A, B, C, D, E)
            (A, B, C, D, E, F)
            Language
            OptionVarULE<T>
            Region
          and 19 others
note: required because it appears within the type `AliasesV1<'data>`
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:64:12
  |
64  | pub struct AliasesV1<'data> {
  |            ^^^^^^^^^
note: required by a bound in `Result`
 --> ~/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/result.rs:504:17
  |
504 | pub enum Result<T, E> {
  |                 ^ required by this bound in `Result`
  = note: this error originates in the derive macro `serde::Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `TinyAsciiStr<7_usize>: ZeroMapKV<'_>` is not satisfied in `AliasesV1<'_>`
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:49:38
  |
49  | #[cfg_attr(feature = "serde", derive(serde::Deserialize))]
  |                                      ^^^^^^^^^^^^^^^^^^ within `AliasesV1<'_>`, the trait `ZeroMapKV<'_>` is not implemented for `TinyAsciiStr<7_usize>`
  |
  = help: the following other types implement trait `ZeroMapKV<'a>`:
            (A, B)
            (A, B, C)
            (A, B, C, D)
            (A, B, C, D, E)
            (A, B, C, D, E, F)
            Language
            OptionVarULE<T>
            Region
          and 19 others
note: required because it appears within the type `AliasesV1<'_>`
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:64:12
  |
64  | pub struct AliasesV1<'data> {
  |            ^^^^^^^^^
note: required by a bound in `Result`
 --> ~/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/result.rs:504:17
  |
504 | pub enum Result<T, E> {
  |                 ^ required by this bound in `Result`
  = note: this error originates in the derive macro `serde::Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `TinyAsciiStr<3_usize>: ZeroMapKV<'data>` is not satisfied
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:71:21
 |
71 |     pub sgn_region: ZeroMap<'data, UnvalidatedRegion, Language>,
 |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ZeroMapKV<'data>` is not implemented for `TinyAsciiStr<3_usize>`
 |
 = help: the following other types implement trait `ZeroMapKV<'a>`:
           (A, B)
           (A, B, C)
           (A, B, C, D)
           (A, B, C, D, E)
           (A, B, C, D, E, F)
           Language
           OptionVarULE<T>
           Region
         and 19 others
note: required by a bound in `ZeroMap`
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/zerovec-0.7.0/src/map/map.rs:63:8
 |
63 |     K: ZeroMapKV<'a> + ?Sized,
 |        ^^^^^^^^^^^^^ required by this bound in `ZeroMap`

error[E0277]: the trait bound `TinyAsciiStr<2_usize>: ZeroMapKV<'data>` is not satisfied
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:74:24
 |
74 |     pub language_len2: ZeroMap<'data, TinyAsciiStr<2>, UnvalidatedLanguageIdentifier>,
 |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ZeroMapKV<'data>` is not implemented for `TinyAsciiStr<2_usize>`
 |
 = help: the following other types implement trait `ZeroMapKV<'a>`:
           (A, B)
           (A, B, C)
           (A, B, C, D)
           (A, B, C, D, E)
           (A, B, C, D, E, F)
           Language
           OptionVarULE<T>
           Region
         and 19 others
note: required by a bound in `ZeroMap`
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/zerovec-0.7.0/src/map/map.rs:63:8
 |
63 |     K: ZeroMapKV<'a> + ?Sized,
 |        ^^^^^^^^^^^^^ required by this bound in `ZeroMap`

error[E0277]: the trait bound `TinyAsciiStr<4_usize>: ZeroMapKV<'data>` is not satisfied
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:85:17
 |
85 |     pub script: ZeroMap<'data, UnvalidatedScript, Script>,
 |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ZeroMapKV<'data>` is not implemented for `TinyAsciiStr<4_usize>`
 |
 = help: the following other types implement trait `ZeroMapKV<'a>`:
           (A, B)
           (A, B, C)
           (A, B, C, D)
           (A, B, C, D, E)
           (A, B, C, D, E, F)
           Language
           OptionVarULE<T>
           Region
         and 19 others
note: required by a bound in `ZeroMap`
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/zerovec-0.7.0/src/map/map.rs:63:8
 |
63 |     K: ZeroMapKV<'a> + ?Sized,
 |        ^^^^^^^^^^^^^ required by this bound in `ZeroMap`

error[E0277]: the trait bound `TinyAsciiStr<8_usize>: ZeroMapKV<'data>` is not satisfied
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:100:18
  |
100 |     pub variant: ZeroMap<'data, UnvalidatedVariant, Variant>,
  |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ZeroMapKV<'data>` is not implemented for `TinyAsciiStr<8_usize>`
  |
  = help: the following other types implement trait `ZeroMapKV<'a>`:
            (A, B)
            (A, B, C)
            (A, B, C, D)
            (A, B, C, D, E)
            (A, B, C, D, E, F)
            Language
            OptionVarULE<T>
            Region
          and 19 others
note: required by a bound in `ZeroMap`
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/zerovec-0.7.0/src/map/map.rs:63:8
  |
63  |     K: ZeroMapKV<'a> + ?Sized,
  |        ^^^^^^^^^^^^^ required by this bound in `ZeroMap`

error[E0277]: the trait bound `TinyAsciiStr<7_usize>: ZeroMapKV<'data>` is not satisfied
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:104:22
  |
104 |     pub subdivision: ZeroMap<'data, UnvalidatedSubdivision, UnvalidatedSubdivision>,
  |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ZeroMapKV<'data>` is not implemented for `TinyAsciiStr<7_usize>`
  |
  = help: the following other types implement trait `ZeroMapKV<'a>`:
            (A, B)
            (A, B, C)
            (A, B, C, D)
            (A, B, C, D, E)
            (A, B, C, D, E, F)
            Language
            OptionVarULE<T>
            Region
          and 19 others
note: required by a bound in `ZeroMap`
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/zerovec-0.7.0/src/map/map.rs:63:8
  |
63  |     K: ZeroMapKV<'a> + ?Sized,
  |        ^^^^^^^^^^^^^ required by this bound in `ZeroMap`

error[E0277]: the trait bound `TinyAsciiStr<3_usize>: ZeroMapKV<'data>` is not satisfied
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:133:19
  |
133 |     pub language: ZeroMap<'data, UnvalidatedLanguage, (Script, Region)>,
  |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ZeroMapKV<'data>` is not implemented for `TinyAsciiStr<3_usize>`
  |
  = help: the following other types implement trait `ZeroMapKV<'a>`:
            (A, B)
            (A, B, C)
            (A, B, C, D)
            (A, B, C, D, E)
            (A, B, C, D, E, F)
            Language
            OptionVarULE<T>
            Region
          and 19 others
note: required by a bound in `ZeroMap`
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/zerovec-0.7.0/src/map/map.rs:63:8
  |
63  |     K: ZeroMapKV<'a> + ?Sized,
  |        ^^^^^^^^^^^^^ required by this bound in `ZeroMap`

error[E0277]: the trait bound `TinyAsciiStr<4_usize>: ZeroMapKV<'data>` is not satisfied
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:139:17
  |
139 |     pub script: ZeroMap<'data, UnvalidatedScript, (Language, Region)>,
  |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ZeroMapKV<'data>` is not implemented for `TinyAsciiStr<4_usize>`
  |
  = help: the following other types implement trait `ZeroMapKV<'a>`:
            (A, B)
            (A, B, C)
            (A, B, C, D)
            (A, B, C, D, E)
            (A, B, C, D, E, F)
            Language
            OptionVarULE<T>
            Region
          and 19 others
note: required by a bound in `ZeroMap`
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/zerovec-0.7.0/src/map/map.rs:63:8
  |
63  |     K: ZeroMapKV<'a> + ?Sized,
  |        ^^^^^^^^^^^^^ required by this bound in `ZeroMap`

error[E0277]: the trait bound `TinyAsciiStr<3_usize>: AsULE` is not satisfied
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:127:26
  |
127 |     pub language_script: ZeroMap<'data, (UnvalidatedLanguage, UnvalidatedScript), Region>,
  |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsULE` is not implemented for `TinyAsciiStr<3_usize>`
  |
  = help: the following other types implement trait `AsULE`:
            (A, B)
            (A, B, C)
            (A, B, C, D)
            (A, B, C, D, E)
            (A, B, C, D, E, F)
            Language
            Region
            ResourceKeyHash
          and 18 others
  = note: required because of the requirements on the impl of `ZeroMapKV<'data>` for `(TinyAsciiStr<3_usize>, TinyAsciiStr<4_usize>)`
note: required by a bound in `ZeroMap`
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/zerovec-0.7.0/src/map/map.rs:63:8
  |
63  |     K: ZeroMapKV<'a> + ?Sized,
  |        ^^^^^^^^^^^^^ required by this bound in `ZeroMap`

error[E0277]: the trait bound `TinyAsciiStr<4_usize>: AsULE` is not satisfied
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_locale_canonicalizer-0.6.0/src/provider.rs:127:26
  |
127 |     pub language_script: ZeroMap<'data, (UnvalidatedLanguage, UnvalidatedScript), Region>,
  |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsULE` is not implemented for `TinyAsciiStr<4_usize>`
  |
  = help: the following other types implement trait `AsULE`:
            (A, B)
            (A, B, C)
            (A, B, C, D)
            (A, B, C, D, E)
            (A, B, C, D, E, F)
            Language
            Region
            ResourceKeyHash
          and 18 others
  = note: required because of the requirements on the impl of `ZeroMapKV<'data>` for `(TinyAsciiStr<3_usize>, TinyAsciiStr<4_usize>)`
note: required by a bound in `ZeroMap`
 --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/zerovec-0.7.0/src/map/map.rs:63:8
  |
63  |     K: ZeroMapKV<'a> + ?Sized,
  |        ^^^^^^^^^^^^^ required by this bound in `ZeroMap`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `icu_locale_canonicalizer` due to 14 previous errors
warning: build failed, waiting for other jobs to finish...
error[E0277]: the trait bound `TinyAsciiStr<16_usize>: AsULE` is not satisfied
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_calendar-0.6.0/src/provider.rs:34:1
 |
34 | #[icu_provider::data_struct(JapaneseErasV1Marker = "calendar/japanese@1")]
 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsULE` is not implemented for `TinyAsciiStr<16_usize>`
 |
 = help: the following other types implement trait `AsULE`:
           (A, B)
           (A, B, C)
           (A, B, C, D)
           (A, B, C, D, E)
           (A, B, C, D, E, F)
           EraStartDate
           Language
           Region
         and 19 others
 = note: required because of the requirements on the impl of `AsULE` for `(EraStartDate, TinyAsciiStr<16_usize>)`
 = note: this error originates in the attribute macro `icu_provider::data_struct` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `TinyAsciiStr<16_usize>: AsULE` is not satisfied
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_calendar-0.6.0/src/provider.rs:34:1
 |
34 | #[icu_provider::data_struct(JapaneseErasV1Marker = "calendar/japanese@1")]
 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsULE` is not implemented for `TinyAsciiStr<16_usize>`
 |
 = help: the following other types implement trait `AsULE`:
           (A, B)
           (A, B, C)
           (A, B, C, D)
           (A, B, C, D, E)
           (A, B, C, D, E, F)
           EraStartDate
           Language
           Region
         and 19 others
 = note: required because of the requirements on the impl of `AsULE` for `(EraStartDate, TinyAsciiStr<16_usize>)`
 = note: this error originates in the derive macro `yoke::Yokeable` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `TinyAsciiStr<16_usize>: AsULE` is not satisfied
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_calendar-0.6.0/src/provider.rs:34:1
 |
34 | #[icu_provider::data_struct(JapaneseErasV1Marker = "calendar/japanese@1")]
 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsULE` is not implemented for `TinyAsciiStr<16_usize>`
 |
 = help: the following other types implement trait `AsULE`:
           (A, B)
           (A, B, C)
           (A, B, C, D)
           (A, B, C, D, E)
           (A, B, C, D, E, F)
           EraStartDate
           Language
           Region
         and 19 others
 = note: required because of the requirements on the impl of `AsULE` for `(EraStartDate, TinyAsciiStr<16_usize>)`
 = note: this error originates in the derive macro `zerofrom::ZeroFrom` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `TinyAsciiStr<16_usize>: AsULE` is not satisfied
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_calendar-0.6.0/src/provider.rs:35:10
 |
35 | #[derive(Debug, PartialEq, Clone, Default)]
 |          ^^^^^ the trait `AsULE` is not implemented for `TinyAsciiStr<16_usize>`
 |
 = help: the following other types implement trait `AsULE`:
           (A, B)
           (A, B, C)
           (A, B, C, D)
           (A, B, C, D, E)
           (A, B, C, D, E, F)
           EraStartDate
           Language
           Region
         and 19 others
 = note: required because of the requirements on the impl of `AsULE` for `(EraStartDate, TinyAsciiStr<16_usize>)`
 = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `TinyAsciiStr<16_usize>: AsULE` is not satisfied
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_calendar-0.6.0/src/provider.rs:35:17
 |
35 | #[derive(Debug, PartialEq, Clone, Default)]
 |                 ^^^^^^^^^ the trait `AsULE` is not implemented for `TinyAsciiStr<16_usize>`
 |
 = help: the following other types implement trait `AsULE`:
           (A, B)
           (A, B, C)
           (A, B, C, D)
           (A, B, C, D, E)
           (A, B, C, D, E, F)
           EraStartDate
           Language
           Region
         and 19 others
 = note: required because of the requirements on the impl of `AsULE` for `(EraStartDate, TinyAsciiStr<16_usize>)`
 = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `TinyAsciiStr<16_usize>: AsULE` is not satisfied
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_calendar-0.6.0/src/provider.rs:35:28
 |
35 | #[derive(Debug, PartialEq, Clone, Default)]
 |                            ^^^^^ the trait `AsULE` is not implemented for `TinyAsciiStr<16_usize>`
 |
 = help: the following other types implement trait `AsULE`:
           (A, B)
           (A, B, C)
           (A, B, C, D)
           (A, B, C, D, E)
           (A, B, C, D, E, F)
           EraStartDate
           Language
           Region
         and 19 others
 = note: required because of the requirements on the impl of `AsULE` for `(EraStartDate, TinyAsciiStr<16_usize>)`
 = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `TinyAsciiStr<16_usize>: AsULE` is not satisfied
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_calendar-0.6.0/src/provider.rs:35:35
 |
35 | #[derive(Debug, PartialEq, Clone, Default)]
 |                                   ^^^^^^^ the trait `AsULE` is not implemented for `TinyAsciiStr<16_usize>`
 |
 = help: the following other types implement trait `AsULE`:
           (A, B)
           (A, B, C)
           (A, B, C, D)
           (A, B, C, D, E)
           (A, B, C, D, E, F)
           EraStartDate
           Language
           Region
         and 19 others
 = note: required because of the requirements on the impl of `AsULE` for `(EraStartDate, TinyAsciiStr<16_usize>)`
 = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `TinyAsciiStr<16_usize>: AsULE` is not satisfied
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_calendar-0.6.0/src/provider.rs:38:1
 |
38 | / pub struct JapaneseErasV1<'data> {
39 | |     #[cfg_attr(feature = "serde", serde(borrow))]
40 | |     pub dates_to_historical_eras: ZeroVec<'data, (EraStartDate, TinyStr16)>,
41 | |     #[cfg_attr(feature = "serde", serde(borrow))]
42 | |     pub dates_to_eras: ZeroVec<'data, (EraStartDate, TinyStr16)>,
43 | | }
 | |_^ the trait `AsULE` is not implemented for `TinyAsciiStr<16_usize>`
 |
 = help: the following other types implement trait `AsULE`:
           (A, B)
           (A, B, C)
           (A, B, C, D)
           (A, B, C, D, E)
           (A, B, C, D, E, F)
           EraStartDate
           Language
           Region
         and 19 others
 = note: required because of the requirements on the impl of `AsULE` for `(EraStartDate, TinyAsciiStr<16_usize>)`

error[E0277]: the trait bound `TinyAsciiStr<16_usize>: AsULE` is not satisfied
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_calendar-0.6.0/src/provider.rs:38:12
 |
38 | pub struct JapaneseErasV1<'data> {
 |            ^^^^^^^^^^^^^^^^^^^^^ the trait `AsULE` is not implemented for `TinyAsciiStr<16_usize>`
 |
 = help: the following other types implement trait `AsULE`:
           (A, B)
           (A, B, C)
           (A, B, C, D)
           (A, B, C, D, E)
           (A, B, C, D, E, F)
           EraStartDate
           Language
           Region
         and 19 others
 = note: required because of the requirements on the impl of `AsULE` for `(EraStartDate, TinyAsciiStr<16_usize>)`

error[E0277]: the trait bound `TinyAsciiStr<16_usize>: AsULE` is not satisfied
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/icu_calendar-0.6.0/src/provider.rs:37:38
 |
37 | #[cfg_attr(feature = "serde", derive(serde::Deserialize))]
 |                                      ^^^^^^^^^^^^^^^^^^ the trait `AsULE` is not implemented for `TinyAsciiStr<16_usize>`
 |
 = help: the following other types implement trait `AsULE`:
           (A, B)
           (A, B, C)
           (A, B, C, D)
           (A, B, C, D, E)
           (A, B, C, D, E, F)
           EraStartDate
           Language
           Region
         and 19 others
 = note: required because of the requirements on the impl of `AsULE` for `(EraStartDate, TinyAsciiStr<16_usize>)`
 = note: this error originates in the derive macro `serde::Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `icu_calendar` due to 10 previous errors

Build environment:
OS: macOS Monterey 12.5.1, on Apple Silicon
rustc -v -V:

rustc 1.63.0 (4b91a6ea7 2022-08-08)
binary: rustc
commit-hash: 4b91a6ea7258a947e59c6522cd5898e7c0a6a88f
commit-date: 2022-08-08
host: aarch64-apple-darwin
release: 1.63.0
LLVM version: 14.0.5
@sffc
Copy link
Member

sffc commented Aug 20, 2022

It's possible that tinystr 0.6.1 unintentionally broke old ICU4X versions, which is unfortunate, and we should probably investigate. However, to get unblocked, please make sure you are using ICU4X 1.0.0-beta1 which definitely does work with the latest tinystr.

@Razican
Copy link
Author

Razican commented Aug 21, 2022

Well, we could theoretically start using a beta version, but following semver, if the crate is backwards incompatible, the new version should be 0.7.0, not 0.6.1. A cargo update should never break a project.

Also, the "latest version" in crates.io is 0.6, since the beta versions are not considered as "latest", but if somebody uses the crates.io version, it won't work.

I would suggest to yank 0.6.1 and release 0.7.0, making icu 1.0 depend on the latter.

@sffc
Copy link
Member

sffc commented Aug 21, 2022

We haven't been as careful as we should be with 0.x versions. I agree that we should fix this, but the workaround is to use the latest version of icu4x, which I'm saying is 1.0.0-beta1. I wish I could update that on crates.io but it doesn't allow that.

But I agree, I'll look into fixing the tinystr release.

@sffc
Copy link
Member

sffc commented Aug 22, 2022

Okay I think I found the problem. The API of the tinystr crate itself didn't change between 0.6.0 and 0.6.1, but its dependency on zerovec was upgraded from 0.7 to 0.8. icu@0.6.0 requires zerovec 0.7 impls, which are not provided in tinystr@0.6.1 (zerovec 0.8 impls are provided instead).

I published tinystr@0.6.2 that includes both zerovec 0.7 impls and 0.8 impls. I checked and it appears that both icu@0.6.0 and icu@1.0.0-beta1 build successfully now.

Here is the commit: 19dd573

I'm going to keep this issue open because we should publish tinystr@0.7.0 and make icu@1.0.0 point to that version so that we don't have to keep the legacy zerovec dependency around (basically, reverse the above commit and then bump the version numbers).

@sffc sffc added the T-techdebt Type: ICU4X code health and tech debt label Aug 22, 2022
@sffc sffc added this to the ICU4X 1.0 (Final) milestone Aug 22, 2022
@sffc sffc self-assigned this Aug 22, 2022
@sffc sffc added C-meta Component: Relating to ICU4X as a whole S-small Size: One afternoon (small bug fix or enhancement) labels Aug 22, 2022
@sffc
Copy link
Member

sffc commented Aug 22, 2022

@Manishearth Should we yank the broken release (0.6.1) or is it okay now that 0.6.2 is fixed?

bors bot pushed a commit to boa-dev/boa that referenced this issue Aug 22, 2022
<!---
Thank you for contributing to Boa! Please fill out the template below, and remove or add any
information as you feel neccesary.
--->

This Pull Request removes two dependencies that were not really needed, and fixes #2244 by no longer having the package in the dependency tree.

It changes the following:

- The `structopt` dependency in `boa_tester` has been replaced by `clap` v3, the same way as we did in `boa_cli`. This means that we have one less dependency (at least), and that `clap` v2 is only used as a dev-dependency by `criterion` (which will probably be removed in 0.4, as per bheisler/criterion.rs#596).
- The no-longer-updated `num-format` dependency has been removed from `boa_tester`. We were only using it to add comma thousands separator on results, so I added a simple function to do it (not very performant, but it will only be used a few times when showing results).

Looking at this, I noticed a couple of things:

 - The `csv` dependency, used by `criterion` has not been updated in more than a year, and it's using a very old `itoa` dependency. They updated the dependency in the repository in March, but unfortunately, the release is taking some more time than expected, and a tracking issue can be found here: BurntSushi/rust-csv#271
 - `cargo update` fails, because the latest update to `tinystr` in the ICU4x breaks ICU4x 0.6. I have reported this here: unicode-org/icu4x#2428 and their recommendation is for us to use a beta version of the library, but I don't think we should go for that, since this is a semver breakage.
@Manishearth
Copy link
Member

We should yank the broken release, yes

@Manishearth
Copy link
Member

Also I think we did a breaking update for all utils in our beta but it may be worth doing it again for the release just in case (or I can do a quick audit).

@Razican
Copy link
Author

Razican commented Aug 22, 2022

I can confirm that tinystr 0.6.2 fixes the issues with icu 0.6. We will go for icu 1.0 as soon as it's released :) a bit earlier probably to provide some feedback. Thanks!

@sffc sffc closed this as completed Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-meta Component: Relating to ICU4X as a whole S-small Size: One afternoon (small bug fix or enhancement) T-techdebt Type: ICU4X code health and tech debt
Projects
None yet
Development

No branches or pull requests

3 participants