Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(providers): remove deserialize trait #1683

Merged
merged 1 commit into from
Mar 17, 2024

Conversation

ricochet
Copy link
Contributor

Fixes error with provider where deserialize cannot be derived on an Arc.

Feature or Problem

  Compiling wasmcloud-provider-blobstore-fs v0.4.0 (/Users/bhayes/repos/wasmCloud/wasmCloud/crates/providers/blobstore-fs)
error[E0277]: the trait bound `Arc<PathBuf>: Deserialize<'_>` is not satisfied
    --> blobstore-fs/src/lib.rs:45:11
     |
45   |     root: Arc<PathBuf>,
     |           ^^^^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `Arc<PathBuf>`
     |
     = help: the following other types implement trait `Deserialize<'de>`:
               <bool as Deserialize<'de>>
               <char as Deserialize<'de>>
               <isize as Deserialize<'de>>
               <i8 as Deserialize<'de>>
               <i16 as Deserialize<'de>>
               <i32 as Deserialize<'de>>
               <i64 as Deserialize<'de>>
               <i128 as Deserialize<'de>>
             and 244 others
note: required by a bound in `next_element`
    --> /Users/bhayes/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.196/src/de/mod.rs:1726:12
     |
1724 |     fn next_element<T>(&mut self) -> Result<Option<T>, Self::Error>
     |        ------------ required by a bound in this associated function
1725 |     where
1726 |         T: Deserialize<'de>,
     |            ^^^^^^^^^^^^^^^^ required by this bound in `SeqAccess::next_element`

error[E0277]: the trait bound `Arc<PathBuf>: Deserialize<'_>` is not satisfied
    --> blobstore-fs/src/lib.rs:45:11
     |
45   |     root: Arc<PathBuf>,
     |           ^^^^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `Arc<PathBuf>`
     |
     = help: the following other types implement trait `Deserialize<'de>`:
               <bool as Deserialize<'de>>
               <char as Deserialize<'de>>
               <isize as Deserialize<'de>>
               <i8 as Deserialize<'de>>
               <i16 as Deserialize<'de>>
               <i32 as Deserialize<'de>>
               <i64 as Deserialize<'de>>
               <i128 as Deserialize<'de>>
             and 244 others
note: required by a bound in `next_value`
    --> /Users/bhayes/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.196/src/de/mod.rs:1865:12
     |
1863 |     fn next_value<V>(&mut self) -> Result<V, Self::Error>
     |        ---------- required by a bound in this associated function
1864 |     where
1865 |         V: Deserialize<'de>,
     |            ^^^^^^^^^^^^^^^^ required by this bound in `MapAccess::next_value`

error[E0277]: the trait bound `Arc<PathBuf>: Deserialize<'_>` is not satisfied
  --> blobstore-fs/src/lib.rs:45:5
   |
45 |     root: Arc<PathBuf>,
   |     ^^^^ the trait `Deserialize<'_>` is not implemented for `Arc<PathBuf>`
   |
   = help: the following other types implement trait `Deserialize<'de>`:
             <bool as Deserialize<'de>>
             <char as Deserialize<'de>>
             <isize as Deserialize<'de>>
             <i8 as Deserialize<'de>>
             <i16 as Deserialize<'de>>
             <i32 as Deserialize<'de>>
             <i64 as Deserialize<'de>>
             <i128 as Deserialize<'de>>
           and 244 others
note: required by a bound in `_serde::__private::de::missing_field`
  --> /Users/bhayes/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.196/src/private/de.rs:25:8
   |
23 | pub fn missing_field<'de, V, E>(field: &'static str) -> Result<V, E>
   |        ------------- required by a bound in this function
24 | where
25 |     V: Deserialize<'de>,
   |        ^^^^^^^^^^^^^^^^ required by this bound in `missing_field`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `wasmcloud-provider-blobstore-fs` (lib) due to 3 previous errors

Manual Verification

Re-ran cargo build for the

Fixes error with provider where deserialize cannot
be derived on an Arc.

Signed-off-by: Bailey Hayes <behayes2@gmail.com>
@ricochet ricochet requested a review from a team as a code owner March 17, 2024 09:00
@brooksmtownsend brooksmtownsend merged commit ac0752a into main Mar 17, 2024
45 checks passed
@brooksmtownsend brooksmtownsend deleted the blobstore-fs-deserialize branch March 17, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants