While we used aws dependencies in all services, future diffs will make comm-lib a (transitive) dependency of native_rust_library. These dependencies aren't needed there so I'm introducing a new feature flag that hides them and the modules that depend on aws crates.
Details
- Reviewers
bartek varun kamil - Commits
- rCOMMa05bedf1472e: [comm-lib] Hide aws behind a feature flag
Check that all services compile
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
services/backup/Cargo.toml | ||
---|---|---|
20 ↗ | (On Diff #34431) |
Initially I thought about extracting this feature to ddb / database / dynamodb and separating out aws-sdk-secretsmanager. But you merged them here and perhaps that makes sense. Curious about your reasoning here |
shared/comm-lib/src/blob/types.rs | ||
10 ↗ | (On Diff #34431) | Don't you need to use this mod in clients? Everything compiles though, I got confused 🤨 |
services/backup/Cargo.toml | ||
---|---|---|
20 ↗ | (On Diff #34431) | Never mind, this is probably the best way to go here |
services/backup/Cargo.toml | ||
---|---|---|
20 ↗ | (On Diff #34431) | I don't really have a strong reason, this was just a simplest solution. Before these changes all services included all of aws dependencies so I didn't thought there was a reason to split them up. But we definitely could have something like: [features] aws = ["dep:aws-config", "dep:aws-types"] dynamodb = ["aws", "aws-sdk-dynamodb"] secretsmanager = ["aws", "aws-sdk-secrets-manager"] but I don't feel like we gain much from it. |
shared/comm-lib/src/blob/types.rs | ||
10 ↗ | (On Diff #34431) | To use trait methods you only need to import the trait itself (assuming that's what you meant), the actual implementation can be anywhere. If we defined a trait in db_conversions than we would have to import it. Simplified example: trait Trait { fn trait_fn(){} } struct A; mod inner { use super::{A, Trait}; impl Trait for A {} } mod client { use super::{A, Trait}; fn _run_client() { A::trait_fn(); } } |