-
-
Notifications
You must be signed in to change notification settings - Fork 422
regression: hide include-not-found errors during library discovery #2267
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This regression was made during a refactoring of the Arduino preprocessor. In particular the wrong change was part of this commit: arduino@0585435#diff-65ff16cbee816c0f443157444d99bcc144beee06c3329aec891894c8aeda7b27L372-R378 - preproc_stderr, preproc_err = GCCPreprocRunner(ctx, sourcePath, targetFilePath, includes) + var preproc_stdout []byte + preproc_stdout, preproc_stderr, preproc_err = preprocessor.GCC(sourcePath, targetFilePath, includes, ctx.BuildProperties) + if ctx.Verbose { + ctx.WriteStdout(preproc_stdout) + ctx.WriteStdout(preproc_stderr) + } Previously GCCPreprocRunner, in verbose modem will show ONLY the stdout of the process, instead the "refactored" code wrongly added also stderr to the output. For reference this is the old GCCPreprocRunner implementation: arduino@0585435#diff-371f93465ca5a66f01cbe876348f67990750091d27a827781c8633456b93ef3bL36 -func GCCPreprocRunner(ctx *types.Context, sourceFilePath *paths.Path, targetFilePath *paths.Path, includes paths.PathList) ([]byte, error) { - cmd, err := prepareGCCPreprocRecipeProperties(ctx, sourceFilePath, targetFilePath, includes) - if err != nil { - return nil, err - } - _, stderr, err := utils.ExecCommand(ctx, cmd, utils.ShowIfVerbose /* stdout */, utils.Capture /* stderr */) - return stderr, err -} This commit fixes the regression.
@cmaglie
cmaglie
added
priority: high
Resolution is a high priority
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
criticality: highest
Of highest impact
labels
Aug 17, 2023
@cmaglie
cmaglie
requested review from
alessio-perugini,
per1234 and
MatteoPologruto
August 17, 2023 15:37
@cmaglie
cmaglie
force-pushed
the
fix_regression_1
branch
from
August 17, 2023 15:39
03fa974
to
38f33e6
Compare
alessio-perugini
alessio-perugini
approved these changes
Aug 17, 2023
6 tasks
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@ ## master #2267 +/- ## ========================================== - Coverage 62.95% 62.95% -0.01% ========================================== Files 220 220 Lines 19546 19545 -1 ========================================== - Hits 12305 12304 -1 Misses 6151 6151 Partials 1090 1090
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
Please check if the PR fulfills these requirements
See how to contribute
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)configuration.schema.json
updated if new parameters are added.What kind of change does this PR introduce?
This regression was made during a refactoring of the Arduino preprocessor. In particular the wrong change was part of this commit: 0585435#diff-65ff16cbee816c0f443157444d99bcc144beee06c3329aec891894c8aeda7b27L372-R378
Previously GCCPreprocRunner, in verbose mode would show ONLY the stdout of the process, the "refactored" code wrongly added also stderr to the output.
For reference, this is the old GCCPreprocRunner implementation: 0585435#diff-371f93465ca5a66f01cbe876348f67990750091d27a827781c8633456b93ef3bL36
This PR fixes the regression.
What is the current behavior?
Include not found errors are shown during library discovery in verbose compile. See #2263 for details.
What is the new behavior?
The spurious errors are not displayed anymore.
Does this PR introduce a breaking change, and is titled accordingly?
No
Other information
The regression has been introduced in #2194.
Fix #2263