Skip to content

incr.comp.: Issue warning if cache directory is on FS without hard-linking #36680

Closed
@michaelwoerister

Description

@michaelwoerister

The compiler heavily relies on hard-linking for managing the incremental compilation cache, but hard links are not available on all file systems. The compiler will fall back to actually copying the files which is potentially much slower. We should try to make the compiler detect if hard-linking is not available and suggest to the user that they move the cache directory onto a file system that supports hard links.

File systems that don't support hard links are FAT32, exFAT, and ReFS, and probably others. We could either try to somehow detect whether we are on one of those directly, or, maybe more robustly, just issue a general warning if all hard-linking fails but all copying succeeds.

See https://github.com/rust-lang/rust/blob/master/src/librustc_incremental/persist/fs.rs for relevant code.

cc @nikomatsakis

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions