From 863f208659d2af43a11af91a98acdd4889855d27 Mon Sep 17 00:00:00 2001 From: Dan Bond Date: Tue, 2 Jul 2024 15:56:22 +0100 Subject: [PATCH 1/3] chore: remove emojis --- README.md | 2 +- crates/rover-std/README.md | 2 +- crates/rover-std/src/emoji.rs | 61 -------------------- crates/rover-std/src/fs.rs | 17 ++---- crates/rover-std/src/lib.rs | 2 - docs/source/configuring.md | 1 - src/command/dev/compose.rs | 4 +- src/command/dev/do_dev.rs | 13 +++-- src/command/dev/protocol/follower/message.rs | 13 ++--- src/command/dev/protocol/leader.rs | 4 +- src/command/dev/router/command.rs | 15 +++-- src/command/dev/router/config.rs | 9 +-- src/command/dev/router/runner.rs | 5 +- src/command/dev/watcher.rs | 5 +- src/command/supergraph/compose/do_compose.rs | 8 +-- src/options/output.rs | 8 +-- src/options/subgraph.rs | 12 +--- 17 files changed, 44 insertions(+), 137 deletions(-) delete mode 100644 crates/rover-std/src/emoji.rs diff --git a/README.md b/README.md index 343764142..9617e9e45 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Rover -> ✨ πŸ€– 🐢 the new CLI for apollo +>The new CLI for apollo [![CircleCI Tests](https://circleci.com/gh/apollographql/rover.svg?style=svg)](https://app.circleci.com/pipelines/github/apollographql/rover?branch=main) [![GitHub Release Downloads](https://shields.io/github/downloads/apollographql/rover/total.svg)](https://github.com/apollographql/rover/releases/latest) diff --git a/crates/rover-std/README.md b/crates/rover-std/README.md index 520f69c2c..8d5720e49 100644 --- a/crates/rover-std/README.md +++ b/crates/rover-std/README.md @@ -1,3 +1,3 @@ # `rover-std` -`rover-std` provides common utilities that inform Rover's CLI style. You'll find multiple top level exports here that provide wrappers around common functionality like reading/writing files, using emojis, coloring output text, and prompting for user input. +`rover-std` provides common utilities that inform Rover's CLI style. You'll find multiple top level exports here that provide wrappers around common functionality like reading/writing files, using coloring output text, and prompting for user input. diff --git a/crates/rover-std/src/emoji.rs b/crates/rover-std/src/emoji.rs deleted file mode 100644 index 4e131bb87..000000000 --- a/crates/rover-std/src/emoji.rs +++ /dev/null @@ -1,61 +0,0 @@ -use std::fmt::Display; - -use console::Emoji as ConsoleEmoji; - -#[derive(Debug, Copy, Clone)] -pub enum Emoji { - Action, - Compose, - Hourglass, - Listen, - Memo, - New, - Note, - Person, - Reload, - Rocket, - Skull, - Sparkle, - Start, - Stop, - Success, - Warn, - Watch, - Web, -} - -impl Emoji { - fn get(&self) -> &str { - use Emoji::*; - match self { - Action => "🎬 ", - Compose => "🎢 ", - Hourglass => "βŒ› ", - Listen => "πŸ‘‚ ", - Memo => "πŸ“ ", - New => "🐀 ", - Note => "πŸ—’οΈ ", - Person => "πŸ§‘ ", - Reload => "πŸ”ƒ ", - Rocket => "πŸš€ ", - Skull => "πŸ’€ ", - Sparkle => "✨ ", - Start => "πŸ›« ", - Stop => "βœ‹ ", - Success => "βœ… ", - Warn => "⚠️ ", - Watch => "πŸ‘€ ", - Web => "πŸ•ΈοΈ ", - } - } -} - -impl Display for Emoji { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - if std::env::var_os("NO_EMOJI").is_some() { - Ok(()) - } else { - write!(f, "{}", ConsoleEmoji::new(self.get(), "")) - } - } -} diff --git a/crates/rover-std/src/fs.rs b/crates/rover-std/src/fs.rs index f7ab89823..d30392bdf 100644 --- a/crates/rover-std/src/fs.rs +++ b/crates/rover-std/src/fs.rs @@ -14,7 +14,7 @@ use notify::event::ModifyKind; use notify::{EventKind, RecursiveMode, Watcher}; use notify_debouncer_full::new_debouncer; -use crate::{Emoji, RoverStdError}; +use crate::RoverStdError; /// Interact with a file system #[derive(Default, Copy, Clone)] @@ -265,11 +265,7 @@ impl Fs { .expect("thread pool built successfully"); let path = path.as_ref().to_path_buf(); tp.spawn(move || { - eprintln!( - "{}watching {} for changes", - Emoji::Watch, - path.as_std_path().display() - ); + eprintln!("watching {} for changes", path.as_std_path().display()); let path = path.as_std_path(); let (fs_tx, fs_rx) = channel(); // Spawn a debouncer so we don't detect single rather than multiple writes in quick succession, @@ -322,14 +318,12 @@ type WatchSender = Sender>; fn handle_notify_error(tx: &WatchSender, path: &Path, err: notify::Error) { match &err.kind { notify::ErrorKind::PathNotFound => eprintln!( - "{} could not watch \"{}\" for changes: file not found", - Emoji::Warn, + "could not watch \"{}\" for changes: file not found", path.display() ), notify::ErrorKind::MaxFilesWatch => { eprintln!( - "{} could not watch \"{}\" for changes: total number of inotify watches reached, consider increasing the number of allowed inotify watches or stopping processed that watch many files", - Emoji::Warn, + "could not watch \"{}\" for changes: total number of inotify watches reached, consider increasing the number of allowed inotify watches or stopping processed that watch many files", path.display() ); } @@ -337,8 +331,7 @@ fn handle_notify_error(tx: &WatchSender, path: &Path, err: notify::Error) { | notify::ErrorKind::Io(_) | notify::ErrorKind::WatchNotFound | notify::ErrorKind::InvalidConfig(_) => eprintln!( - "{} an unexpected error occured while watching {} for changes", - Emoji::Warn, + "an unexpected error occured while watching {} for changes", path.display() ), } diff --git a/crates/rover-std/src/lib.rs b/crates/rover-std/src/lib.rs index 9184059d3..0150ea44d 100644 --- a/crates/rover-std/src/lib.rs +++ b/crates/rover-std/src/lib.rs @@ -1,11 +1,9 @@ -mod emoji; mod error; mod fs; mod style; mod url; pub mod prompt; -pub use emoji::Emoji; pub use error::RoverStdError; pub use fs::Fs; pub use style::is_no_color_set; diff --git a/docs/source/configuring.md b/docs/source/configuring.md index 86c0ad5f2..bc66cc553 100644 --- a/docs/source/configuring.md +++ b/docs/source/configuring.md @@ -350,5 +350,4 @@ If present, an environment variable's value takes precedence over all other meth | `APOLLO_VCS_BRANCH` | The name of the version-controlled branch. See [Git context](#git-context). | | `APOLLO_VCS_COMMIT` | The long identifier (SHA in Git) of the commit. See [Git context](#git-context). | | `APOLLO_VCS_AUTHOR` | The name and email of a commit's author (e.g., `Jane Doe `). See [Git context](#git-context). | -| `NO_EMOJI` | Set to `1` if you don't want Rover to print emojis. | | `NO_COLOR` | Set to `1` if you don't want Rover to print color. | diff --git a/src/command/dev/compose.rs b/src/command/dev/compose.rs index cd194445f..1ac721dca 100644 --- a/src/command/dev/compose.rs +++ b/src/command/dev/compose.rs @@ -4,7 +4,7 @@ use std::io::prelude::*; use anyhow::{Context, Error}; use apollo_federation_types::config::{FederationVersion, SupergraphConfig}; use camino::Utf8PathBuf; -use rover_std::{Emoji, Fs}; +use rover_std::Fs; use crate::command::dev::do_dev::log_err_and_continue; use crate::command::supergraph::compose::{Compose, CompositionOutput}; @@ -107,7 +107,7 @@ impl ComposeRunner { fn remove_supergraph_schema(&self) -> RoverResult<()> { if Fs::assert_path_exists(&self.write_path).is_ok() { - eprintln!("{}composition failed, killing the router", Emoji::Skull); + eprintln!("composition failed, killing the router"); Ok(fs::remove_file(&self.write_path) .with_context(|| format!("could not remove {}", &self.write_path))?) } else { diff --git a/src/command/dev/do_dev.rs b/src/command/dev/do_dev.rs index 28d706424..9b1fbaf24 100644 --- a/src/command/dev/do_dev.rs +++ b/src/command/dev/do_dev.rs @@ -2,7 +2,7 @@ use anyhow::{anyhow, Context}; use camino::Utf8PathBuf; use crossbeam_channel::bounded as sync_channel; -use rover_std::{Emoji, Fs}; +use rover_std::Fs; use crate::command::dev::protocol::FollowerMessage; use crate::command::supergraph::expand_supergraph_yaml; @@ -60,7 +60,9 @@ impl Dev { &supergraph_config, router_config_handler, )? { - eprintln!("{0}Do not run this command in production! {0}It is intended for local development.", Emoji::Warn); + eprintln!( + "Do not run this command in production! It is intended for local development." + ); let (ready_sender, ready_receiver) = sync_channel(1); let follower_messenger = FollowerMessenger::from_main_session( follower_channel.clone().sender, @@ -70,8 +72,7 @@ impl Dev { tp.spawn(move || { ctrlc::set_handler(move || { eprintln!( - "\n{}shutting down the `rover dev` session and all attached processes...", - Emoji::Stop + "\nshutting down the `rover dev` session and all attached processes..." ); let _ = follower_channel .sender @@ -142,7 +143,7 @@ impl Dev { let health_messenger = follower_messenger.clone(); tp.spawn(move || { let _ = health_messenger.health_check().map_err(|_| { - eprintln!("{}shutting down...", Emoji::Stop); + eprintln!("shutting down..."); std::process::exit(1); }); }); @@ -150,7 +151,7 @@ impl Dev { // set up the ctrl+c handler to notify the main session to remove the killed subgraph let kill_name = subgraph_refresher.get_name(); ctrlc::set_handler(move || { - eprintln!("\n{}shutting down...", Emoji::Stop); + eprintln!("\nshutting down..."); let _ = follower_messenger .remove_subgraph(&kill_name) .map_err(log_err_and_continue); diff --git a/src/command/dev/protocol/follower/message.rs b/src/command/dev/protocol/follower/message.rs index 2976849d8..11d951bca 100644 --- a/src/command/dev/protocol/follower/message.rs +++ b/src/command/dev/protocol/follower/message.rs @@ -1,6 +1,5 @@ use anyhow::anyhow; use apollo_federation_types::build::SubgraphDefinition; -use rover_std::Emoji; use serde::{Deserialize, Serialize}; use std::fmt::Debug; @@ -99,30 +98,26 @@ impl FollowerMessage { FollowerMessageKind::AddSubgraph { subgraph_entry } => { if self.is_from_main_session() { eprintln!( - "{}starting a session with the '{}' subgraph", - Emoji::Start, + "starting a session with the '{}' subgraph", &subgraph_entry.0 .0 ); } else { eprintln!( - "{}adding the '{}' subgraph to the session", - Emoji::New, + "adding the '{}' subgraph to the session", &subgraph_entry.0 .0 ); } } FollowerMessageKind::UpdateSubgraph { subgraph_entry } => { eprintln!( - "{}updating the schema for the '{}' subgraph in the session", - Emoji::Reload, + "updating the schema for the '{}' subgraph in the session", &subgraph_entry.0 .0 ); } FollowerMessageKind::RemoveSubgraph { subgraph_name } => { if self.is_from_main_session() { eprintln!( - "{}removing the '{}' subgraph from this session", - Emoji::Reload, + "removing the '{}' subgraph from this session", &subgraph_name ); } else { diff --git a/src/command/dev/protocol/leader.rs b/src/command/dev/protocol/leader.rs index 641aa9005..94a622d64 100644 --- a/src/command/dev/protocol/leader.rs +++ b/src/command/dev/protocol/leader.rs @@ -18,8 +18,6 @@ use interprocess::local_socket::ListenerOptions; use serde::{Deserialize, Serialize}; use tracing::{info, warn}; -use rover_std::Emoji; - use crate::{ command::dev::{ compose::ComposeRunner, @@ -496,7 +494,7 @@ impl LeaderMessageKind { eprintln!("{}", error); } LeaderMessageKind::CompositionSuccess { action } => { - eprintln!("{}successfully composed after {}", Emoji::Success, &action); + eprintln!("successfully composed after {}", &action); } LeaderMessageKind::LeaderSessionInfo { subgraphs } => { let subgraphs = match subgraphs.len() { diff --git a/src/command/dev/router/command.rs b/src/command/dev/router/command.rs index fe90598fe..e4e449f4e 100644 --- a/src/command/dev/router/command.rs +++ b/src/command/dev/router/command.rs @@ -7,7 +7,6 @@ use std::{ use anyhow::{anyhow, Context}; use crossbeam_channel::Sender; use rover_client::operations::config::who_am_i::{self, Actor, ConfigWhoAmIInput}; -use rover_std::Emoji; use crate::options::ProfileOpt; use crate::utils::client::StudioClientConfig; @@ -53,24 +52,24 @@ impl BackgroundTask { if let Ok(apollo_graph_ref) = var("APOLLO_GRAPH_REF") { command.env("APOLLO_GRAPH_REF", apollo_graph_ref); if let Some(api_key) = client_config.get_authenticated_client(profile_opt).map_err(|err| { - eprintln!("{} APOLLO_GRAPH_REF is set, but credentials could not be loaded. \ - Enterprise features within the router will not function. {err}", Emoji::Warn); + eprintln!("APOLLO_GRAPH_REF is set, but credentials could not be loaded. \ + Enterprise features within the router will not function. {err}"); }).ok().and_then(|client| { who_am_i::run(ConfigWhoAmIInput {}, &client).map_or_else(|err| { - eprintln!("{} Could not determine the type of configured credentials, \ - Router may fail to start if Enterprise features are enabled. {err}", Emoji::Warn); + eprintln!("Could not determine the type of configured credentials, \ + Router may fail to start if Enterprise features are enabled. {err}"); Some(client.credential.api_key.clone()) }, |identity| { match identity.key_actor_type { Actor::GRAPH => Some(client.credential.api_key.clone()), _ => { eprintln!( - "{} APOLLO_GRAPH_REF is set, but the key provided is not a graph key. \ + "APOLLO_GRAPH_REF is set, but the key provided is not a graph key. \ Enterprise features within the router will not function. \ Either select a `--profile` that is configured with a graph-specific \ - key, or provide one via the APOLLO_KEY environment variable.", Emoji::Warn + key, or provide one via the APOLLO_KEY environment variable." ); - eprintln!("{} you can configure a graph key by following the instructions at https://www.apollographql.com/docs/graphos/api-keys/#graph-api-keys", Emoji::Note); + eprintln!("you can configure a graph key by following the instructions at https://www.apollographql.com/docs/graphos/api-keys/#graph-api-keys"); None } } diff --git a/src/command/dev/router/config.rs b/src/command/dev/router/config.rs index 4cdabac86..3a7806f51 100644 --- a/src/command/dev/router/config.rs +++ b/src/command/dev/router/config.rs @@ -8,7 +8,7 @@ use camino::Utf8PathBuf; use crossbeam_channel::{unbounded, Receiver}; use serde_json::json; -use rover_std::{Emoji, Fs}; +use rover_std::Fs; use crate::utils::expansion::expand; use crate::{ @@ -93,7 +93,7 @@ impl RouterConfigHandler { .expect("could not watch router config"); let _ = Fs::write_file(&self.tmp_router_config_path, &config_state.config) .map_err(|e| log_err_and_continue(e.into())); - eprintln!("{}successfully updated router config", Emoji::Success); + eprintln!("successfully updated router config"); *self .config_state .lock() @@ -258,10 +258,7 @@ impl RouterConfigReader { if let Some(path) = &self.input_config_path { if Fs::assert_path_exists(path).is_err() { - eprintln!( - "{}{path} does not exist, creating a router config from CLI options.", - Emoji::Action - ); + eprintln!("{path} does not exist, creating a router config from CLI options."); Fs::write_file(path, &yaml_string)?; } } diff --git a/src/command/dev/router/runner.rs b/src/command/dev/router/runner.rs index 3434e2129..670b5b23b 100644 --- a/src/command/dev/router/runner.rs +++ b/src/command/dev/router/runner.rs @@ -4,7 +4,7 @@ use camino::Utf8PathBuf; use crossbeam_channel::bounded; use reqwest::blocking::Client; use reqwest::Url; -use rover_std::{Emoji, Style}; +use rover_std::Style; use semver::Version; use std::net::SocketAddr; @@ -117,8 +117,7 @@ impl RouterRunner { if ready { eprintln!( - "{}your supergraph is running! head to http://{}{} to query your supergraph", - Emoji::Rocket, + "your supergraph is running! head to http://{}{} to query your supergraph", &self .router_socket_addr .to_string() diff --git a/src/command/dev/watcher.rs b/src/command/dev/watcher.rs index a1724603a..b270d0db6 100644 --- a/src/command/dev/watcher.rs +++ b/src/command/dev/watcher.rs @@ -12,7 +12,7 @@ use rover_client::blocking::StudioClient; use rover_client::operations::subgraph::fetch; use rover_client::operations::subgraph::fetch::SubgraphFetchInput; use rover_client::shared::GraphRef; -use rover_std::{Emoji, Fs}; +use rover_std::Fs; use crate::{ command::dev::{ @@ -236,8 +236,7 @@ impl SubgraphSchemaWatcher { SubgraphSchemaWatcherKind::Introspect(introspect_runner_kind, polling_interval) => { let endpoint = introspect_runner_kind.endpoint(); eprintln!( - "{}polling {} every {} {}", - Emoji::Listen, + "polling {} every {} {}", &endpoint, polling_interval, match polling_interval { diff --git a/src/command/supergraph/compose/do_compose.rs b/src/command/supergraph/compose/do_compose.rs index c9b11225c..8f733de7f 100644 --- a/src/command/supergraph/compose/do_compose.rs +++ b/src/command/supergraph/compose/do_compose.rs @@ -12,7 +12,7 @@ use regex::Regex; use serde::Serialize; use rover_client::RoverClientError; -use rover_std::{Emoji, Style}; +use rover_std::Style; use crate::command::supergraph::resolve_supergraph_yaml; use crate::utils::{client::StudioClientConfig, parsers::FileDescriptorType}; @@ -79,8 +79,7 @@ impl Compose { client_config: StudioClientConfig, ) -> RoverResult { eprintln!( - "{}resolving SDL for subgraphs defined in {}", - Emoji::Hourglass, + "resolving SDL for subgraphs defined in {}", Style::Path.paint(self.supergraph_yaml.to_string()) ); let mut supergraph_config = resolve_supergraph_yaml( @@ -141,8 +140,7 @@ impl Compose { let federation_version = Self::extract_federation_version(&exe)?; eprintln!( - "{}composing supergraph with Federation {}", - Emoji::Compose, + "composing supergraph with Federation {}", &federation_version ); diff --git a/src/options/output.rs b/src/options/output.rs index bb7d144e7..34c28d370 100644 --- a/src/options/output.rs +++ b/src/options/output.rs @@ -9,7 +9,7 @@ use clap::Parser; use serde::Serialize; use serde_json::{json, Value}; -use rover_std::{Emoji, Fs, Style}; +use rover_std::{Fs, Style}; use crate::{cli::RoverOutputFormatKind, RoverError, RoverOutput, RoverResult}; @@ -30,8 +30,7 @@ impl RoverPrinter for RoverOutput { match &output_opts.output_file { Some(path) => { let success_heading = Style::Heading.paint(format!( - "{}{} was printed to", - Emoji::Memo, + "{} was printed to", self.descriptor().unwrap_or("The output") )); let path_text = Style::Path.paint(path); @@ -63,8 +62,7 @@ impl RoverPrinter for RoverError { let json = JsonOutput::from(self); match &output_opts.output_file { Some(file) => { - let success_heading = Style::Heading - .paint(format!("{}Error JSON was printed to", Emoji::Memo,)); + let success_heading = Style::Heading.paint("Error JSON was printed to"); Fs::write_file(file, json.to_string())?; stderrln!("{} {}", success_heading, file)?; } diff --git a/src/options/subgraph.rs b/src/options/subgraph.rs index d4e478ccf..6f431b211 100644 --- a/src/options/subgraph.rs +++ b/src/options/subgraph.rs @@ -13,7 +13,7 @@ use reqwest::Url; use serde::{Deserialize, Serialize}; #[cfg(feature = "composition-js")] -use rover_std::{Emoji, Fs, Style}; +use rover_std::{Fs, Style}; #[cfg(feature = "composition-js")] use crate::cli::Rover; @@ -69,10 +69,7 @@ impl OptionalSubgraphOpts { if let Some(name) = &self.subgraph_name { Ok(name.to_string()) } else if io::stderr().is_terminal() { - let mut input = Input::new().with_prompt(format!( - "{}what is the name of this subgraph?", - Emoji::Person - )); + let mut input = Input::new().with_prompt("what is the name of this subgraph?"); if let Some(dirname) = Self::maybe_name_from_dir() { input = input.default(dirname); } @@ -96,10 +93,7 @@ impl OptionalSubgraphOpts { .with_context(|| url_context(subgraph_url))?) } else if io::stderr().is_terminal() { let input: String = Input::new() - .with_prompt(format!( - "{}what URL is your subgraph running on?", - Emoji::Web - )) + .with_prompt("what URL is your subgraph running on?") .interact_text()?; Ok(input.parse().with_context(|| url_context(&input))?) } else { From f350fd569a5958c33a0570a2597e8795e5053e36 Mon Sep 17 00:00:00 2001 From: Dan Bond Date: Wed, 7 Aug 2024 15:14:43 +0100 Subject: [PATCH 2/3] fix supergraph compose --- src/command/supergraph/compose/do_compose.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/command/supergraph/compose/do_compose.rs b/src/command/supergraph/compose/do_compose.rs index 66e371c3f..7c650f395 100644 --- a/src/command/supergraph/compose/do_compose.rs +++ b/src/command/supergraph/compose/do_compose.rs @@ -14,8 +14,6 @@ use serde::Serialize; use rover_client::shared::GraphRef; use rover_client::RoverClientError; -use rover_std::Style; - use crate::utils::supergraph_config::get_supergraph_config; use crate::utils::{client::StudioClientConfig, parsers::FileDescriptorType}; use crate::{ @@ -113,19 +111,10 @@ impl Compose { override_install_path: Option, client_config: StudioClientConfig, ) -> RoverResult { -<<<<<<< HEAD - eprintln!( - "resolving SDL for subgraphs defined in {}", - Style::Path.paint(self.supergraph_yaml.to_string()) - ); - let mut supergraph_config = resolve_supergraph_yaml( - &self.supergraph_yaml, -======= let mut supergraph_config = get_supergraph_config( &self.opts.supergraph_config_source.graph_ref, &self.opts.supergraph_config_source.supergraph_yaml.clone(), &self.opts.federation_version.clone().unwrap_or(LatestFedTwo), ->>>>>>> main client_config.clone(), &self.opts.plugin_opts.profile, )? From 6a9c348a469bfcc09919e5435b24e78b9f57a976 Mon Sep 17 00:00:00 2001 From: Dan Bond Date: Wed, 7 Aug 2024 18:16:45 +0100 Subject: [PATCH 3/3] fix lint errors --- src/command/dev/do_dev.rs | 2 -- src/command/dev/watcher.rs | 8 +++----- src/utils/supergraph_config.rs | 17 +++++------------ 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/src/command/dev/do_dev.rs b/src/command/dev/do_dev.rs index 5749ccfff..0606b07e7 100644 --- a/src/command/dev/do_dev.rs +++ b/src/command/dev/do_dev.rs @@ -3,8 +3,6 @@ use apollo_federation_types::config::FederationVersion; use camino::Utf8PathBuf; use crossbeam_channel::bounded as sync_channel; -use rover_std::Fs; - use crate::command::dev::protocol::FollowerMessage; use crate::utils::client::StudioClientConfig; use crate::utils::supergraph_config::get_supergraph_config; diff --git a/src/command/dev/watcher.rs b/src/command/dev/watcher.rs index 90243bf53..2f1506937 100644 --- a/src/command/dev/watcher.rs +++ b/src/command/dev/watcher.rs @@ -216,8 +216,7 @@ impl SubgraphSchemaWatcher { if &subgraph_definition.sdl != last_message { if self.subgraph_retry_countdown < self.subgraph_retries { eprintln!( - "{} subgraph connectivity restored for {}", - Emoji::Reload, + "subgraph connectivity restored for {}", self.subgraph_key.0 ) } @@ -245,13 +244,12 @@ impl SubgraphSchemaWatcher { // if self.subgraph_retry_countdown > 0 { self.subgraph_retry_countdown -= 1; - eprintln!("{} error detected communicating with subgraph '{}', schema changes will not be reflected.\nWill retry but subgraph logs should be inspected", Emoji::Warn, &self.subgraph_key.0); + eprintln!("error detected communicating with subgraph '{}', schema changes will not be reflected.\nWill retry but subgraph logs should be inspected", &self.subgraph_key.0); eprintln!("Error: {:}", e); Some(e.to_string()) } else { eprintln!( - "{} retries exhausted for subgraph {}. To add more run `rover dev` with the --subgraph-retries flag.", - Emoji::Stop, + "retries exhausted for subgraph {}. To add more run `rover dev` with the --subgraph-retries flag.", &self.subgraph_key.0, ); self.message_sender.remove_subgraph(&self.subgraph_key.0)?; diff --git a/src/utils/supergraph_config.rs b/src/utils/supergraph_config.rs index 8c2cb9aff..496280e54 100644 --- a/src/utils/supergraph_config.rs +++ b/src/utils/supergraph_config.rs @@ -16,7 +16,7 @@ use rover_client::operations::subgraph::introspect::SubgraphIntrospectInput; use rover_client::operations::subgraph::{fetch, introspect}; use rover_client::shared::GraphRef; use rover_client::RoverClientError; -use rover_std::{Emoji, Fs, Style}; +use rover_std::{Fs, Style}; use crate::options::ProfileOpt; use crate::utils::client::StudioClientConfig; @@ -73,11 +73,7 @@ pub fn get_supergraph_config( federation_version, graph_ref, )?); - eprintln!( - "{}retrieving subgraphs remotely from {}", - Emoji::Hourglass, - graph_ref - ); + eprintln!("retrieving subgraphs remotely from {}", graph_ref); remote_subgraphs } None => None, @@ -85,10 +81,7 @@ pub fn get_supergraph_config( // Read in Local Supergraph Config let supergraph_config = if let Some(file_descriptor) = &supergraph_config_path { - eprintln!( - "{}resolving SDL for subgraphs defined in supergraph schema file", - Emoji::Hourglass - ); + eprintln!("resolving SDL for subgraphs defined in supergraph schema file",); Some(resolve_supergraph_yaml( file_descriptor, client_config, @@ -103,14 +96,14 @@ pub fn get_supergraph_config( (Some(remote_subgraphs), Some(supergraph_config)) => { let mut merged_supergraph_config = remote_subgraphs.inner().clone(); merged_supergraph_config.merge_subgraphs(&supergraph_config); - eprintln!("{}merging supergraph schema files", Emoji::Merge); + eprintln!("merging supergraph schema files"); Some(merged_supergraph_config) } (Some(remote_subgraphs), None) => Some(remote_subgraphs.inner().clone()), (None, Some(supergraph_config)) => Some(supergraph_config), (None, None) => None, }; - eprintln!("{}supergraph config loaded successfully", Emoji::Success,); + eprintln!("supergraph config loaded successfully"); Ok(supergraph_config) }