Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1602 from holochain/deprecation-warning-ui-server
Browse files Browse the repository at this point in the history
Add deprecation warning when using conductor UI server
  • Loading branch information
willemolding committed Jul 30, 2019
2 parents 4d3e1ec + e750221 commit a436e71
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG-UNRELEASED.md
Expand Up @@ -10,6 +10,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- The static file server has been replaced and now uses the Nickel crate intead of Hyper. It now correctly sets content type headers and can be configured to bind to a different address in the conductor config toml [#1595](https://github.com/holochain/holochain-rust/pull/1595)
- Optimized get_links so that fewer network calls are made overrall [#1607](https://github.com/holochain/holochain-rust/pull/1607)

- DEPRECATION WARNING, conductor static UI server is to be removed in an upcoming release. Devs will receive a warning when starting a conductor with a UI server configured [PR#1602](https://github.com/holochain/holochain-rust/pull/1602)

### Deprecated

### Removed
Expand Down
8 changes: 8 additions & 0 deletions conductor_api/src/conductor/base.rs
Expand Up @@ -159,6 +159,14 @@ impl Conductor {
let rules = config.logger.rules.clone();
lib3h_sodium::check_init();

if config.ui_bundles.len() > 0 || config.ui_interfaces.len() > 0 {
println!();
println!("{}", std::iter::repeat("!").take(20).collect::<String>());
println!("DEPRECATION WARNING - Hosting a static UI via the conductor will not be supported in future releases");
println!("{}", std::iter::repeat("!").take(20).collect::<String>());
println!();
}

Conductor {
instances: HashMap::new(),
instance_signal_receivers: Arc::new(RwLock::new(HashMap::new())),
Expand Down
3 changes: 3 additions & 0 deletions conductor_api/src/config.rs
Expand Up @@ -64,12 +64,15 @@ pub struct Configuration {
/// List of bridges between instances. Optional.
#[serde(default)]
pub bridges: Vec<Bridge>,

/// !DEPRECATION WARNING! - Hosting a static UI via the conductor will not be supported in future releases
/// List of ui bundles (static web dirs) to host on a static interface. Optional.
#[serde(default)]
pub ui_bundles: Vec<UiBundleConfiguration>,
/// List of ui interfaces, includes references to ui bundles and dna interfaces it can call. Optional.
#[serde(default)]
pub ui_interfaces: Vec<UiInterfaceConfiguration>,

/// Configures how logging should behave. Optional.
#[serde(default)]
pub logger: LoggerConfiguration,
Expand Down

0 comments on commit a436e71

Please sign in to comment.