Skip to content

rustc error on Windows: The filename or extension is too long #93920

Closed
@jszwedko

Description

@jszwedko

Hi all!

I think we are running into the same issue described by #39644 but with rustc.exe rather than link.exe.

We have a project where we noticed that any PRs that introduce a new dependency were causing our Windows CI builds to fail with:

Caused by:
  The filename or extension is too long. (os error 206)

In the example failure below, it does seem like the rustc command is 33,184 characters, which would be over the 32,767 character limit mentioned in https://docs.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/command-line-string-limitation.

Example failure:

https://github.com/vectordotdev/vector/runs/5157867395?check_suite_focus=true

Does that sound right to people? Do we need the same fix from #44094 but for the rustc invocation?

Meta

rustc --version --verbose:

rustc 1.58.1 (db9d1b20b 2022-01-20)
binary: rustc
commit-hash: db9d1b20bba1968c1ec1fc49616d4742c1725b4b
commit-date: 2022-01-20
host: x86_64-pc-windows-msvc
release: 1.58.1
LLVM version: 13.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions