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

Build::expand() prints the filename as a warning on windows #896

Open
dimbleby opened this issue Nov 8, 2023 · 4 comments
Open

Build::expand() prints the filename as a warning on windows #896

dimbleby opened this issue Nov 8, 2023 · 4 comments
Labels
O-windows Windows targets and toolchains

Comments

@dimbleby
Copy link

dimbleby commented Nov 8, 2023

> cargo c
warning: expando.c
    Finished dev [unoptimized + debuginfo] target(s) in 0.10s

presumably because cl.exe likes to print the filename, I guess to stderr, eg

> "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX64\\x64\\cl.exe" "-nologo" "-MD" "-Z7" "-Brepro" "-I" "c-ares/include/" "-W4" "-E" "build/expando.c"
expando.c
#line 1 "build/expando.c"
#line 1 "C:\\Users\\dch\\rust-c-ares\\c-ares-sys\\c-ares\\include\\ares_version.h"
...

and then cc-rs presents that as a warnng.

Just a minor annoyance I guess.

@dimbleby
Copy link
Author

dimbleby commented Nov 8, 2023

I did search for duplicates but I now found #296, which does nothing with this on the grounds that it doesn't come up often.

Well I guess I'm telling you that it does come up a bit more often; but I would acknowledge that two reports in five-ish years isn't very many.

@thomcc
Copy link
Member

thomcc commented Nov 12, 2023

Is there a better way for us to distinguish this from actual warnings than just comparing it to the file name (which is pretty annoying...)

@dimbleby
Copy link
Author

maybe just assume that the first line of output is the filename?

If I'd found the earlier issue choosing to do nothing about this first then I'd likely not have bothered to raise it again: continuing to do nothing doesn't seem like an unreasonable choice.

@thomcc thomcc added the O-windows Windows targets and toolchains label Nov 12, 2023
@ChrisDenton
Copy link
Contributor

I think checking that it is the same is better than just assuming it is because I'm not 100% confident ignoring the first line will be right in every situation. But, yeah, it would be much better if there were some principled way to filter the output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Windows targets and toolchains
Projects
None yet
Development

No branches or pull requests

3 participants