If any experimental flags are active, prints a warning to stderr.
(&self)
| 87 | |
| 88 | /// If any experimental flags are active, prints a warning to stderr. |
| 89 | pub fn warn_if_active(&self) { |
| 90 | let flags = self.active_flags(); |
| 91 | if flags.is_empty() { |
| 92 | return; |
| 93 | } |
| 94 | |
| 95 | let flag_list = flags |
| 96 | .iter() |
| 97 | .map(|f| style(*f).bold().to_string()) |
| 98 | .collect::<Vec<_>>() |
| 99 | .join(", "); |
| 100 | |
| 101 | eprintln!( |
| 102 | "\n {} Experimental flags enabled: {}\n \ |
| 103 | These may change or be removed without notice.\n \ |
| 104 | Share feedback at {}.\n", |
| 105 | style(Icon::Warning.to_string()).yellow(), |
| 106 | flag_list, |
| 107 | style("https://github.com/CodSpeedHQ/codspeed/issues").underlined(), |
| 108 | ); |
| 109 | } |
| 110 | |
| 111 | /// Warns about deprecated flags that graduated to stable options. They are still |
| 112 | /// accepted, but will be removed in a future release. |
no test coverage detected