Skip to content
New issue

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

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

Already on GitHub? # to your account

--emit=dep-info + -Zunpretty=expanded emits output #93201

Open
ojeda opened this issue Jan 22, 2022 · 2 comments
Open

--emit=dep-info + -Zunpretty=expanded emits output #93201

ojeda opened this issue Jan 22, 2022 · 2 comments
Labels
A-CLI Area: Command-line interface (CLI) to the compiler C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@ojeda
Copy link
Contributor

ojeda commented Jan 22, 2022

In 1.58, running:

echo 'fn main() {}' | rustc --emit=dep-info,obj,metadata -

will generate .d, .o and .rmeta files, as expected. However, running with -Zunpretty=expanded:

echo 'fn main() {}' | rustc --emit=dep-info,obj,metadata -Zunpretty=expanded -

will generate the .d only. I would have expected that rustc does not generate any file, or that it generates all of them, or that it complains if --emit and -Zunpretty are supposed to be incompatible with each other. Should users avoid mixing both at the moment?

(I assume that, eventually, --emit=dep-info,expanded would give the dependency information about the expanded output file like it does for the others; which is fine)

It also happens with e.g. -Zunpretty=hir, but not with -Zunpretty=normal or -Zunpretty=ast-tree; thus it looks like a consequence of which passes are executed in the compiler.

Possibly related: #60857.

@ojeda
Copy link
Contributor Author

ojeda commented Aug 6, 2023

For 1.68, the second command, i.e.

echo 'fn main() {}' | rustc --emit=dep-info,obj,metadata -Zunpretty=expanded -

still generated the .d file, but 1.71 does not anymore. I am not sure if that is the intended behavior or not.

Cc'ing @Urgau in case they know or are interested since #114476 just got merged.

@fmease fmease added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-CLI Area: Command-line interface (CLI) to the compiler and removed needs-triage-legacy labels Jan 31, 2024
@fmease
Copy link
Member

fmease commented Jan 31, 2024

but 1.71 does not anymore

1.77 (nightly) generates rustc_out.d yet again (?).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-CLI Area: Command-line interface (CLI) to the compiler C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants