Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gate features that depend on default #852

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
22 changes: 11 additions & 11 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ pub mod terminal;

// Other modules

#[cfg(feature = "application")]
#[cfg(all(feature = "default", feature = "application"))]
pub mod application;
#[cfg(feature = "options")]
#[cfg(all(feature = "default", feature = "options"))]
pub mod command;
#[cfg(feature = "application")]
#[cfg(all(feature = "default", feature = "application"))]
pub mod component;
#[cfg(feature = "config")]
#[cfg(all(feature = "default", feature = "config"))]
pub mod config;
pub mod path;
#[cfg(feature = "application")]
#[cfg(all(feature = "default", feature = "application"))]
pub mod prelude;
mod runnable;
#[cfg(feature = "application")]
#[cfg(all(feature = "default", feature = "application"))]
mod shutdown;
#[cfg(feature = "testing")]
#[cfg(all(feature = "default", feature = "testing"))]
pub mod testing;
pub mod thread;
#[cfg(feature = "trace")]
Expand All @@ -56,17 +56,17 @@ pub use crate::{
};
pub use std::collections::{btree_map as map, btree_set as set, BTreeMap as Map};

#[cfg(feature = "application")]
#[cfg(all(feature = "default", feature = "application"))]
pub use crate::{
application::{boot, Application},
component::Component,
shutdown::Shutdown,
};

#[cfg(feature = "config")]
#[cfg(all(feature = "default", feature = "config"))]
pub use crate::config::{Config, Configurable};

#[cfg(feature = "options")]
#[cfg(all(feature = "default", feature = "options"))]
pub use crate::{command::Command, path::StandardPaths};

// Re-exported modules/types from third-party crates
Expand All @@ -78,5 +78,5 @@ pub use fs_err as fs;
pub use secrecy as secret;
#[cfg(feature = "secrets")]
pub use secrecy::Secret;
#[cfg(feature = "application")]
#[cfg(all(feature = "default", feature = "application"))]
pub use semver::Version;
2 changes: 1 addition & 1 deletion core/src/terminal.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Terminal handling (TTY interactions, colors, etc)

#[cfg(feature = "application")]
#[cfg(all(feature = "default", feature = "application"))]
pub mod component;
#[macro_use]
pub mod status;
Expand Down
4 changes: 2 additions & 2 deletions core/src/trace.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! Tracing subsystem

#[cfg(feature = "application")]
#[cfg(all(feature = "default", feature = "application"))]
pub mod component;
mod config;

#[cfg(feature = "application")]
#[cfg(all(feature = "default", feature = "application"))]
pub use self::component::Tracing;
pub use self::config::Config;
2 changes: 1 addition & 1 deletion core/tests/component.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Tests for Abscissa's component functionality

#![cfg(feature = "default")]
mod example_app;

use self::example_app::{ExampleApp, ExampleConfig};
Expand Down
2 changes: 1 addition & 1 deletion core/tests/example_app/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Example application used for testing purposes

#![cfg(feature = "default")]
use abscissa_core::{
application, clap::Parser, config, Application, Command, Configurable, FrameworkError,
Runnable, StandardPaths,
Expand Down