fix: update dependencies

fix: cargo fmt
pull/19/head
Amin Yahyaabadi 2 years ago
parent 90dc08d452
commit 7cc3342221

1012
Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -13,14 +13,14 @@ categories = ["development-tools::build-utils", "api-bindings"]
license = "MIT/Apache-2.0"
[dependencies]
either = "1.6"
failure = "0.1"
lazy_static = "1"
log = "0.4"
prost = "0.6"
regex = "1"
serde_json = "1.0"
sha2 = "0.8"
either = "1.6.1"
failure = "0.1.8"
lazy_static = "1.4.0"
log = "0.4.14"
prost = "0.9.0"
regex = "1.5.4"
serde_json = "1.0.79"
sha2 = "0.10.2"
[dependencies.buildkit-proto]
version = "0.2"

@ -1,5 +1,6 @@
#![deny(warnings)]
#![deny(clippy::all)]
#![allow(dead_code)]
// FIXME: get rid of the unwraps
// TODO: implement warnings for op hash collisions (will incredibly help to debug problems).

@ -23,8 +23,8 @@ impl Node {
pub fn get_digest(bytes: &[u8]) -> String {
let mut hasher = Sha256::new();
hasher.input(&bytes);
hasher.update(&bytes);
format!("sha256:{:x}", hasher.result())
format!("sha256:{:x}", hasher.finalize())
}
}

@ -13,12 +13,12 @@ categories = ["development-tools::build-utils", "api-bindings"]
license = "MIT/Apache-2.0"
[dependencies]
prost = "0.6"
prost-types = "0.6"
tonic = { git = "https://github.com/edrevo/tonic", branch = "unimplemented-content-type" }
prost = "0.9.0"
prost-types = "0.9.0"
tonic = { git = "https://github.com/aminya/tonic", branch = "master" }
[build-dependencies.tonic-build]
git = "https://github.com/edrevo/tonic"
branch = "unimplemented-content-type"
default-features = false
features = ["prost", "transport"]
git = "https://github.com/aminya/tonic"
branch = "master"
default-features = true
features = ["prost", "transport"]

@ -5,23 +5,24 @@ authors = ["Ximo Guanter <ximo.guanter@gmail.com>"]
edition = "2018"
[dependencies]
anyhow = "1"
async-trait = "0.1"
crossbeam = "0.7"
either = "1"
env_logger = "0.8"
futures = "0.3"
libc = "0.2"
mio = "0.6"
pin-project = "1"
prost = "0.6"
prost-types = "0.6"
regex = "1.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1"
tokio = { version = "0.2", features = ["macros", "rt-core", "rt-threaded"] }
tonic = { git = "https://github.com/edrevo/tonic", branch = "unimplemented-content-type" }
tower = "0.3"
url = "2.2"
anyhow = "1.0.54"
async-trait = "0.1.52"
crossbeam = "0.8.1"
either = "1.6.1"
env_logger = "0.9.0"
futures = "0.3.21"
libc = "0.2.119"
mio = "0.6.21"
pin-project = "1.0.10"
prost = "0.9.0"
prost-types = "0.9.0"
regex = "1.5.4"
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.79"
tokio = { version = "1.17.0", features = ["macros", "rt", "rt-multi-thread"] }
tokio-stream = "*"
tonic = { git = "https://github.com/aminya/tonic", branch = "master" }
tower = "0.4.12"
url = "2.2.2"
buildkit-llb = { version = "0.2", path = "../buildkit-llb" }
buildkit-proto = { version = "0.2", path = "../buildkit-proto" }

@ -5,7 +5,7 @@ use anyhow::Result;
use buildkit_proto::moby::buildkit::v1::frontend::{
self, llb_bridge_client::LlbBridgeClient, llb_bridge_server::LlbBridge,
};
use crossbeam::{channel, Sender};
use crossbeam::{channel, channel::Sender};
use frontend::{llb_bridge_server::LlbBridgeServer, ReadFileResponse};
use tokio::sync::RwLock;
use tonic::{transport::Channel, transport::Server, Request, Response};
@ -38,7 +38,7 @@ impl DockerfileFrontend {
self.dockerfile_name.clone(),
dockerfile_contents.as_bytes().to_vec(),
)))
.serve_with_incoming(tokio::stream::once(StdioSocket::try_new_rw(
.serve_with_incoming(tokio_stream::once(StdioSocket::try_new_rw(
dockerfile_front.stdout.take().unwrap(),
dockerfile_front.stdin.take().unwrap(),
)))

@ -117,17 +117,17 @@ async fn dockerfile_trap(
let context_layer = solve(&mut client, Terminal::with(context_source.output())).await?;
fn replace(
l : & String,
r : &mut Vec<String>,
c : &mut LlbBridgeClient<Channel>,
ctx : & String
) -> Result<()> {
l: &String,
r: &mut Vec<String>,
c: &mut LlbBridgeClient<Channel>,
ctx: &String,
) -> Result<()> {
if let Some(file_path) = l.trim().strip_prefix(INCLUDE_COMMAND) {
let bytes = executor::block_on(read_file(c, &ctx, file_path.trim_start().to_string(), None))
.with_context(|| format!("Could not read file \"{}\". Remember that the file path is relative to the build context, not the Dockerfile path.", file_path))?;
//recurse
for l2 in std::str::from_utf8(&bytes)?.to_string().lines() {
replace(&l2.to_string(), r, c, &ctx)? ;
replace(&l2.to_string(), r, c, &ctx)?;
}
} else {
r.push(l.to_string());
@ -136,7 +136,7 @@ async fn dockerfile_trap(
}
for line in dockerfile_contents.lines() {
replace(&line.to_string(), &mut result, &mut client, &context_layer)? ;
replace(&line.to_string(), &mut result, &mut client, &context_layer)?;
}
let dockerfile_contents = result.join("\n");
dockerfile_frontend.solve(&dockerfile_contents).await

Loading…
Cancel
Save