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: update dependencies #19

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,012 changes: 490 additions & 522 deletions Cargo.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions buildkit-llb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions buildkit-llb/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
4 changes: 2 additions & 2 deletions buildkit-llb/src/serialization/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}
14 changes: 7 additions & 7 deletions buildkit-proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
37 changes: 19 additions & 18 deletions dockerfile-plus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,24 @@ authors = ["Ximo Guanter <[email protected]>"]
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" }
4 changes: 2 additions & 2 deletions dockerfile-plus/src/dockerfile_frontend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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(),
)))
Expand Down
14 changes: 7 additions & 7 deletions dockerfile-plus/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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
Expand Down