settings: Remove version field migration (#33711)

This reverts some parts of #33372, as it will break the settings for
users running stable and preview at the same time. We can add it back
once the changes make it to stable.

Release Notes:

- N/A
This commit is contained in:
Bennet Bo Fenner 2025-07-01 15:17:36 +02:00 committed by GitHub
parent 0fe73a99e5
commit 62e8f45304
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 0 additions and 218 deletions

View file

@ -152,10 +152,6 @@ pub fn migrate_settings(text: &str) -> Result<Option<String>> {
migrations::m_2025_06_16::SETTINGS_PATTERNS,
&SETTINGS_QUERY_2025_06_16,
),
(
migrations::m_2025_06_25::SETTINGS_PATTERNS,
&SETTINGS_QUERY_2025_06_25,
),
(
migrations::m_2025_06_27::SETTINGS_PATTERNS,
&SETTINGS_QUERY_2025_06_27,
@ -262,10 +258,6 @@ define_query!(
SETTINGS_QUERY_2025_06_16,
migrations::m_2025_06_16::SETTINGS_PATTERNS
);
define_query!(
SETTINGS_QUERY_2025_06_25,
migrations::m_2025_06_25::SETTINGS_PATTERNS
);
define_query!(
SETTINGS_QUERY_2025_06_27,
migrations::m_2025_06_27::SETTINGS_PATTERNS
@ -1089,77 +1081,6 @@ mod tests {
);
}
#[test]
fn test_remove_version_fields() {
assert_migrate_settings(
r#"{
"language_models": {
"anthropic": {
"version": "1",
"api_url": "https://api.anthropic.com"
},
"openai": {
"version": "1",
"api_url": "https://api.openai.com/v1"
}
},
"agent": {
"version": "2",
"enabled": true,
"preferred_completion_mode": "normal",
"button": true,
"dock": "right",
"default_width": 640,
"default_height": 320,
"default_model": {
"provider": "zed.dev",
"model": "claude-sonnet-4"
}
}
}"#,
Some(
r#"{
"language_models": {
"anthropic": {
"api_url": "https://api.anthropic.com"
},
"openai": {
"api_url": "https://api.openai.com/v1"
}
},
"agent": {
"enabled": true,
"preferred_completion_mode": "normal",
"button": true,
"dock": "right",
"default_width": 640,
"default_height": 320,
"default_model": {
"provider": "zed.dev",
"model": "claude-sonnet-4"
}
}
}"#,
),
);
// Test that version fields in other contexts are not removed
assert_migrate_settings(
r#"{
"language_models": {
"other_provider": {
"version": "1",
"api_url": "https://api.example.com"
}
},
"other_section": {
"version": "1"
}
}"#,
None,
);
}
#[test]
fn test_flatten_context_server_command() {
assert_migrate_settings(