@@ -78,7 +78,6 @@ pub struct Settings {
7878}
7979
8080// DEPRECATION: Remove in v5.2.7
81- // Custom deserializer that supports both v0.6.0 (new) and v0.4.0 (legacy) formats
8281fn deserialize_tagspecs < ' de , D > ( deserializer : D ) -> Result < TagSpecDef , D :: Error >
8382where
8483 D : Deserializer < ' de > ,
@@ -88,22 +87,19 @@ where
8887
8988 let value = Value :: deserialize ( deserializer) ?;
9089
91- // Try new v0.6.0 format first (hierarchical with libraries)
9290 if let Ok ( new_format) = TagSpecDef :: deserialize ( & value) {
9391 return Ok ( new_format) ;
9492 }
9593
96- // Fall back to legacy v0.4.0 format (flat array of tags)
9794 if let Ok ( legacy) = Vec :: < tagspecs:: legacy:: LegacyTagSpecDef > :: deserialize ( & value) {
9895 tracing:: warn!(
9996 "DEPRECATED: TagSpecs v0.4.0 format detected. Please migrate to v0.6.0 format. \
10097 The old format will be removed in v5.2.7. \
101- See migration guide: https://github.com/joshuadavidthomas/django-language-server/blob/main/crates/djls-conf/TAGSPECS.md #migration-from-v040"
98+ See migration guide: https://djls.joshthomas.dev/tagspecs/ #migration-from-v040"
10299 ) ;
103100 return Ok ( tagspecs:: legacy:: convert_legacy_tagspecs ( legacy) ) ;
104101 }
105102
106- // Neither format worked, return default
107103 Err ( D :: Error :: custom (
108104 "Invalid tagspecs format. Expected v0.6.0 hierarchical format or legacy v0.4.0 array format" ,
109105 ) )
@@ -847,7 +843,6 @@ kind = "choice"
847843 }
848844
849845 // DEPRECATION TESTS: Remove in v5.2.7
850- // These tests validate that the legacy v0.4.0 format still works
851846 mod legacy_format {
852847 use super :: * ;
853848
0 commit comments