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

regression: hide include-not-found errors during library discovery #2267

Merged
merged 2 commits into from
Aug 18, 2023

Commits on Aug 17, 2023

  1. 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:
    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 committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    9ee79f6 View commit details
    Browse the repository at this point in the history
  2. Added integration test

    cmaglie committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    38f33e6 View commit details
    Browse the repository at this point in the history