Closed Bug 1897030 Opened 2 years ago Closed 2 years ago

[rustc 1.80] error: unexpected `cfg` condition name: `icu4x_custom_data`

Categories

(Core :: Internationalization, defect)

defect

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

[task 2024-05-15T23:12:50.229Z] 23:12:50    ERROR -  error: unexpected `cfg` condition name: `icu4x_custom_data`
[task 2024-05-15T23:12:50.229Z] 23:12:50     INFO -   --> intl/icu_segmenter_data/src/lib.rs:9:7
[task 2024-05-15T23:12:50.229Z] 23:12:50     INFO -    |
[task 2024-05-15T23:12:50.229Z] 23:12:50     INFO -  9 | #[cfg(icu4x_custom_data)]
[task 2024-05-15T23:12:50.230Z] 23:12:50     INFO -    |       ^^^^^^^^^^^^^^^^^
[task 2024-05-15T23:12:50.230Z] 23:12:50     INFO -    |
[task 2024-05-15T23:12:50.230Z] 23:12:50     INFO -    = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
[task 2024-05-15T23:12:50.231Z] 23:12:50     INFO -    = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(icu4x_custom_data)");` to the top of the `build.rs`
[task 2024-05-15T23:12:50.231Z] 23:12:50     INFO -    = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
[task 2024-05-15T23:12:50.231Z] 23:12:50     INFO -    = note: `-D unexpected-cfgs` implied by `-D warnings`
[task 2024-05-15T23:12:50.231Z] 23:12:50     INFO -    = help: to override `-D warnings` add `#[allow(unexpected_cfgs)]`
[task 2024-05-15T23:12:50.231Z] 23:12:50    ERROR -  error: unexpected `cfg` condition name: `icu4x_custom_data`
[task 2024-05-15T23:12:50.231Z] 23:12:50     INFO -    --> intl/icu_segmenter_data/src/lib.rs:11:11
[task 2024-05-15T23:12:50.231Z] 23:12:50     INFO -     |
[task 2024-05-15T23:12:50.231Z] 23:12:50     INFO -  11 | #[cfg(not(icu4x_custom_data))]
[task 2024-05-15T23:12:50.232Z] 23:12:50     INFO -     |           ^^^^^^^^^^^^^^^^^
[task 2024-05-15T23:12:50.232Z] 23:12:50     INFO -     |
[task 2024-05-15T23:12:50.232Z] 23:12:50     INFO -     = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(icu4x_custom_data)");` to the top of the `build.rs`
[task 2024-05-15T23:12:50.232Z] 23:12:50     INFO -     = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
[task 2024-05-15T23:12:50.232Z] 23:12:50    ERROR -  error: could not compile `icu_segmenter_data` (lib) due to 2 previous errors

Why aren't icu_segmenter_data and icu_capi vendored like other crates?

Flags: needinfo?(m_kato)

Looks like it's because they pull all the rest of ICU?

We don't have any facility to set it in the Firefox build, so rather than add a
build.rs to make rustc 1.80 happy, just remove the cfg.

Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED

(In reply to Mike Hommey [:glandium] from comment #1)

Why aren't icu_segmenter_data and icu_capi vendored like other crates?

In tree's icu_segmenter_data has some fixes such as bug 1880362 and reduces data size from original.

Also, although icu_capi uses weak dependency syntax, cargo vendor copies all dependency even if weak (https://github.com/rust-lang/cargo/issues/10801). It is for compile time and dependencies.

Flags: needinfo?(m_kato)
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/fedf8be3d3c2 Remove cfg(icu4x_custom_data) check in icu_segmenter_data. r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: