Skip to content

support x fmt for sub and outside of rust directories #108004

Closed
@onur-ozkan

Description

@onur-ozkan

When we run ../x fmt compiler in library directory, the following error will occur:

thread 'main' panicked at 'entry failed with compiler: No such file or directory (os error 2)', format.rs:257:25

Same problem will occur also when we are outside of the rust directory like:

~/devspace/personal/rust-dist/tools  $ ../../rust/x fmt library/std --check

thread 'main' panicked at 'entry failed with library/std: No such file or directory (os error 2)', format.rs:257:25

The problem here is, x fmt expects the complete path for target directory in order to work. For example, instead of running ../../rust/x fmt library/std --check, if we run ../../rust/x fmt ../../rust/library/std --check, it will work without any problem.

Related zulip topic: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/uncomfortable.20use.20of.20.60x.20fmt.60.20from.20outside.20of.20rust.20dir

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions