Open sffc opened 3 weeks ago
I'm open to this.
I'd love to overall reduce the amount of generated stuff in tree though.
actually I'd like us to run tests on all three primary data formats (baked, blob, json), generated at CI time, so that we don't accidentally e.g. break zerovec postcard deserialization
actually I'd like us to run tests on all three primary data formats (baked, blob, json), generated at CI time, so that we don't accidentally e.g. break zerovec postcard deserialization
Proposal: checked in json data, and make tasks that replace it with postcard or baked data in a way that allows transparently running tests.
We could potentially have a passthrough TestDataProvider or something
We should definitely have a test, if we don't already have one, that JSON data can be converted to Postcard and back and PartialEq
works on the round-trip. I don't think we get too much value of running tests on top of that? If the deserialization works and produces the same data as JSON/Baked, then the tests should work.
I don't think we get too much value of running tests on top of that?
There are a lot of different efficient ways of reading the data, especially for complex objects like Patterns. So I think there's some value in testing all those codepaths, but this isn't a strong opinipon of mine.
Add a datagen format that is a code module API-compatible with compiled data but backed by an FS data provider
You've proposed this before and it doesn't work because of singletons.
In the not-so-distant past, we ran ICU4X docs tests with the
icu_testdata
crate, which was backed by a mix of JSON and Baked Data files. In 1.3, we switched over to using compiled data on all locales.While this simplified our build, I think there is still value in running tests against the JSON data:
icu_datetime
andicu_datetime(test)
to build in order to iterate on my semantic skeleta work. JSON data doesn't need to be compiled, so it would lead to substantially faster Edit-Build-Test-Debug loop./tmp
and then immediately converted into a machine-readable data format.My proposal to fix this is:
ICU4X_DATA_DIR
test-gigo
Additional notes:
stubdata
if we did this, instead pointing IDEs to the new JSON-based compiled data crates.CC @robertbastian @Manishearth