summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatan Kushner <hello@matchai.dev>2020-09-29 12:35:11 -0400
committerGitHub <noreply@github.com>2020-09-29 12:35:11 -0400
commit59f939e25ce5833955c61e8c58af394c54cf93b8 (patch)
tree90b023b19c72bf3ba840472ff05b7d487984d180
parentcb4d7d1908e1f9a3d0887b4912ac5d8d6523fd41 (diff)
chore: update v0.45.0 removal notice (#1687)
* chore: update deprecation notice * Add deprecation page to sidebar * Replace the use of "deprected" with "removed"
-rw-r--r--docs/.vuepress/config.js3
-rw-r--r--docs/migrating-to-0.45.0/README.md72
-rw-r--r--src/config.rs3
-rw-r--r--starship_module_config_derive/src/lib.rs7
4 files changed, 46 insertions, 39 deletions
diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
index 42453a3a6..e6628513d 100644
--- a/docs/.vuepress/config.js
+++ b/docs/.vuepress/config.js
@@ -94,7 +94,8 @@ module.exports = {
["/config/", "Configuration"],
["/advanced-config/", "Advanced Configuration"],
["/faq/", "Frequently Asked Questions"],
- ["/presets/", "Presets"]
+ ["/presets/", "Presets"],
+ ["/migrating-to-0.45.0/", "Migrating to v0.45.0"]
]
},
"/de-DE/": {
diff --git a/docs/migrating-to-0.45.0/README.md b/docs/migrating-to-0.45.0/README.md
index 3a0ea093d..c736125d6 100644
--- a/docs/migrating-to-0.45.0/README.md
+++ b/docs/migrating-to-0.45.0/README.md
@@ -83,7 +83,7 @@ format = "took [$duration]($style)"
#### Character
-| Deprecated Property | Replacement |
+| Removed Property | Replacement |
| ----------------------- | ---------------- |
| `symbol` | `success_symbol` |
| `use_symbol_for_status` | `error_symbol` |
@@ -116,9 +116,9 @@ error_symbol = "[✖](bold red) "
#### Command Duration
-| Deprecated Property | Replacement |
-| ------------------- | ----------- |
-| `prefix` | `format` |
+| Removed Property | Replacement |
+| ---------------- | ----------- |
+| `prefix` | `format` |
**Changes to the Default Configuration**
@@ -130,9 +130,9 @@ error_symbol = "[✖](bold red) "
#### Directory
-| Deprecated Property | Replacement |
-| ------------------- | ----------- |
-| `prefix` | `format` |
+| Removed Property | Replacement |
+| ---------------- | ----------- |
+| `prefix` | `format` |
**Changes to the Default Configuration**
@@ -144,10 +144,10 @@ error_symbol = "[✖](bold red) "
#### Environment Variable
-| Deprecated Property | Replacement |
-| ------------------- | ----------- |
-| `prefix` | `format` |
-| `suffix` | `format` |
+| Removed Property | Replacement |
+| ---------------- | ----------- |
+| `prefix` | `format` |
+| `suffix` | `format` |
**Changes to the Default Configuration**
@@ -160,10 +160,10 @@ error_symbol = "[✖](bold red) "
#### Git Commit
-| Deprecated Property | Replacement |
-| ------------------- | ----------- |
-| `prefix` | `format` |
-| `suffix` | `format` |
+| Removed Property | Replacement |
+| ---------------- | ----------- |
+| `prefix` | `format` |
+| `suffix` | `format` |
**Changes to the Default Configuration**
@@ -176,11 +176,11 @@ error_symbol = "[✖](bold red) "
#### Git Status
-| Deprecated Property | Replacement |
-| ------------------- | ----------- |
-| `prefix` | `format` |
-| `suffix` | `format` |
-| `show_sync_count` | `format` |
+| Removed Property | Replacement |
+| ----------------- | ----------- |
+| `prefix` | `format` |
+| `suffix` | `format` |
+| `show_sync_count` | `format` |
**Changes to the Default Configuration**
@@ -209,10 +209,10 @@ behind = "⇣${count}"
#### Hostname
-| Deprecated Property | Replacement |
-| ------------------- | ----------- |
-| `prefix` | `format` |
-| `suffix` | `format` |
+| Removed Property | Replacement |
+| ---------------- | ----------- |
+| `prefix` | `format` |
+| `suffix` | `format` |
**Changes to the Default Configuration**
@@ -225,11 +225,11 @@ behind = "⇣${count}"
#### Singularity
-| Deprecated Property | Replacement |
-| ------------------- | ----------- |
-| `label` | `format` |
-| `prefix` | `format` |
-| `suffix` | `format` |
+| Removed Property | Replacement |
+| ---------------- | ----------- |
+| `label` | `format` |
+| `prefix` | `format` |
+| `suffix` | `format` |
**Changes to the Default Configuration**
@@ -242,9 +242,9 @@ behind = "⇣${count}"
#### Time
-| Deprecated Property | Replacement |
-| ------------------- | ------------- |
-| `format` | `time_format` |
+| Removed Property | Replacement |
+| ---------------- | ------------- |
+| `format` | `time_format` |
**Changes to the Default Configuration**
@@ -257,10 +257,10 @@ behind = "⇣${count}"
#### Custom Commands
-| Deprecated Property | Replacement |
-| ------------------- | ----------- |
-| `prefix` | `format` |
-| `suffix` | `format` |
+| Removed Property | Replacement |
+| ---------------- | ----------- |
+| `prefix` | `format` |
+| `suffix` | `format` |
**Changes to the Default Configuration**
diff --git a/src/config.rs b/src/config.rs
index e6d3a4d4e..c781e9035 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -20,6 +20,9 @@ where
/// Load root module config from given Value and fill unset variables with default
/// values.
fn load(config: &'a Value) -> Self {
+ if config.get("prompt_order").is_some() {
+ log::warn!("\"prompt_order\" has been removed in favor of \"format\". For more details, see: https://starship.rs/migrating-to-0.45.0/")
+ }
Self::new().load_config(config)
}
diff --git a/starship_module_config_derive/src/lib.rs b/starship_module_config_derive/src/lib.rs
index b6d11326a..4dd0ed7dc 100644
--- a/starship_module_config_derive/src/lib.rs
+++ b/starship_module_config_derive/src/lib.rs
@@ -47,8 +47,11 @@ fn impl_module_config(dinput: DeriveInput) -> proc_macro::TokenStream {
fn load_config(&self, config: &'a toml::Value) -> Self {
let mut new_module_config = self.clone();
if let toml::Value::Table(config) = config {
- if config.get("prefix").is_some() || config.get("suffix").is_some() {
- log::warn!("You're using the outdated config format! Migrate your config here: https://starship.rs/migrating-to-0.45.0/")
+ if config.get("prefix").is_some() {
+ log::warn!("\"prefix\" has been removed in favor of \"format\". For more details, see: https://starship.rs/migrating-to-0.45.0/")
+ }
+ if config.get("suffix").is_some() {
+ log::warn!("\"suffix\" has been removed in favor of \"format\". For more details, see: https://starship.rs/migrating-to-0.45.0/")
}
#load_tokens
}