Update vscode-rojo submodule reference and complete migration plan for path encoding

- Updated the vscode-rojo submodule to the latest commit.
- Marked all phases of the path encoding migration plan as completed, transitioning to a slugify and deduplication approach.
- Updated documentation to reflect changes in filename handling and metadata management.
This commit is contained in:
Joe 2026-02-10 03:14:18 -06:00
parent 0955e38b45
commit 126c8e66a4
77 changed files with 3512 additions and 799 deletions

View file

@ -66,6 +66,12 @@ pub struct InstanceMetadata {
/// A schema provided via a JSON file, if one exists. Will be `None` for
/// all non-JSON middleware.
pub schema: Option<String>,
/// A custom name specified via meta.json or model.json files. If present,
/// this name will be used for the instance while the filesystem name will
/// be slugified to remove illegal characters.
#[serde(skip_serializing_if = "Option::is_none")]
pub specified_name: Option<String>,
}
impl InstanceMetadata {
@ -78,6 +84,7 @@ impl InstanceMetadata {
specified_id: None,
middleware: None,
schema: None,
specified_name: None,
}
}
@ -126,6 +133,13 @@ impl InstanceMetadata {
pub fn schema(self, schema: Option<String>) -> Self {
Self { schema, ..self }
}
pub fn specified_name(self, specified_name: Option<String>) -> Self {
Self {
specified_name,
..self
}
}
}
impl Default for InstanceMetadata {
@ -140,16 +154,6 @@ pub struct InstanceContext {
pub path_ignore_rules: Arc<Vec<PathIgnoreRule>>,
#[serde(skip_serializing_if = "Vec::is_empty")]
pub sync_rules: Vec<SyncRule>,
/// Whether to decode special characters in file names.
/// Characters like `%DOT%`, `%LT%`, `%GT%`, `%COLON%`, etc. will be decoded
/// back to `.`, `<`, `>`, `:`, etc. in instance names sent to the plugin.
/// Defaults to true.
#[serde(default = "decode_windows_invalid_chars_default")]
pub decode_windows_invalid_chars: bool,
}
fn decode_windows_invalid_chars_default() -> bool {
true
}
impl InstanceContext {
@ -157,14 +161,9 @@ impl InstanceContext {
Self {
path_ignore_rules: Arc::new(Vec::new()),
sync_rules: Vec::new(),
decode_windows_invalid_chars: true,
}
}
pub fn set_decode_windows_invalid_chars(&mut self, decode: bool) {
self.decode_windows_invalid_chars = decode;
}
/// Extend the list of ignore rules in the context with the given new rules.
pub fn add_path_ignore_rules<I>(&mut self, new_rules: I)
where

View file

@ -11,8 +11,7 @@ properties:
metadata:
ignore_unknown_instances: false
relevant_paths: []
context:
decode_windows_invalid_chars: true
context: {}
specified_id: ~
middleware: ~
schema: ~

View file

@ -9,8 +9,7 @@ properties: {}
metadata:
ignore_unknown_instances: false
relevant_paths: []
context:
decode_windows_invalid_chars: true
context: {}
specified_id: ~
middleware: ~
schema: ~

View file

@ -11,8 +11,7 @@ properties:
metadata:
ignore_unknown_instances: false
relevant_paths: []
context:
decode_windows_invalid_chars: true
context: {}
specified_id: ~
middleware: ~
schema: ~

View file

@ -9,8 +9,7 @@ properties: {}
metadata:
ignore_unknown_instances: false
relevant_paths: []
context:
decode_windows_invalid_chars: true
context: {}
specified_id: ~
middleware: ~
schema: ~

View file

@ -10,8 +10,7 @@ added_instances:
metadata:
ignore_unknown_instances: false
relevant_paths: []
context:
decode_windows_invalid_chars: true
context: {}
specified_id: ~
middleware: ~
schema: ~