Skip to content
Merged
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
13 changes: 13 additions & 0 deletions .github/check-for-naughty-dependencies.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesomeeee

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
echo "Checking for openssl-sys in dependency tree..."
if cargo tree -i openssl-sys >/dev/null 2>&1; then
echo "openssl-sys is present in the dependency tree. Please evict it."
exit 1
fi

echo "Checking for native-tls in dependency tree..."
if cargo tree -i native-tls >/dev/null 2>&1; then
echo "native-tls is present in the dependency tree. Please evict it."
exit 1
fi

echo "✅ No naughty dependencies found"
2 changes: 2 additions & 0 deletions .github/workflows/test-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ jobs:
env:
RUST_LOG: debug

- run: bash .github/check-for-naughty-dependencies.sh

# integration-test:
# runs-on: ${{ matrix.os }}
# strategy:
Expand Down
79 changes: 78 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ repository = "https://github.com/tower/tower-cli"
aes-gcm = "0.10"
anyhow = "1.0.95"
async-compression = { version = "0.4", features = ["tokio", "gzip"] }
async_zip = { version = "0.0.16", features = ["tokio", "tokio-fs", "deflate"] }
base64 = "0.22"
bytes = "1"
chrono = { version = "0.4", features = ["serde"] }
Expand All @@ -26,6 +27,7 @@ crypto = { path = "crates/crypto" }
dirs = "5"
futures = "0.3"
futures-util = "0.3"
futures-lite = "2.6"
glob = "0.3"
http = "1.1"
indicatif = "0.17"
Expand Down Expand Up @@ -53,6 +55,7 @@ tower-cmd = { path = "crates/tower-cmd" }
tower-package = { path = "crates/tower-package" }
tower-runtime = { path = "crates/tower-runtime" }
tower-telemetry = { path = "crates/tower-telemetry" }
tower-uv = { path = "crates/tower-uv" }
tracing = { version = "0.1" }
tracing-appender = "0.2"
tracing-subscriber = { version = "0.3", features = ["json", "env-filter"] }
Expand Down
2 changes: 2 additions & 0 deletions crates/tower-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ license = { workspace = true }
[dependencies]
chrono = { workspace = true }
tokio = { workspace = true }
tokio-util = { workspace = true }
snafu = { workspace = true }
tower-package = { workspace = true }
tower-telemetry = { workspace = true }
tower-uv = { workspace = true }
14 changes: 14 additions & 0 deletions crates/tower-runtime/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ pub enum Error {

#[snafu(display("running Tower apps on this platform is not supported"))]
UnsupportedPlatform,

#[snafu(display("cancelled"))]
Cancelled,
}

impl From<std::io::Error> for Error {
Expand All @@ -74,3 +77,14 @@ impl From<std::env::JoinPathsError> for Error {
Error::UnsupportedPlatform
}
}

impl From<tower_uv::Error> for Error {
fn from(err: tower_uv::Error) -> Self {
match err {
tower_uv::Error::IoError(_) => Error::SpawnFailed,
tower_uv::Error::NotFound(_) => Error::SpawnFailed,
tower_uv::Error::PermissionDenied(_) => Error::SpawnFailed,
tower_uv::Error::Other(_) => Error::SpawnFailed,
}
}
}
Loading