Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
fix: remove feature flags
Browse files Browse the repository at this point in the history
  • Loading branch information
gruberb authored and JDawg287 committed Nov 9, 2023
1 parent d62003c commit 02f5b3c
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 58 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/docker_utils.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: template - docker

env:
DEFAULT_FEATURES: tce,sequencer,network,node,subnet
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
AWS_SHARED_CREDENTIALS_FILE: "${{ github.workspace }}/.aws/credentials"
Expand All @@ -19,10 +18,6 @@ on:
required: false
type: string
default: stable
features:
required: false
type: string
default: tce,sequencer,network,node,subnet
outputs:
tags:
description: "Docker tags"
Expand Down
2 changes: 1 addition & 1 deletion crates/topos-p2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ test-log.workspace = true
env_logger.workspace = true
rstest = { workspace = true, features = ["async-timeout"] }
tracing-subscriber.workspace = true
topos-test-sdk = { path = "../topos-test-sdk/", features = ["tce"] }
topos-test-sdk = { path = "../topos-test-sdk/" }
rand.workspace = true
2 changes: 1 addition & 1 deletion crates/topos-tce-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ serial_test.workspace = true
byteorder = "1.4.3"
dockertest = "0.3.1"
topos-tce-storage = { path = "../topos-tce-storage" }
topos-test-sdk = { path = "../topos-test-sdk/", features=["tce"] }
topos-test-sdk = { path = "../topos-test-sdk/" }
24 changes: 6 additions & 18 deletions crates/topos-test-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ workspace = true
topos-core = { workspace = true, features = ["uci", "api"] }
topos-crypto = { path = "../topos-crypto/" }
topos-p2p = { path = "../topos-p2p/" }
topos-tce = { path = "../topos-tce/", optional = true }
topos-tce-api = { path = "../topos-tce-api/", optional = true }
topos-tce-broadcast = { path = "../topos-tce-broadcast/", optional = true }
topos-tce-gatekeeper = { path = "../topos-tce-gatekeeper/", optional = true }
topos-tce = { path = "../topos-tce/" }
topos-tce-api = { path = "../topos-tce-api/" }
topos-tce-broadcast = { path = "../topos-tce-broadcast/" }
topos-tce-gatekeeper = { path = "../topos-tce-gatekeeper/" }
topos-tce-storage = { path = "../topos-tce-storage/" }
topos-tce-synchronizer = { path = "../topos-tce-synchronizer/", optional = true }
topos-tce-transport = { path = "../topos-tce-transport/", optional = true }
topos-tce-synchronizer = { path = "../topos-tce-synchronizer/" }
topos-tce-transport = { path = "../topos-tce-transport/" }

hex.workspace = true
ethers.workspace = true
Expand All @@ -42,17 +42,5 @@ tokio.workspace = true
tracing.workspace = true
async-stream.workspace = true

[features]
default = []
tce = [
"topos-core/api",
"topos-tce",
"topos-tce-api",
"topos-tce-broadcast",
"topos-tce-gatekeeper",
"topos-tce-synchronizer",
"topos-tce-transport",
]

[build-dependencies]
tonic-build.workspace = true
1 change: 0 additions & 1 deletion crates/topos-test-sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ pub mod networking;
pub mod p2p;
pub mod sequencer;
pub mod storage;
#[cfg(feature = "tce")]
pub mod tce;

use std::{collections::HashSet, net::SocketAddr, sync::Mutex};
Expand Down
15 changes: 6 additions & 9 deletions crates/topos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ edition = "2021"
workspace = true

[dependencies]
topos-tce = { path = "../topos-tce/", optional = true }
topos-tce = { path = "../topos-tce/" }
topos-p2p = { path = "../topos-p2p" }
topos-tce-transport = { path = "../topos-tce-transport", optional = true }
topos-sequencer = { path = "../topos-sequencer", optional = true }
topos-tce-transport = { path = "../topos-tce-transport" }
topos-sequencer = { path = "../topos-sequencer" }
topos-core = { workspace = true, features = ["api"] }
topos-certificate-spammer = { path = "../topos-certificate-spammer", optional = true }
topos-certificate-spammer = { path = "../topos-certificate-spammer" }
topos-tce-broadcast = { path = "../topos-tce-broadcast", optional = true }
topos-wallet = { path = "../topos-wallet" }

Expand Down Expand Up @@ -54,7 +54,7 @@ topos-tce-synchronizer = { path = "../topos-tce-synchronizer" }
topos-tce-gatekeeper = { path = "../topos-tce-gatekeeper" }
topos-tce-api = { path = "../topos-tce-api" }
topos-tce-storage = { path = "../topos-tce-storage" }
topos-test-sdk = { path = "../topos-test-sdk", features = ["tce"] }
topos-test-sdk = { path = "../topos-test-sdk" }
serde.workspace = true
serde_json.workspace = true
test-log.workspace = true
Expand All @@ -68,8 +68,5 @@ rstest = { workspace = true, features = ["async-timeout"] }
tempfile = "3.8.0"

[features]
default = ["node", "regtest", "setup"]
default = []
broadcast_via_channels = ["default", "topos-tce-broadcast/task-manager-channels"]
node = []
setup = []
regtest = ["topos-certificate-spammer"]
3 changes: 0 additions & 3 deletions crates/topos/src/components/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[cfg(feature = "node")]
pub(crate) mod node;
#[cfg(feature = "regtest")]
pub(crate) mod regtest;
#[cfg(feature = "setup")]
pub(crate) mod setup;
5 changes: 0 additions & 5 deletions crates/topos/src/config/mod.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#[cfg(feature = "node")]
pub(crate) mod base;
#[cfg(feature = "node")]
pub(crate) mod edge;
#[cfg(feature = "node")]
pub(crate) mod node;
#[cfg(feature = "sequencer")]
pub(crate) mod sequencer;
#[cfg(feature = "tce")]
pub mod tce;

pub(crate) mod genesis;
Expand Down
6 changes: 0 additions & 6 deletions crates/topos/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ pub(crate) mod components;
pub(crate) mod options;
mod tracing;

#[cfg(feature = "node")]
mod config;

#[cfg(feature = "node")]
mod edge;

use crate::options::ToposCommand;
Expand All @@ -20,11 +17,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let args = options::Opt::parse();

match args.commands {
#[cfg(feature = "setup")]
ToposCommand::Setup(cmd) => components::setup::handle_command(cmd).await,
#[cfg(feature = "node")]
ToposCommand::Node(cmd) => components::node::handle_command(cmd).await,
#[cfg(feature = "regtest")]
ToposCommand::Regtest(cmd) => components::regtest::handle_command(cmd).await,
}
}
10 changes: 1 addition & 9 deletions crates/topos/src/options.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
use clap::{Parser, Subcommand};
use std::{ffi::OsString, path::PathBuf};

#[cfg(feature = "setup")]
use crate::components::setup::commands::SetupCommand;

#[cfg(feature = "node")]
use crate::components::node::commands::NodeCommand;

#[cfg(feature = "regtest")]
use crate::components::regtest::commands::RegtestCommand;
use crate::components::setup::commands::SetupCommand;

pub(crate) mod input_format;

Expand Down Expand Up @@ -48,10 +43,7 @@ fn get_default_home() -> OsString {

#[derive(Subcommand, Debug)]
pub(crate) enum ToposCommand {
#[cfg(feature = "setup")]
Setup(SetupCommand),
#[cfg(feature = "node")]
Node(NodeCommand),
#[cfg(feature = "regtest")]
Regtest(RegtestCommand),
}

0 comments on commit 02f5b3c

Please sign in to comment.