Skip to content

MSVC tools don't support long paths #19616

@shs96c

Description

@shs96c

Description of the feature request:

MSVC tools don't support long paths, which means that path lengths are limited to 260 characters. Bazel directories tend to be deeply nested, which means that it's relatively easy to hit this path limit.

The feature request is twofold:

  1. Provide a flag to allow "Windows incompatible" paths created or used by actions to be logged with a warning so users are aware of problems on Windows builds.
  2. Provide clear documentation on how to host Windows sandboxes as close to the root of the file system as possible to delay the moment when path lengths are exceeded, even when the source of a project is hosted in a user's own directory.

Which category does this issue belong to?

CLI, Local Execution

What underlying problem are you trying to solve with this feature?

It should be possible to build a project on Windows as easily as one can on macOS and Linux

Which operating system are you running Bazel on?

Windows

What is the output of bazel info release?

6.3.2

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

A comment from an MS engineer highlighting the issue: https://developercommunity.visualstudio.com/t/VS2022-IDE-The-MicrosoftVisualStudio/10152459#T-N10154378

Relevant issue for C/C++ in .Net projects: https://developercommunity.visualstudio.com/t/allow-building-running-and-debugging-a-net-applica/351628

An issue raised by someone attempting to build Selenium on Windows: https://developercommunity.visualstudio.com/t/MCVS-143732822-include-fails-on-Windo/10474131

Any other information, logs, or outputs that you want to share?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)area-WindowsWindows-specific issues and feature requestsstaleIssues or PRs that are stale (no activity for 30 days)team-Rules-CPPIssues for C++ rulestype: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions