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

fix: infer OUT_DIR when workspace root contains a symlink #15868

Merged
merged 1 commit into from Jan 16, 2024

Conversation

wasd96040501
Copy link
Contributor

fix #15867

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 10, 2023
@wasd96040501 wasd96040501 force-pushed the fix/symlink2 branch 2 times, most recently from 6f65c20 to 57b808e Compare November 11, 2023 06:24
@Veykril Veykril added S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 13, 2023
@Veykril
Copy link
Member

Veykril commented Dec 13, 2023

Block on discussion in #15867 (comment)

@bors
Copy link
Collaborator

bors commented Dec 22, 2023

☔ The latest upstream changes (presumably #16088) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay thanks to the explanation given in the issue I can see the point of this change now 👍

crates/rust-analyzer/tests/slow-tests/testdir.rs Outdated Show resolved Hide resolved
@Veykril Veykril added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work. labels Jan 10, 2024
@wasd96040501 wasd96040501 force-pushed the fix/symlink2 branch 2 times, most recently from 644c946 to 9727bcf Compare January 11, 2024 14:58
@Veykril
Copy link
Member

Veykril commented Jan 11, 2024

Thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Jan 11, 2024

📌 Commit 9727bcf has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jan 11, 2024

⌛ Testing commit 9727bcf with merge f410fb9...

bors added a commit that referenced this pull request Jan 11, 2024
fix: failed to infer OUT_DIR when workspace root contains symlink

fix #15867
@bors
Copy link
Collaborator

bors commented Jan 11, 2024

💔 Test failed - checks-actions

@wasd96040501
Copy link
Contributor Author

It seems that unit test has failed on windows.
panic 1

thread 'root_contains_symlink_out_dirs_check' panicked at crates\rust-analyzer\tests\slow-tests\support.rs:109:56:
called `Result::unwrap()` on an `Err` value: Os { code: 183, kind: AlreadyExists, message: "Cannot create a file when that file already exists." }

panic 2

thread 'root_contains_symlink_out_dirs_check' panicked at crates\rust-analyzer\tests\slow-tests\testdir.rs:82:13:
failed to remove temporary directory C:\Users\RUNNER~1\AppData\Local\Temp\testdir\612_4\_symlink: The directory name is invalid. (os error 267)

I will attempt to fix it.

@wasd96040501
Copy link
Contributor Author

@Veykril
CI fixed.

#[cfg(target_os = "windows")]
std::os::windows::fs::symlink_file(path, &symlink_path).unwrap();

replaced to

#[cfg(target_os = "windows")]
std::os::windows::fs::symlink_dir(path, &symlink_path).unwrap();

@Veykril
Copy link
Member

Veykril commented Jan 16, 2024

Thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Jan 16, 2024

📌 Commit 22cda95 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jan 16, 2024

⌛ Testing commit 22cda95 with merge 87e609a...

@bors
Copy link
Collaborator

bors commented Jan 16, 2024

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 87e609a to master...

@bors bors merged commit 87e609a into rust-lang:master Jan 16, 2024
10 checks passed
@lnicola lnicola changed the title fix: failed to infer OUT_DIR when workspace root contains symlink fix: infer OUT_DIR when workspace root contains a symlink Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot infer OUT_DIR when workspace root contains symlink
4 participants