Skip to content

Commit aa882da

Browse files
Replace experimental features by unstable features (#7566)
This blocks #7565 as those markers go from experimental to unstable, but those are two different features right now, which breaks the registry and datagen. #6659 Fixes #6618
1 parent bb1748e commit aa882da

File tree

111 files changed

+281
-306
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+281
-306
lines changed

.github/workflows/artifacts-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ jobs:
647647
include_data: false
648648
runs-on: ${{ matrix.os }}
649649
env:
650-
FEATURES: ${{ matrix.include_data == true && 'default_components,experimental,buffer_provider,compiled_data' || 'default_components,experimental,buffer_provider' }}
650+
FEATURES: ${{ matrix.include_data == true && 'default_components,experimental,unstable,buffer_provider,compiled_data' || 'default_components,experimental,unstable,buffer_provider' }}
651651
FILENAME_SUFFIX: ${{ matrix.include_data == true && '-with_data' || '' }}
652652

653653
steps:

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Practically, this means that new components or improvements to existing componen
9797

9898
If working on a new component, start it in the `components/experimental` crate. We allow contributions to that crate even if they don't yet meet all of our code quality requirements. Once finished, the code can be moved into its own crate as a separate pull request.
9999

100-
If working on an improvement to an existing component that you wish to split into multiple smaller pieces, consider hiding it under the `"experimental"` feature in the crate. Doing so gives a signal to users and tooling that the code is not yet production-ready. Once finished, the `"experimental"` feature can be removed from the crate.
100+
If working on an improvement to an existing component that you wish to split into multiple smaller pieces, consider hiding it under the `"unstable"` feature in the crate. Doing so gives a signal to users and tooling that the code is not yet production-ready. Once finished, the `"unstable"` feature can be removed from the crate.
101101

102102
When adding non-experimental code to main, also update the "unreleased" section of the changelog. This simplifies releases and gives us a better overview of what unreleased features we have.
103103

@@ -172,7 +172,7 @@ If the pull request is simple and short lived, it can be initialized with review
172172
If the pull request is more complex and is being developed over time, it may be beneficial to start it in a `Draft` state.
173173
This allows other contributors to monitor the progress and volunteer feedback while annotating that the pull request is not yet ready for review.
174174

175-
If a pull request is particularly large in scope and not release-ready, consider either (1) reducing the scope of the pull request, (2) moving work to the `icu_experimental` crate, or (3) hiding the work behind the `"experimental"` feature flag. See the section above, "Release Readiness", for more details.
175+
If a pull request is particularly large in scope and not release-ready, consider either (1) reducing the scope of the pull request, (2) moving work to the `icu_experimental` crate, or (3) hiding the work behind the `"unstable"` feature flag. See the section above, "Release Readiness", for more details.
176176

177177
By the end of this phase, and right before review is requested, it is helpful for the reviewers to have a clean list of commits in the pull request.
178178

components/datetime/Cargo.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ datagen = [
8888
"serde",
8989
]
9090
logging = ["icu_calendar/logging"]
91-
experimental = []
9291
unstable = []
9392
compiled_data = ["dep:icu_datetime_data", "icu_calendar/compiled_data", "icu_decimal/compiled_data", "icu_plurals/compiled_data", "icu_time/compiled_data", "dep:icu_locale", "icu_locale?/compiled_data", "icu_provider/baked"]
9493
ixdtf = ["icu_time/ixdtf", "icu_calendar/ixdtf"]
@@ -102,28 +101,28 @@ skip_optional_dependencies = true
102101
[[bench]]
103102
name = "datetime"
104103
harness = false
105-
required-features = ["compiled_data", "serde", "experimental"]
104+
required-features = ["compiled_data", "serde", "unstable"]
106105

107106
[[bench]]
108107
name = "pattern"
109108
harness = false
110-
required-features = ["serde", "experimental"]
109+
required-features = ["serde", "unstable"]
111110

112111
[[test]]
113112
name = "datetime"
114-
required-features = ["experimental", "compiled_data", "serde"]
113+
required-features = ["unstable", "compiled_data", "serde"]
115114

116115
[[test]]
117116
name = "resolved_components"
118-
required-features = ["experimental", "compiled_data"]
117+
required-features = ["unstable", "compiled_data"]
119118

120119
[[test]]
121120
name = "simple_test"
122121
required-features = ["compiled_data"]
123122

124123
[[test]]
125124
name = "skeleton_serialization"
126-
required-features = ["experimental"]
125+
required-features = ["unstable"]
127126

128127
[package.metadata.cargo-semver-checks.lints]
129128
workspace = true

components/datetime/src/builder.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ use crate::options::*;
103103
/// This is a builder enum. See [`builder`](crate::fieldsets::builder).
104104
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
105105
#[cfg_attr(
106-
all(feature = "serde", feature = "experimental"),
106+
all(feature = "serde", feature = "unstable"),
107107
derive(serde::Serialize, serde::Deserialize)
108108
)]
109109
#[non_exhaustive]
@@ -177,7 +177,7 @@ impl DateFields {
177177
/// This is a builder enum. See [`builder`](crate::fieldsets::builder).
178178
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
179179
#[cfg_attr(
180-
all(feature = "serde", feature = "experimental"),
180+
all(feature = "serde", feature = "unstable"),
181181
derive(serde::Serialize, serde::Deserialize)
182182
)]
183183
#[non_exhaustive]
@@ -298,7 +298,7 @@ impl core::error::Error for BuilderError {}
298298

299299
/// Serde impls: We can't directly use `derive(Serialize)` and also hide null fields
300300
/// due to <https://github.com/serde-rs/serde/issues/2191>
301-
#[cfg(all(feature = "serde", feature = "experimental"))]
301+
#[cfg(all(feature = "serde", feature = "unstable"))]
302302
mod _serde {
303303
use super::*;
304304
use serde::{Deserialize, Serialize};
@@ -333,7 +333,7 @@ mod _serde {
333333

334334
/// Serialization for [`FieldSetBuilder`].
335335
///
336-
/// ✨ *Enabled with the `serde` and `experimental` Cargo features.*
336+
/// ✨ *Enabled with the `serde` and `unstable` Cargo features.*
337337
///
338338
/// # Examples
339339
///
@@ -397,7 +397,7 @@ mod _serde {
397397

398398
/// Deserialization for [`FieldSetBuilder`].
399399
///
400-
/// ✨ *Enabled with the `serde` and `experimental` Cargo features.*
400+
/// ✨ *Enabled with the `serde` and `unstable` Cargo features.*
401401
///
402402
/// For an example, see the `Serialize` impl.
403403
impl<'de> Deserialize<'de> for FieldSetBuilder {
@@ -1108,7 +1108,7 @@ mod tests {
11081108
ZoneStyle::ExemplarCity,
11091109
];
11101110

1111-
#[cfg(all(feature = "serde", feature = "experimental"))]
1111+
#[cfg(all(feature = "serde", feature = "unstable"))]
11121112
fn check_serde(value: &FieldSetBuilder) {
11131113
let json_str = serde_json::to_string(value).unwrap();
11141114
let json_parsed: FieldSetBuilder = serde_json::from_str(&json_str).unwrap();
@@ -1130,7 +1130,7 @@ mod tests {
11301130
builder.clone().build_date_and_time().unwrap_err();
11311131
builder.clone().build_composite_datetime().unwrap();
11321132
builder.clone().build_composite().unwrap();
1133-
#[cfg(all(feature = "serde", feature = "experimental"))]
1133+
#[cfg(all(feature = "serde", feature = "unstable"))]
11341134
check_serde(&builder);
11351135
}
11361136
}
@@ -1147,7 +1147,7 @@ mod tests {
11471147
builder.clone().build_date_and_time().unwrap_err();
11481148
builder.clone().build_composite_datetime().unwrap();
11491149
builder.clone().build_composite().unwrap();
1150-
#[cfg(all(feature = "serde", feature = "experimental"))]
1150+
#[cfg(all(feature = "serde", feature = "unstable"))]
11511151
check_serde(&builder);
11521152
}
11531153
}
@@ -1163,7 +1163,7 @@ mod tests {
11631163
builder.clone().build_date_and_time().unwrap_err();
11641164
builder.clone().build_composite_datetime().unwrap();
11651165
builder.clone().build_composite().unwrap();
1166-
#[cfg(all(feature = "serde", feature = "experimental"))]
1166+
#[cfg(all(feature = "serde", feature = "unstable"))]
11671167
check_serde(&builder);
11681168
}
11691169

@@ -1179,7 +1179,7 @@ mod tests {
11791179
builder.clone().build_date_and_time().unwrap_err();
11801180
builder.clone().build_composite_datetime().unwrap_err();
11811181
builder.clone().build_composite().unwrap();
1182-
#[cfg(all(feature = "serde", feature = "experimental"))]
1182+
#[cfg(all(feature = "serde", feature = "unstable"))]
11831183
check_serde(&builder);
11841184
}
11851185
}
@@ -1197,7 +1197,7 @@ mod tests {
11971197
builder.clone().build_date_and_time().unwrap();
11981198
builder.clone().build_composite_datetime().unwrap();
11991199
builder.clone().build_composite().unwrap();
1200-
#[cfg(all(feature = "serde", feature = "experimental"))]
1200+
#[cfg(all(feature = "serde", feature = "unstable"))]
12011201
check_serde(&builder);
12021202
}
12031203
}
@@ -1216,7 +1216,7 @@ mod tests {
12161216
builder.clone().build_date_and_time().unwrap_err();
12171217
builder.clone().build_composite_datetime().unwrap_err();
12181218
builder.clone().build_composite().unwrap_err();
1219-
#[cfg(all(feature = "serde", feature = "experimental"))]
1219+
#[cfg(all(feature = "serde", feature = "unstable"))]
12201220
check_serde(&builder);
12211221
}
12221222
}
@@ -1235,7 +1235,7 @@ mod tests {
12351235
builder.clone().build_date_and_time().unwrap_err();
12361236
builder.clone().build_composite_datetime().unwrap_err();
12371237
builder.clone().build_composite().unwrap();
1238-
#[cfg(all(feature = "serde", feature = "experimental"))]
1238+
#[cfg(all(feature = "serde", feature = "unstable"))]
12391239
check_serde(&builder);
12401240
}
12411241
}
@@ -1256,7 +1256,7 @@ mod tests {
12561256
builder.clone().build_date_and_time().unwrap_err();
12571257
builder.clone().build_composite_datetime().unwrap_err();
12581258
builder.clone().build_composite().unwrap_err();
1259-
#[cfg(all(feature = "serde", feature = "experimental"))]
1259+
#[cfg(all(feature = "serde", feature = "unstable"))]
12601260
check_serde(&builder);
12611261
}
12621262
}
@@ -1275,7 +1275,7 @@ mod tests {
12751275
builder.clone().build_date_and_time().unwrap_err();
12761276
builder.clone().build_composite_datetime().unwrap_err();
12771277
builder.clone().build_composite().unwrap();
1278-
#[cfg(all(feature = "serde", feature = "experimental"))]
1278+
#[cfg(all(feature = "serde", feature = "unstable"))]
12791279
check_serde(&builder);
12801280
}
12811281
}
@@ -1295,7 +1295,7 @@ mod tests {
12951295
builder.clone().build_date_and_time().unwrap_err();
12961296
builder.clone().build_composite_datetime().unwrap_err();
12971297
builder.clone().build_composite().unwrap();
1298-
#[cfg(all(feature = "serde", feature = "experimental"))]
1298+
#[cfg(all(feature = "serde", feature = "unstable"))]
12991299
check_serde(&builder);
13001300
}
13011301
}
@@ -1317,7 +1317,7 @@ mod tests {
13171317
builder.clone().build_date_and_time().unwrap_err();
13181318
builder.clone().build_composite_datetime().unwrap_err();
13191319
builder.clone().build_composite().unwrap_err();
1320-
#[cfg(all(feature = "serde", feature = "experimental"))]
1320+
#[cfg(all(feature = "serde", feature = "unstable"))]
13211321
check_serde(&builder);
13221322
}
13231323
}

components/datetime/src/options/mod.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ use icu_time::scaffold::IntoOption;
5757
/// ```
5858
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Default)]
5959
#[cfg_attr(
60-
all(feature = "serde", feature = "experimental"),
60+
all(feature = "serde", feature = "unstable"),
6161
derive(serde::Serialize, serde::Deserialize)
6262
)]
6363
#[cfg_attr(
64-
all(feature = "serde", feature = "experimental"),
64+
all(feature = "serde", feature = "unstable"),
6565
serde(rename_all = "lowercase")
6666
)]
6767
#[non_exhaustive]
@@ -129,11 +129,11 @@ impl IntoOption<Length> for Length {
129129
/// ```
130130
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Default)]
131131
#[cfg_attr(
132-
all(feature = "serde", feature = "experimental"),
132+
all(feature = "serde", feature = "unstable"),
133133
derive(serde::Serialize, serde::Deserialize)
134134
)]
135135
#[cfg_attr(
136-
all(feature = "serde", feature = "experimental"),
136+
all(feature = "serde", feature = "unstable"),
137137
serde(rename_all = "lowercase")
138138
)]
139139
#[non_exhaustive]
@@ -259,11 +259,11 @@ impl IntoOption<Alignment> for Alignment {
259259
/// ```
260260
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Default)]
261261
#[cfg_attr(
262-
all(feature = "serde", feature = "experimental"),
262+
all(feature = "serde", feature = "unstable"),
263263
derive(serde::Serialize, serde::Deserialize)
264264
)]
265265
#[cfg_attr(
266-
all(feature = "serde", feature = "experimental"),
266+
all(feature = "serde", feature = "unstable"),
267267
serde(rename_all = "camelCase")
268268
)]
269269
#[non_exhaustive]
@@ -383,11 +383,11 @@ impl IntoOption<YearStyle> for YearStyle {
383383
/// ```
384384
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Default)]
385385
#[cfg_attr(
386-
all(feature = "serde", feature = "experimental"),
386+
all(feature = "serde", feature = "unstable"),
387387
derive(serde::Serialize, serde::Deserialize)
388388
)]
389389
#[cfg_attr(
390-
all(feature = "serde", feature = "experimental"),
390+
all(feature = "serde", feature = "unstable"),
391391
serde(from = "TimePrecisionSerde", into = "TimePrecisionSerde")
392392
)]
393393
#[non_exhaustive]
@@ -445,7 +445,7 @@ impl IntoOption<TimePrecision> for TimePrecision {
445445
}
446446
}
447447

448-
#[cfg(all(feature = "serde", feature = "experimental"))]
448+
#[cfg(all(feature = "serde", feature = "unstable"))]
449449
#[derive(Copy, Clone, serde::Serialize, serde::Deserialize)]
450450
#[serde(rename_all = "camelCase")]
451451
enum TimePrecisionSerde {
@@ -464,7 +464,7 @@ enum TimePrecisionSerde {
464464
MinuteOptional,
465465
}
466466

467-
#[cfg(all(feature = "serde", feature = "experimental"))]
467+
#[cfg(all(feature = "serde", feature = "unstable"))]
468468
impl From<TimePrecision> for TimePrecisionSerde {
469469
fn from(value: TimePrecision) -> Self {
470470
match value {
@@ -485,7 +485,7 @@ impl From<TimePrecision> for TimePrecisionSerde {
485485
}
486486
}
487487

488-
#[cfg(all(feature = "serde", feature = "experimental"))]
488+
#[cfg(all(feature = "serde", feature = "unstable"))]
489489
impl From<TimePrecisionSerde> for TimePrecision {
490490
fn from(value: TimePrecisionSerde) -> Self {
491491
match value {

0 commit comments

Comments
 (0)