Skip to content

Commit d7c5ba6

Browse files
authored
chore: update dependencies (#263)
* chore: update dependencies * fix(flake): add SystemConfiguration to buildInputs
1 parent bada1c3 commit d7c5ba6

File tree

10 files changed

+83
-59
lines changed

10 files changed

+83
-59
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[workspace]
2+
resolver = "2"
23
members = [
34
"eventually",
45
"eventually-macros",

eventually-macros/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ edition = "2021"
77
proc-macro = true
88

99
[dependencies]
10-
syn = { version = "1.0", features = ["full"] }
11-
quote = "1.0"
10+
syn = { version = "1.0.109", features = ["full"] }
11+
quote = "1.0.33"
1212
eventually = { path = "../eventually" }

eventually-postgres/Cargo.toml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,26 @@ categories = ["web-programming", "asynchronous"]
1212
keywords = ["postgres", "postgresql", "database", "ddd", "event-sourcing"]
1313

1414
[dependencies]
15-
async-trait = "0.1.57"
16-
chrono = "0.4.22"
17-
eventually = { path = "../eventually", version = "0.5.0", features = ["serde-json"] }
18-
futures = "0.3.24"
15+
async-trait = "0.1.74"
16+
chrono = "0.4.31"
17+
eventually = { path = "../eventually", version = "0.5.0", features = [
18+
"serde-json",
19+
] }
20+
futures = "0.3.29"
1921
lazy_static = "1.4.0"
20-
regex = "1.6.0"
21-
sqlx = { version = "0.6.2", features = [ "runtime-tokio-rustls" , "postgres", "migrate" ] }
22-
thiserror = "1.0.36"
22+
regex = "1.10.2"
23+
sqlx = { version = "0.7.2", features = [
24+
"runtime-tokio-rustls",
25+
"postgres",
26+
"migrate",
27+
] }
28+
thiserror = "1.0.50"
2329

2430
[dev-dependencies]
25-
tokio = { version = "1.21.1", features = ["macros", "rt"] }
26-
eventually = { path = "../eventually", version = "0.5.0", features = ["serde-json"] }
31+
tokio = { version = "1.34.0", features = ["macros", "rt"] }
32+
eventually = { path = "../eventually", version = "0.5.0", features = [
33+
"serde-json",
34+
] }
2735
eventually-macros = { path = "../eventually-macros", version = "0.1.0" }
28-
serde = { version = "1.0.130", features = ["derive"] }
36+
serde = { version = "1.0.192", features = ["derive"] }
2937
rand = "0.8.5"

eventually-postgres/src/aggregate.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ where
118118
.bind(expected_version as i32)
119119
.bind(root.version() as i32)
120120
.bind(bytes_state)
121-
.execute(tx)
121+
.execute(&mut **tx)
122122
.await
123123
.map_err(|err| match crate::check_for_conflict_error(&err) {
124124
Some(err) => SaveError::Conflict(err),
@@ -160,8 +160,8 @@ where
160160

161161
let row = sqlx::query(
162162
r#"SELECT version, state
163-
FROM aggregates
164-
WHERE aggregate_id = $1 AND "type" = $2"#,
163+
FROM aggregates
164+
WHERE aggregate_id = $1 AND "type" = $2"#,
165165
)
166166
.bind(&aggregate_id)
167167
.bind(T::type_name())
@@ -219,7 +219,7 @@ where
219219
.map_err(SaveError::BeginTransaction)?;
220220

221221
sqlx::query("SET TRANSACTION ISOLATION LEVEL SERIALIZABLE DEFERRABLE")
222-
.execute(&mut tx)
222+
.execute(&mut *tx)
223223
.await?;
224224

225225
let aggregate_id = root.aggregate_id().to_string();

eventually-postgres/src/event.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ where
8989
.bind(event_version)
9090
.bind(serialized_event)
9191
.bind(sqlx::types::Json(metadata))
92-
.execute(tx)
92+
.execute(&mut **tx)
9393
.await?;
9494

9595
Ok(())
@@ -267,7 +267,7 @@ where
267267
.map_err(AppendError::BeginTransaction)?;
268268

269269
sqlx::query("SET TRANSACTION ISOLATION LEVEL SERIALIZABLE DEFERRABLE")
270-
.execute(&mut tx)
270+
.execute(&mut *tx)
271271
.await?;
272272

273273
let string_id = id.to_string();
@@ -279,7 +279,7 @@ where
279279
sqlx::query("SELECT * FROM upsert_event_stream_with_no_version_check($1, $2)")
280280
.bind(&string_id)
281281
.bind(events_len)
282-
.fetch_one(&mut tx)
282+
.fetch_one(&mut *tx)
283283
.await
284284
.and_then(|row| row.try_get(0))?
285285
},
@@ -290,7 +290,7 @@ where
290290
.bind(&string_id)
291291
.bind(v as i32)
292292
.bind(new_version as i32)
293-
.execute(&mut tx)
293+
.execute(&mut *tx)
294294
.await
295295
.map_err(|err| match crate::check_for_conflict_error(&err) {
296296
Some(err) => AppendError::Conflict(err),

eventually/Cargo.toml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ license = "MIT"
88
readme = "../README.md"
99
repository = "https://github.com/get-eventually/eventually-rs"
1010

11-
categories = ["rust-patterns", "web-programming", "asynchronous", "data-structures"]
11+
categories = [
12+
"rust-patterns",
13+
"web-programming",
14+
"asynchronous",
15+
"data-structures",
16+
]
1217
keywords = ["architecture", "ddd", "event-sourcing", "cqrs", "es"]
1318

1419
[features]
@@ -20,18 +25,19 @@ serde-protobuf = ["dep:protobuf", "dep:protobuf-json-mapping"]
2025
full = ["serde-prost", "serde-json", "serde-protobuf", "tracing"]
2126

2227
[dependencies]
23-
async-trait = "0.1.57"
24-
futures = "0.3.24"
25-
thiserror = "1.0.30"
26-
prost = { version = "0.11.0", optional = true }
27-
serde_json = { version = "1.0.69", optional = true }
28-
serde = { version = "1.0.130", features = ["derive"] }
29-
protobuf = { version = "3.2.0", optional = true }
30-
protobuf-json-mapping = { version = "3.2.0", optional = true }
31-
tracing = { version = "0.1.36", features = ["async-await"], optional = true }
28+
async-trait = "0.1.74"
29+
futures = "0.3.29"
30+
thiserror = "1.0.50"
31+
prost = { version = "0.12.1", optional = true }
32+
serde_json = { version = "1.0.108", optional = true }
33+
serde = { version = "1.0.192", features = ["derive"] }
34+
protobuf = { version = "3.3.0", optional = true }
35+
protobuf-json-mapping = { version = "3.3.0", optional = true }
36+
tracing = { version = "0.1.40", features = ["async-await"], optional = true }
3237

3338
[dev-dependencies]
34-
anyhow = "1.0.51" # NOTE: this is only used for test components and assertions.
39+
# NOTE: this is only used for test components and assertions.
40+
anyhow = "1.0.75"
3541
lazy_static = "1.4.0"
36-
serde_json = "1.0.69"
37-
tokio = { version = "1.13.0", features = ["macros", "rt-multi-thread"] }
42+
serde_json = "1.0.108"
43+
tokio = { version = "1.34.0", features = ["macros", "rt-multi-thread"] }

examples/bank-accounting/Cargo.toml

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,36 @@ readme = "README.md"
66
publish = false
77

88
[dependencies]
9-
anyhow = "1.0.51"
10-
async-trait = "0.1.52"
11-
eventually = { path = "../../eventually", features = ["serde-prost", "tracing"] }
9+
anyhow = "1.0.75"
10+
async-trait = "0.1.74"
11+
eventually = { path = "../../eventually", features = [
12+
"serde-prost",
13+
"tracing",
14+
] }
1215
eventually-macros = { path = "../../eventually-macros" }
1316
eventually-postgres = { path = "../../eventually-postgres" }
14-
opentelemetry = { version = "0.18.0", features = ["rt-tokio"] }
15-
opentelemetry-jaeger = { version = "0.17.0", features = ["rt-tokio"] }
16-
prost = "0.11.0"
17-
rust_decimal = "1.18.0"
18-
sqlx = { version = "0.6.2", features = [ "runtime-tokio-rustls" , "postgres" ] }
19-
thiserror = "1.0.30"
20-
tokio = { version = "1.13.0", features = ["macros", "rt-multi-thread"] }
21-
tonic = { version = "0.8.1", features = ["gzip", "transport"] }
22-
tonic-health = "0.8.0"
23-
tonic-reflection = "0.6.0"
24-
tower = "0.4.11"
25-
tower-http = { version = "0.4.0", features = ["trace"] }
26-
tracing = "0.1.29"
27-
tracing-opentelemetry = "0.18.0"
28-
tracing-subscriber = { version = "0.3.3", features = ["fmt", "std", "registry", "env-filter"] }
17+
opentelemetry = "0.21.0"
18+
opentelemetry-jaeger = "0.20.0"
19+
prost = "0.12.1"
20+
rust_decimal = "1.32.0"
21+
sqlx = { version = "0.7.2", features = ["runtime-tokio-rustls", "postgres"] }
22+
thiserror = "1.0.50"
23+
tokio = { version = "1.34.0", features = ["macros", "rt-multi-thread"] }
24+
tonic = { version = "0.10.2", features = ["gzip", "transport"] }
25+
tonic-health = "0.10.2"
26+
tonic-reflection = "0.10.2"
27+
tower = "0.4.13"
28+
tower-http = { version = "0.4.4", features = ["trace"] }
29+
tracing = "0.1.40"
30+
tracing-opentelemetry = "0.22.0"
31+
tracing-subscriber = { version = "0.3.17", features = [
32+
"fmt",
33+
"std",
34+
"registry",
35+
"env-filter",
36+
] }
2937

3038
[dev-dependencies]
3139

3240
[build-dependencies]
33-
tonic-build = { version = "0.8.0", features = ["prost"] }
41+
tonic-build = { version = "0.10.2", features = ["prost"] }

examples/bank-accounting/src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ async fn main() -> anyhow::Result<()> {
3434

3535
let reflection_svc = tonic_reflection::server::Builder::configure()
3636
.register_encoded_file_descriptor_set(proto::FILE_DESCRIPTOR_SET)
37-
.register_encoded_file_descriptor_set(
38-
tonic_health::proto::GRPC_HEALTH_V1_FILE_DESCRIPTOR_SET,
39-
)
37+
.register_encoded_file_descriptor_set(tonic_health::pb::FILE_DESCRIPTOR_SET)
4038
.build()
4139
.map_err(|e| anyhow!("failed to build grpc reflection service: {}", e))?;
4240

examples/bank-accounting/src/postgres.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ pub async fn connect() -> anyhow::Result<PgPool> {
1212
.port(5432)
1313
.username("postgres")
1414
.password("password")
15-
.ssl_mode(PgSslMode::Disable);
16-
17-
connect_options.log_statements(LevelFilter::Debug);
15+
.ssl_mode(PgSslMode::Disable)
16+
.log_statements(LevelFilter::Debug);
1817

1918
Ok(PgPool::connect_with(connect_options).await?)
2019
}

flake.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,15 @@
2222
};
2323

2424
nativeBuildInputs = with pkgs; [ rust-bin.nightly.latest.default protobuf3_24 ];
25+
26+
buildInputs = with pkgs; [ pkg-config openssl ] ++ lib.optionals stdenv.isDarwin [
27+
darwin.apple_sdk.frameworks.SystemConfiguration
28+
];
2529
in
2630
with pkgs;
2731
{
2832
devShells.default = with pkgs; mkShell {
29-
inherit nativeBuildInputs;
33+
inherit nativeBuildInputs buildInputs;
3034

3135
PROTOC = "${protobuf3_24}/bin/protoc";
3236
};

0 commit comments

Comments
 (0)