Skip to content

Emit warning when search path not found in -L #143687

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

Closed
wants to merge 3 commits into from

Conversation

xizheyin
Copy link
Contributor

@xizheyin xizheyin commented Jul 9, 2025

@rustbot
Copy link
Collaborator

rustbot commented Jul 9, 2025

wesleywiser is not on the review rotation at the moment.
They may take a while to respond.

@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 Jul 9, 2025
@xizheyin
Copy link
Contributor Author

Oh, not on the review rotation.
r? compiler

@rustbot rustbot assigned SparrowLii and unassigned wesleywiser Jul 10, 2025
@@ -124,14 +124,19 @@ impl SearchPath {
early_dcx.early_fatal("empty search path given via `-L`");
}

if !dir.exists() {
#[allow(rustc::untranslatable_diagnostic)] // FIXME: make this translatable
early_dcx.early_warn(format!("search path `{}` does not exist", dir.display()));
Copy link
Member

Choose a reason for hiding this comment

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

I think we‘d better to explicitly inform users that this search path comes from the -L option.

@jieyouxu
Copy link
Member

jieyouxu commented Jul 10, 2025

I feel like this is might be quite annoying, probably moreso than -ofilename next doors.

Discussion thread: #t-compiler > Warn on `-Lnonexistent_path`?

@SparrowLii
Copy link
Member

I think this is blocked on the topics about wether to add a warning which may affect many users
@rustbot blocked (https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Warn.20on.20.60-Lnonexistent_path.60.3F)

@rustbot rustbot added S-blocked Status: 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 Jul 16, 2025
@xizheyin
Copy link
Contributor Author

Yes, we have no better way to solve this problem for the time being. This can't be controlled as conservatively as #143719. Should I close this PR?

@SparrowLii
Copy link
Member

Yea you can close it

@xizheyin xizheyin closed this Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked Status: Blocked on something else such as an RFC or other implementation work. 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.

5 participants