-
-
Notifications
You must be signed in to change notification settings - Fork 422
Commit b64876c
[skip-changelog] regression: hide include-not-found errors during library discovery (#2267)
* regression: hide include-not-found errors during library discovery
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
- 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:
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.
* Added integration test1 parent 3bd60c6 commit b64876c
File tree
3 files changed
+29
-9
lines changed- internal/integrationtest/compile_3
- testdata/using_Wire
- legacy/builder
3 files changed
+29
-9
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
107 | 107 |
| |
108 | 108 |
| |
109 | 109 |
| |
110 | - | ||
111 | - | ||
112 | - | ||
110 | + | ||
111 | + | ||
112 | + | ||
113 | + | ||
114 | + | ||
115 | + | ||
116 | + | ||
117 | + | ||
118 | + | ||
119 | + | ||
120 | + | ||
113 | 121 |
| |
114 | - | ||
115 | - | ||
116 | - | ||
117 | - | ||
118 | - | ||
122 | + | ||
123 | + | ||
124 | + | ||
125 | + | ||
126 | + | ||
127 | + | ||
128 | + | ||
129 | + | ||
130 | + | ||
131 | + | ||
132 | + | ||
133 | + | ||
134 | + | ||
135 | + | ||
119 | 136 |
| |
120 | 137 |
| |
121 | 138 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
374 | 374 |
| |
375 | 375 |
| |
376 | 376 |
| |
377 | - | ||
378 | 377 |
| |
379 | 378 |
| |
380 | 379 |
| |
|
0 commit comments