Skip to content

StripPrefixError when resolving derive on Windows #2

Description

@camren-m

Caused by inconsistent canonicalization of watcher.input_dir and resolved derive paths, combined with .strip_prefix(...)'s lexical nature.

PS C:\Users\____> rsml build src 
RSML CLI crashed at src\rsml_to_model_json.rs:263:22
Error: called `Result::unwrap()` on an `Err` value: StripPrefixError(())
Please report this at https://github.com/rbx-rsml/rsml-cli/issues

See the canonicalization discrepancy below:

PS C:\Users\____> rsml-cli build src
Derive path: "\\\\?\\C:\\Users\\____\\src\\client\\Modules\\UserInterface\\Styles\\Global.rsml"
Watcher input path: "C:\\Users\\____\\src"
RSML CLI crashed at src\rsml_to_model_json.rs:270:22
Error: called `Result::unwrap()` on an `Err` value: StripPrefixError(())
Please report this at https://github.com/rbx-rsml/rsml-cli/issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions