Skip to content

--preprocess key prints informational messages to the output #2150

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
3 tasks done
okalachev opened this issue Apr 17, 2023 · 0 comments · Fixed by #2152
Closed
3 tasks done

--preprocess key prints informational messages to the output #2150

okalachev opened this issue Apr 17, 2023 · 0 comments · Fixed by #2152
Assignees
Labels
topic: CLI Related to the command line interface topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@okalachev
Copy link

okalachev commented Apr 17, 2023

Describe the problem

When it's needed to get the preprocessed C++ code of a sketch, one can use the --preprocess key (Print preprocessed code to stdout instead of compiling) and redirect the output to a file.

This key works well, but in the end of the output it prints the list of cores and libraries used, like this:

Used platform Version Path                                                             
esp32:esp32   2.0.7   /Users/user/Library/Arduino15/packages/esp32/hardware/esp32/2.0.7

If it would be printed to stderr, it would be OK, but since it's in the stdout, it appears in the resulting file, thereby breaking it.

To reproduce

Compile a sketch with --preprocess key.

Expected behavior

The list of used cores and libraries should be disabled when using --preprocess key, or be printed to stderr (more preferable).

Arduino CLI version

0.31.0

Operating system

macOS

Operating system version

macOS 13.3

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details
@okalachev okalachev added the type: imperfection Perceived defect in any part of project label Apr 17, 2023
@okalachev okalachev changed the title --preprocess key prints informational messages in the output --preprocess key prints informational messages to the output Apr 17, 2023
@cmaglie cmaglie added the topic: CLI Related to the command line interface label Apr 19, 2023
@per1234 per1234 added the topic: code Related to content of the project itself label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: CLI Related to the command line interface topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants