Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

bug: cargo build fails with avail feature flag #1481

Closed
SamrendraS opened this issue Feb 28, 2024 · 2 comments
Closed

bug: cargo build fails with avail feature flag #1481

SamrendraS opened this issue Feb 28, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@SamrendraS
Copy link
Contributor

Bug Report

Current behavior:
Building Madara with the Avail feature flag fails returning errors E0107, E0412, E0433.

Error log:

error[E0412]: cannot find type `PathBuf` in this scope
  --> crates/client/data-availability/src/avail/config.rs:24:15
   |
24 | impl TryFrom<&PathBuf> for AvailConfig {
   |               ^^^^^^^ not found in this scope
   |
help: consider importing this struct
   |
1  + use std::path::PathBuf;
   |

error[E0412]: cannot find type `DaErr` in this scope
  --> crates/client/data-availability/src/avail/config.rs:25:18
   |
25 |     type Error = DaErr;
   |                  ^^^^^ not found in this scope

error[E0412]: cannot find type `PathBuf` in this scope
  --> crates/client/data-availability/src/avail/config.rs:26:24
   |
26 |     fn try_from(path: &PathBuf) -> Result<Self, Self::Error> {
   |                        ^^^^^^^ not found in this scope
   |
help: consider importing this struct
   |
1  + use std::path::PathBuf;
   |

error[E0433]: failed to resolve: use of undeclared type `File`
  --> crates/client/data-availability/src/avail/config.rs:27:20
   |
27 |         let file = File::open(path).map_err(|e| DaError::FailedOpeningConfig(e))?;
   |                    ^^^^ use of undeclared type `File`
   |
help: consider importing one of these items
   |
1  + use std::fs::File;
   |
1  + use tokio::fs::File;
   |

warning: unused import: `DaLayer`
 --> crates/client/data-availability/src/avail/config.rs:3:22
  |
3 | use crate::{DaError, DaLayer, DaMode};
  |                      ^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `DaLayer`
  --> crates/client/data-availability/src/avail/mod.rs:18:32
   |
18 | use crate::{DaClient, DaError, DaLayer, DaMode};
   |                                ^^^^^^^

error[E0107]: enum takes 2 generic arguments but 1 generic argument was supplied
   --> crates/client/data-availability/src/avail/mod.rs:78:45
    |
78  |     async fn last_published_state(&self) -> Result<I256> {
    |                                             ^^^^^^ ---- supplied 1 generic argument
    |                                             |
    |                                             expected 2 generic arguments
    |
note: enum defined here, with 2 generic parameters: `T`, `E`
   --> /home/samrendra/.rustup/toolchains/nightly-2023-08-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:502:10
    |
502 | pub enum Result<T, E> {
    |          ^^^^^^ -  -
help: add missing generic argument
    |
78  |     async fn last_published_state(&self) -> Result<I256, E> {
    |                                                        +++
error: could not compile `mc-data-availability` (lib) due to 5 previous errors; 2 warnings emitted
@SamrendraS SamrendraS added the bug Something isn't working label Feb 28, 2024
@SamrendraS
Copy link
Contributor Author

Can I take this? Thanks

tdelabro added a commit that referenced this issue Mar 19, 2024
… (#1487)

Co-authored-by: apoorvsadana <95699312+apoorvsadana@users.noreply.github.com>
Co-authored-by: 0xevolve <Artevolve@yahoo.com>
Co-authored-by: Timothée Delabrouille <34384633+tdelabro@users.noreply.github.com>
Co-authored-by: anondev1993 <114292591+anondev1993@users.noreply.github.com>
@SamrendraS
Copy link
Contributor Author

Fixed with #1487

hhamud pushed a commit to hhamud/madara that referenced this issue Mar 29, 2024
…-starknet-strange#1481) (keep-starknet-strange#1487)

Co-authored-by: apoorvsadana <95699312+apoorvsadana@users.noreply.github.com>
Co-authored-by: 0xevolve <Artevolve@yahoo.com>
Co-authored-by: Timothée Delabrouille <34384633+tdelabro@users.noreply.github.com>
Co-authored-by: anondev1993 <114292591+anondev1993@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant