From 8c982ae2fede4368a6af6f510367e2f081f55a42 Mon Sep 17 00:00:00 2001 From: Lachlan Deakin Date: Mon, 23 Sep 2024 10:09:51 +1000 Subject: [PATCH] Bump `zarrs` to 0.17.0-beta.2 --- CHANGELOG.md | 2 +- Cargo.lock | 10 +++++----- Cargo.toml | 3 +-- src/array/array_sharded.rs | 16 ++++++++-------- src/storage.rs | 2 +- tests/array.rs | 2 +- 6 files changed, 17 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9aa336e..04ada50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Use `FetchContent_MakeAvailable` for `zarrs_ffi` source in `Findzarrs.cmake` - - Bump `zarrs` to 0.17.0-beta.1 + - Bump `zarrs` to 0.17.0-beta.2 - Raise MSRV to 1.76 ### Fixed diff --git a/Cargo.lock b/Cargo.lock index f757ac8..587f8f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1708,9 +1708,9 @@ dependencies = [ [[package]] name = "zarrs" -version = "0.17.0-beta.1" +version = "0.17.0-beta.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "036929bc687c4028f6dd18445f445d9650cc21e93d080320b8b3240c32f93a74" +checksum = "6d0f2f73225d1a6ffd7bce1737906d368e0e91ab4c65f305811e4d0c1ce4be0a" dependencies = [ "blosc-src", "bytemuck", @@ -1736,6 +1736,7 @@ dependencies = [ "thiserror", "thread_local", "unsafe_cell_slice", + "zarrs_filesystem", "zarrs_metadata", "zarrs_storage", "zfp-sys", @@ -1753,7 +1754,6 @@ dependencies = [ "serde_json", "tempfile", "zarrs", - "zarrs_filesystem", ] [[package]] @@ -1792,9 +1792,9 @@ dependencies = [ [[package]] name = "zarrs_storage" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d251ae27d0b8a1bb24d926c34210b9f6af112e35b5397fddb7f170375d361d2a" +checksum = "a9edd30d0781dab48665e309e8097220b1ad9e32ab594f0871856e05291de72c" dependencies = [ "bytes", "derive_more", diff --git a/Cargo.toml b/Cargo.toml index 795ea4a..29a6d1d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,8 +29,7 @@ cbindgen = { version = "0.27", optional = true } ffi-support = "0.4.4" once_cell = "1.18.0" serde_json = "1.0.71" -zarrs = { version = "0.17.0-beta.1" } -zarrs_filesystem = { version = "0.1.0" } +zarrs = { version = "0.17.0-beta.2" } # [patch.crates-io] # zarrs = { path = "../zarrs" } diff --git a/src/array/array_sharded.rs b/src/array/array_sharded.rs index da041f0..956b74b 100644 --- a/src/array/array_sharded.rs +++ b/src/array/array_sharded.rs @@ -12,10 +12,10 @@ use crate::{ZarrsResult, LAST_ERROR}; use super::{array_fn, ZarrsArray, ZarrsArrayEnum}; #[doc(hidden)] -pub struct ZarrsShardIndexCache_T(pub ArrayShardedReadableExtCache<'static>); +pub struct ZarrsShardIndexCache_T(pub ArrayShardedReadableExtCache); impl std::ops::Deref for ZarrsShardIndexCache_T { - type Target = ArrayShardedReadableExtCache<'static>; + type Target = ArrayShardedReadableExtCache; fn deref(&self) -> &Self::Target { &self.0 } @@ -155,9 +155,9 @@ pub unsafe extern "C" fn zarrsDestroyShardIndexCache( } } -fn zarrsArrayRetrieveInnerChunkImpl<'a, T: ReadableStorageTraits + ?Sized + 'static>( - array: &'a Array, - cache: &'a ArrayShardedReadableExtCache<'a>, +fn zarrsArrayRetrieveInnerChunkImpl( + array: &Array, + cache: &ArrayShardedReadableExtCache, chunk_indices: &[u64], chunk_bytes_length: usize, chunk_bytes: *mut u8, @@ -252,9 +252,9 @@ pub unsafe extern "C" fn zarrsArrayRetrieveInnerChunk( } } -fn zarrsArrayRetrieveSubsetShardedImpl<'a, T: ReadableStorageTraits + ?Sized + 'static>( - array: &'a Array, - cache: &'a ArrayShardedReadableExtCache<'a>, +fn zarrsArrayRetrieveSubsetShardedImpl( + array: &Array, + cache: &ArrayShardedReadableExtCache, array_subset: &ArraySubset, subset_bytes_length: usize, subset_bytes: *mut u8, diff --git a/src/storage.rs b/src/storage.rs index d1a877f..f409db3 100644 --- a/src/storage.rs +++ b/src/storage.rs @@ -39,7 +39,7 @@ pub unsafe extern "C" fn zarrsCreateStorageFilesystem( pStorage: *mut ZarrsStorage, ) -> ZarrsResult { let path = std::path::Path::new(path.as_str()); - match zarrs_filesystem::FilesystemStore::new(path) { + match zarrs::filesystem::FilesystemStore::new(path) { Ok(store) => { *pStorage = Box::into_raw(Box::new(ZarrsStorage_T(ZarrsStorageEnum::RW(Arc::new( store, diff --git a/tests/array.rs b/tests/array.rs index 6ba10ae..75f7196 100644 --- a/tests/array.rs +++ b/tests/array.rs @@ -10,7 +10,7 @@ pub fn assert_cxx_str(input_as_string: &str) -> Assert { fn ffi_array_write_rust_read_c() { use std::sync::Arc; use zarrs::array::{DataType, FillValue}; - use zarrs_filesystem::FilesystemStore; + use zarrs::filesystem::FilesystemStore; let tmp_path = tempfile::tempdir().unwrap(); std::env::set_var(