Skip to content

Commit

Permalink
edits
Browse files Browse the repository at this point in the history
  • Loading branch information
rauljordan committed Jul 26, 2024
1 parent 7951c00 commit afad358
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
14 changes: 8 additions & 6 deletions check/src/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ fn create_image(version: &str) -> Result<()> {
return Ok(());
}
let cargo_stylus_version = env!("CARGO_PKG_VERSION");
let cargo_stylus_version = cargo_stylus_version

Check failure on line 49 in check/src/docker.rs

View workflow job for this annotation

GitHub Actions / clippy

type annotations needed

error[E0283]: type annotations needed --> check/src/docker.rs:49:9 | 49 | let cargo_stylus_version = cargo_stylus_version | ^^^^^^^^^^^^^^^^^^^^ ... 52 | .collect(); | ------- type must be known at this point | = note: multiple `impl`s satisfying `_: std::iter::FromIterator<char>` found in the `alloc` crate: - impl std::iter::FromIterator<char> for std::boxed::Box<str>; - impl std::iter::FromIterator<char> for std::string::String; note: required by a bound in `std::iter::Iterator::collect` --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/iter/traits/iterator.rs:2001:5 help: consider giving `cargo_stylus_version` an explicit type | 49 | let cargo_stylus_version: Vec<_> = cargo_stylus_version | ++++++++
.chars()
.filter(|c| c.is_alphanumeric() || *c == '-' || *c == '.')
.collect();
println!(
"Building Docker image for cargo-stylus version {} and Rust toolchain {}",
cargo_stylus_version, version,
Expand All @@ -68,16 +72,14 @@ fn create_image(version: &str) -> Result<()> {
RUN rustup target add wasm32-unknown-unknown
RUN rustup target add wasm32-wasi
RUN rustup target add x86_64-unknown-linux-gnu
RUN apt-get update && apt-get install -y git
RUN git clone https://github.com/offchainlabs/cargo-stylus.git
WORKDIR /cargo-stylus
RUN git checkout docker-checks
RUN cargo install --path check --force
RUN cargo install --path main --force
RUN cargo install cargo-stylus-check --version {} --force
RUN cargo install cargo-stylus --version {} --force
",
RUST_BASE_IMAGE_VERSION,
version,
version,
cargo_stylus_version,
cargo_stylus_version,
)?;
child.wait().map_err(|e| eyre!("wait failed: {e}"))?;
Ok(())
Expand Down
6 changes: 0 additions & 6 deletions check/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,6 @@ async fn main_impl(args: Opts) -> Result<()> {
}
Apis::Check(config) => {
if config.no_verify {
println!("WARNING: Running using --no-verify. This is not recommended for production use \
as it will not guarantee reproducible builds.");
run!(check::check(&config).await, "stylus checks failed");
} else {
let mut commands: Vec<String> =
Expand All @@ -309,8 +307,6 @@ async fn main_impl(args: Opts) -> Result<()> {
}
Apis::Deploy(config) => {
if config.check_config.no_verify {
println!("WARNING: Running using --no-verify. This is not recommended for production use \
as it will not guarantee reproducible builds.");
run!(deploy::deploy(config).await, "stylus deploy failed");
} else {
let mut commands: Vec<String> =
Expand All @@ -330,8 +326,6 @@ async fn main_impl(args: Opts) -> Result<()> {
}
Apis::Verify(config) => {
if config.no_verify {
println!("WARNING: Running using --no-verify. This is not recommended for production use \
as it will not guarantee reproducible builds.");
run!(verify::verify(config).await, "failed to verify");
} else {
let mut commands: Vec<String> =
Expand Down

0 comments on commit afad358

Please sign in to comment.