Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create symlink for legacy rustfmt path #107834

Merged
merged 1 commit into from
Feb 9, 2023

Conversation

zephaniahong
Copy link
Contributor

@zephaniahong zephaniahong commented Feb 9, 2023

Fixes #107547 .
Main change is in the download.rs file. Created a symlink for the legacy rustfmt path to the new rustfmt path. Other file changes are simply as a result of porting over the symlink_file function from the Build struct to the config Struct

@rustbot
Copy link
Collaborator

rustbot commented Feb 9, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @albertlarsan68 (or someone else) soon.

Please see the contribution instructions for more information.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 9, 2023
@zephaniahong
Copy link
Contributor Author

zephaniahong commented Feb 9, 2023

r? @jyn514
This is a fix for #107547 .

@rustbot rustbot assigned jyn514 and unassigned albertlarsan68 Feb 9, 2023
@ChrisDenton
Copy link
Member

ChrisDenton commented Feb 9, 2023

Just a note, but if you add something like "Fixes #107547" in the opening comment then GitHub will automatically link the issue such that it will be automatically closed when this PR is merged. See the GitHub documentation.

@zephaniahong
Copy link
Contributor Author

@ChrisDenton Didn't know that! Thanks so much😁

@albertlarsan68
Copy link
Member

jyn514 doesn't have time to do reviews.
Anyway, thanks for your PR!
r? @albertlarsan68
@bors r+

@bors
Copy link
Contributor

bors commented Feb 9, 2023

📌 Commit 41c6c5d has been approved by albertlarsan68

It is now in the queue for this repository.

@rustbot rustbot assigned albertlarsan68 and unassigned jyn514 Feb 9, 2023
@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 9, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 9, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#107446 (Migrate some of `rustc_parse` to derive diagnostics)
 - rust-lang#107752 (Specify dlltool prefix when generating import libs)
 - rust-lang#107808 (bootstrap.py: fix build-failure message)
 - rust-lang#107834 (create symlink for legacy rustfmt path)
 - rust-lang#107835 (use idiomatic formatting)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@jyn514
Copy link
Member

jyn514 commented Feb 9, 2023

@bors r-

@zephaniahong have you tested locally that build/host/stage0/bin/rustfmt --version actually runs?

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 9, 2023
@bors bors merged commit a8df4b1 into rust-lang:master Feb 9, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 9, 2023
@zephaniahong
Copy link
Contributor Author

Yupp! Seemed to work for me.

@petrochenkov
Copy link
Contributor

@zephaniahong @albertlarsan68
Looks like this PR has just broken Windows builds.

thread 'main' panicked at 'self.symlink_file(&rustfmt_path, &legacy_rustfmt) failed with A required privilege is not held by the client. (os error 1314)', download.rs:345:13

@jyn514
Copy link
Member

jyn514 commented Feb 9, 2023

I think it's ok to just not try and make this symlink on windows; the rustfmt symlink won't work anyway because it'll fail to load rustc_driver.

@zephaniahong
Copy link
Contributor Author

Should I edit the code to not make a symlink if it's a windows machine?

@jyn514
Copy link
Member

jyn514 commented Feb 10, 2023

Yes please; you can use #[cfg(windows)] to tell.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 10, 2023
…lbertlarsan68

create symlink only for non-windows operating systems

Follow up on rust-lang#107834
It's my first time using the #cfg attribute. Did I use it correctly?

Thank you!
@Kobzol Kobzol mentioned this pull request Feb 21, 2023
@albertlarsan68 albertlarsan68 added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 21, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 21, 2023
Revert rust-lang#107834

This reverts commit [41c6c5d](rust-lang#107834). Trying to check if this fixes building `rustc` for perf bot.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggested rust-analyzer config can't run rustfmt
7 participants