Skip to content

Commit

Permalink
Make pre-experimental crates with data be cfg(test) in datagen (#4280)
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc authored Nov 15, 2023
1 parent e7178ec commit 933a33e
Show file tree
Hide file tree
Showing 32 changed files with 26 additions and 3,103 deletions.
14 changes: 0 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ members = [
"provider/baked/properties",
"provider/baked/relativetime",
"provider/baked/segmenter",
"provider/baked/singlenumberformatter",
"provider/baked/timezone",
"provider/baked/unitsconversion",

# Utils
"utils/calendrical_calculations",
Expand Down Expand Up @@ -198,9 +196,7 @@ icu_plurals_data = { version = "~1.3.2", path = "provider/baked/plurals", defaul
icu_properties_data = { version = "~1.3.2", path = "provider/baked/properties", default-features = false }
icu_relativetime_data = { version = "~1.3.2", path = "provider/baked/relativetime", default-features = false }
icu_segmenter_data = { version = "~1.3.2", path = "provider/baked/segmenter", default-features = false }
icu_singlenumberformatter_data = { version = "~1.3.2", path = "provider/baked/singlenumberformatter", default-features = false }
icu_timezone_data = { version = "~1.3.2", path = "provider/baked/timezone", default-features = false }
icu_unitsconversion_data = { version = "~1.3.2", path = "provider/baked/unitsconversion", default-features = false }

# Utils
calendrical_calculations = { version = "0.1.0", path = "utils/calendrical_calculations", default-features = false }
Expand Down
4 changes: 0 additions & 4 deletions docs/tutorials/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/tutorials/testing/patch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ icu_plurals_data = { path = "../../provider/baked/plurals" }
icu_properties_data = { path = "../../provider/baked/properties"}
icu_relativetime_data = { path = "../../provider/baked/relativetime" }
icu_segmenter_data = { path = "../../provider/baked/segmenter" }
icu_singlenumberformatter_data = { path = "../../provider/baked/singlenumberformatter"}
icu_timezone_data = { path = "../../provider/baked/timezone" }

crlify = { path = "../../utils/crlify" }
Expand Down
1 change: 1 addition & 0 deletions experimental/personnames/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ name = "icu_personnames"
description = "API for formatting person names according to language-dependent conventions"
version = "0.0.0"
license-file = "LICENSE"
publish = false # excluded from release until there are APIs consuming data

authors.workspace = true
categories.workspace = true
Expand Down
7 changes: 2 additions & 5 deletions experimental/singlenumberformatter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
name = "icu_singlenumberformatter"
version = "0.0.0"
license-file = "LICENSE"
publish = false # excluded from release until there are APIs consuming data

authors.workspace = true
categories.workspace = true
Expand All @@ -27,12 +28,8 @@ zerovec = { workspace = true, features = ["yoke"] }
databake = { workspace = true, optional = true, features = ["derive"]}
tinystr = { workspace = true, features = ["zerovec"], default-features = false }

icu_singlenumberformatter_data = { workspace = true, optional = true}
icu_locid_transform = { workspace = true, optional = true, features = ["compiled_data"] }

[features]
default = ["compiled_data"]
default = []
serde = ["dep:serde", "zerovec/serde", "icu_locid/serde", "icu_provider/serde"]
datagen = ["serde", "zerovec/databake", "databake", "tinystr/databake"]
compiled_data = ["dep:icu_singlenumberformatter_data", "dep:icu_locid_transform"]

21 changes: 0 additions & 21 deletions experimental/singlenumberformatter/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,6 @@ use icu_provider::prelude::*;
use tinystr::UnvalidatedTinyAsciiStr;
use zerovec::{VarZeroVec, ZeroMap};

#[cfg(feature = "compiled_data")]
#[derive(Debug)]
/// Baked data
///
/// <div class="stab unstable">
/// 🚧 This code is considered unstable; it may change at any time, in breaking or non-breaking ways,
/// including in SemVer minor releases. In particular, the `DataProvider` implementations are only
/// guaranteed to match with this version's `*_unstable` providers. Use with caution.
/// </div>
pub struct Baked;

#[cfg(feature = "compiled_data")]
const _: () = {
pub mod icu {
pub use crate as singlenumberformatter;
pub use icu_locid_transform as locid_transform;
}
icu_singlenumberformatter_data::make_provider!(Baked);
icu_singlenumberformatter_data::impl_currency_essentials_v1!(Baked);
};

#[cfg(feature = "datagen")]
/// The latest minimum set of keys required by this component.
pub const KEYS: &[DataKey] = &[CurrencyEssentialsV1Marker::KEY];
Expand Down
7 changes: 3 additions & 4 deletions experimental/unitsconversion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
name = "icu_unitsconversion"
version = "0.0.0"
license-file = "LICENSE"
publish = false # excluded from release until there are APIs consuming data

rust-version.workspace = true
authors.workspace = true
Expand All @@ -26,10 +27,8 @@ icu_locid = { workspace = true }
icu_provider = { workspace = true, features = ["macros"] }
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"], optional = true }
zerovec = { workspace = true, features = ["yoke"] }
icu_unitsconversion_data = { workspace = true, optional = true }

[features]
default = ["compiled_data"]
default = []
serde = ["dep:serde", "zerovec/serde", "icu_locid/serde", "icu_provider/serde"]
datagen = ["serde", "zerovec/databake", "databake"]
compiled_data = ["dep:icu_unitsconversion_data"]
datagen = ["serde", "zerovec/databake", "databake"]
20 changes: 0 additions & 20 deletions experimental/unitsconversion/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,6 @@
use icu_provider::prelude::*;
use zerovec::{ZeroMap, ZeroVec};

#[cfg(feature = "compiled_data")]
#[derive(Debug)]
/// Baked data
///
/// <div class="stab unstable">
/// 🚧 This code is considered unstable; it may change at any time, in breaking or non-breaking ways,
/// including in SemVer minor releases. In particular, the `DataProvider` implementations are only
/// guaranteed to match with this version's `*_unstable` providers. Use with caution.
/// </div>
pub struct Baked;

#[cfg(feature = "compiled_data")]
const _: () = {
pub mod icu {
pub use crate as unitsconversion;
}
icu_unitsconversion_data::make_provider!(Baked);
icu_unitsconversion_data::impl_units_constants_v1!(Baked);
};

#[cfg(feature = "datagen")]
/// The latest minimum set of keys required by this component.
pub const KEYS: &[DataKey] = &[UnitsConstantsV1Marker::KEY];
Expand Down
17 changes: 0 additions & 17 deletions provider/baked/singlenumberformatter/Cargo.toml

This file was deleted.

44 changes: 0 additions & 44 deletions provider/baked/singlenumberformatter/LICENSE

This file was deleted.

11 changes: 0 additions & 11 deletions provider/baked/singlenumberformatter/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions provider/baked/singlenumberformatter/build.rs

This file was deleted.

31 changes: 0 additions & 31 deletions provider/baked/singlenumberformatter/data/macros.rs

This file was deleted.

Loading

0 comments on commit 933a33e

Please sign in to comment.