Skip to content

rust-analyzer discover_bazel_rust_project invalid package separator on Windows #3498

@AlexHickie

Description

@AlexHickie

When using @rules_rust//tools/rust_analyzer:discover_bazel_rust_project, the paths are assumed to have / separators which isn't true for Windows.

Project discovery failed: bazel build failed: (exit code: 1)
INFO: Invocation ID: 503d9deb-2a50-4d29-ab71-3226769bed24
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
WARNING: Target pattern parsing failed.
ERROR: Skipping '//foo\bar\baz:all': invalid package name 'foo\bar\baz': package names may contain A-Z, a-z, 0-9, or any of ' !"#$%&'()*+,-./;<=>?[]^_`{|}~' (most 7-bit ascii characters except 0-31, 127, ':', or '\')
ERROR: invalid package name 'foo\bar\baz': package names may contain A-Z, a-z, 0-9, or any of ' !"#$%&'()*+,-./;<=>?[]^_`{|}~' (most 7-bit ascii characters except 0-31, 127, ':', or '\')

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