Skip to content

Commit

Permalink
Remove postgres feature (#204)
Browse files Browse the repository at this point in the history
* Remove postgres feature

* Changelog
  • Loading branch information
Victor-N-Suadicani authored Aug 27, 2024
1 parent 63580c5 commit 3445723
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 573 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: |
rustup default $RUST_VERSION
rustup component add rust-docs
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --features postgres --color=always
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --color=always
# Check compilation of just the crate without tests and examples. This is to
# make sure that the features are correctly set for the normal dependencies.
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
run: |
rustup default $RUST_VERSION
rustup component add clippy
cargo clippy --features=postgres --color=always --tests --benches --examples -- -D warnings
cargo clippy --color=always --tests --benches --examples -- -D warnings
# Examples can be large with a lot of debug info due to tokio. So we
# disable debug info generation.
RUSTFLAGS="-C debuginfo=0" cargo test
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
baker with delegation from protocol 7.
- `BakerEvent` adds a `DelegationRemove` case, as `ConfigureBaker` can replace a delegator
with a baker from protocol 7.
- Removed the `postgres` feature and all associated functionality. The intent is for this to be part of [the transaction logger](https://github.com/Concordium/concordium-transaction-logger) instead.

## 4.3.0

Expand Down
10 changes: 0 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ rand = {version = "0.8", features = ["small_rng"]}
num = "0.4"
num-bigint = "0.4"
num-traits = "0.2"
tokio-postgres = { version = "^0.7.8", features = ["with-serde_json-1"], optional = true }
http = "0.2"
tokio-stream = "0.1"

Expand All @@ -44,7 +43,6 @@ aes-gcm = { version = "0.10", features = ["std"] }
tracing = "0.1"

[features]
postgres = ["tokio-postgres"]
generate-protos = ["tonic-build", "git2"]

[dev-dependencies]
Expand All @@ -57,14 +55,6 @@ tonic = {version = "0.10", features = ["tls", "tls-roots"]} # Use system trust r
tracing-subscriber = "0.3"
sqlite = "0.33"

[[example]]
name = "postgres"
required-features = ["postgres"]

[[example]]
name = "monitor-postgres"
required-features = ["postgres"]

[build-dependencies]
tonic-build = {version = "0.10", optional = true}
git2 = {version = "0.18", optional = true}
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ for example
cargo build --release --example v2_send_transfer
```

## Optional features

The SDK has an optional `postgres` feature which enables functionality to
interface with a postgres database where the node logs transactions indexed by
affected account.

## Documentation

The rendered documentation is available at https://docs.rs/concordium-rust-sdk/latest/
Expand Down
102 changes: 0 additions & 102 deletions examples/monitor-postgres.rs

This file was deleted.

81 changes: 0 additions & 81 deletions examples/postgres.rs

This file was deleted.

4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ pub mod constants;
/// structured values.
pub mod endpoints;
mod internal;
/// Interface to the (optional) postgres database that the node logs finalized
/// transactions in.
#[cfg(feature = "postgres")]
pub mod postgres;
/// Type definitions used throughout the rest of the SDK.
pub mod types;

Expand Down
Loading

0 comments on commit 3445723

Please sign in to comment.