diff --git a/CHANGELOG.md b/CHANGELOG.md index 23ae2057..13358da9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,9 +29,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **Breaking**: move the `zarrs::array::{data_type,fill_value}` modules into the `zarrs_data_type` crate - Bump `lru` to 0.13 - Use codec identifiers in the example for `experimental_codec_names` remapping - -### Fixed -- Error on `{Array,Group}::[async_]open[_opt]` with additional fields with `"must_understand": true` +- Allow `{Array,Group}::new_with_metadata()` and `{Array,Group}Builder` to create arrays with `"must_understand": true` additional fields + - `{Array,Group}::[async_]open[_opt]` continue to fail with additional fields with `"must_understand": true` ## [0.19.2] - 2025-02-13 diff --git a/zarrs/src/array/array_builder.rs b/zarrs/src/array/array_builder.rs index 656f1e87..27452555 100644 --- a/zarrs/src/array/array_builder.rs +++ b/zarrs/src/array/array_builder.rs @@ -328,25 +328,7 @@ impl ArrayBuilder { .with_storage_transformers(self.storage_transformers.create_metadatas()), ); - Ok(Array { - storage, - path, - // shape: self.shape.clone(), - data_type: self.data_type.clone(), - chunk_grid: self.chunk_grid.clone(), - chunk_key_encoding: self.chunk_key_encoding.clone(), - fill_value: self.fill_value.clone(), - codecs: Arc::new(CodecChain::new( - self.array_to_array_codecs.clone(), - self.array_to_bytes_codec.clone(), - self.bytes_to_bytes_codecs.clone(), - )), - storage_transformers: self.storage_transformers.clone(), - // attributes: self.attributes.clone(), - dimension_names: self.dimension_names.clone(), - // additional_fields: self.additional_fields.clone(), - metadata: array_metadata, - }) + Array::new_with_metadata(storage, path.as_str(), array_metadata) } /// Build into an [`Arc`].