Skip to content

break the dependency from rustc_target -> rustc_fs_util - #160379

Closed
jyn514 wants to merge 1 commit into
rust-lang:mainfrom
jyn514:break-fs-util-dep
Closed

break the dependency from rustc_target -> rustc_fs_util#160379
jyn514 wants to merge 1 commit into
rust-lang:mainfrom
jyn514:break-fs-util-dep

Conversation

@jyn514

@jyn514 jyn514 commented Aug 2, 2026

Copy link
Copy Markdown
Member

fs_util is now first needed by rustc_session, so it's not needed before compiling rustc_hir. i haven't yet collected before/after timings, i can do so if you like.

inspired by #160336.

before:
image

after:
image

  • I used an LLM to create a change in this PR, and I have explained below how it was used.

disclaimer: this PR was LLM generated. i told it to look at #160336 and find similar improvements, and it wrote the code. originally it also tried to break rustc_feature -> rustc_hir and rustc_metadata -> rustc_incremental, but it turns out i was on an old branch and those had already been split up on main.

r? @jackh726 (not the PR i said you would be reviewing, oops, but still quite small)

@rustbot label llm-assisted

fs_util is now first needed by `rustc_session`, so it's not needed before compiling `rustc_hir`.
@rustbot

rustbot commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

These commits modify compiler targets.
(See the Target Tier Policy.)

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 2, 2026
@rustbot rustbot added the llm-assisted An LLM-assisted PR as defined by the LLM policy. Requires ahead-of-time consent by assignee. label Aug 2, 2026
@mejrs

mejrs commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

I'd rather not make this change, rustc_fs_util is compiled way, way before any other rustc crates using it so it's not going to matter for compiling in parallel. I think it's more valuable to have all of rustc's path handling logic being in one place.

@jyn514

jyn514 commented Aug 2, 2026

Copy link
Copy Markdown
Member Author

makes sense 👍

@jyn514 jyn514 closed this Aug 2, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llm-assisted An LLM-assisted PR as defined by the LLM policy. Requires ahead-of-time consent by assignee. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants