Workspace root detection can print warnings without context #15167
Labels
A-diagnostics
Area: Error and warning messages generated by Cargo itself.
C-bug
Category: bug
S-triage
Status: This issue is waiting on initial triage.
Problem
When there is a package in a subdirectory of another package, and the root package generates warnings, then cargo will print a warning, but not tell you where it is coming from. This can be confusing, since the package in the root doesn't actually have any bearing on the package in the subdirectory (it only needs to be parsed to know if it defines a workspace). In a normal workspace, cargo prints the path to the manifest generating the warning.
Steps
Root has:
and in a subdirectory:
building in
bar
will result in:This warning does not indicate where it is coming from. I believe this happens somewhere in
find_workspace_root_with_loader
.Possible Solution(s)
Two possible solutions I can think of:
Notes
No response
Version
The text was updated successfully, but these errors were encountered: