Skip to content

Commit e8ef82a

Browse files
committed
legacy: removed parameter that happens to be always false
1 parent 552afac commit e8ef82a

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

legacy/builder/builder_utils/utils.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ func compileFileWithRecipe(ctx *types.Context, sourcePath *paths.Path, source *p
249249
return nil, errors.WithStack(err)
250250
}
251251
if !objIsUpToDate {
252-
_, _, err = ExecRecipe(ctx, properties, recipe, false /* stdout */, utils.ShowIfVerbose /* stderr */, utils.Show)
252+
_, _, err := ExecRecipe(ctx, properties, recipe, utils.ShowIfVerbose /* stdout */, utils.Show /* stderr */)
253253
if err != nil {
254254
return nil, errors.WithStack(err)
255255
}
@@ -480,17 +480,17 @@ func ArchiveCompiledFiles(ctx *types.Context, buildPath *paths.Path, archiveFile
480480
properties.SetPath(constants.BUILD_PROPERTIES_ARCHIVE_FILE_PATH, archiveFilePath)
481481
properties.SetPath(constants.BUILD_PROPERTIES_OBJECT_FILE, objectFile)
482482

483-
if _, _, err := ExecRecipe(ctx, properties, constants.RECIPE_AR_PATTERN, false /* stdout */, utils.ShowIfVerbose /* stderr */, utils.Show); err != nil {
483+
if _, _, err := ExecRecipe(ctx, properties, constants.RECIPE_AR_PATTERN, utils.ShowIfVerbose /* stdout */, utils.Show /* stderr */); err != nil {
484484
return nil, errors.WithStack(err)
485485
}
486486
}
487487

488488
return archiveFilePath, nil
489489
}
490490

491-
func ExecRecipe(ctx *types.Context, buildProperties *properties.Map, recipe string, removeUnsetProperties bool, stdout int, stderr int) ([]byte, []byte, error) {
491+
func ExecRecipe(ctx *types.Context, buildProperties *properties.Map, recipe string, stdout int, stderr int) ([]byte, []byte, error) {
492492
// See util.ExecCommand for stdout/stderr arguments
493-
command, err := PrepareCommandForRecipe(ctx, buildProperties, recipe, removeUnsetProperties)
493+
command, err := PrepareCommandForRecipe(ctx, buildProperties, recipe, false)
494494
if err != nil {
495495
return nil, nil, errors.WithStack(err)
496496
}

legacy/builder/phases/linker.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func link(ctx *types.Context, objectFiles paths.PathList, coreDotARelPath *paths
9797
properties.Set(constants.BUILD_PROPERTIES_ARCHIVE_FILE_PATH, coreArchiveFilePath.String())
9898
properties.Set("object_files", objectFileList)
9999

100-
_, _, err := builder_utils.ExecRecipe(ctx, properties, constants.RECIPE_C_COMBINE_PATTERN, false, utils.ShowIfVerbose /* stdout */, utils.Show /* stderr */)
100+
_, _, err := builder_utils.ExecRecipe(ctx, properties, constants.RECIPE_C_COMBINE_PATTERN, utils.ShowIfVerbose /* stdout */, utils.Show /* stderr */)
101101
return err
102102
}
103103

legacy/builder/phases/sizer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func checkSize(ctx *types.Context, buildProperties *properties.Map) error {
112112
}
113113

114114
func execSizeRecipe(ctx *types.Context, properties *properties.Map) (textSize int, dataSize int, eepromSize int, resErr error) {
115-
out, _, err := builder_utils.ExecRecipe(ctx, properties, constants.RECIPE_SIZE_PATTERN, false /* stdout */, utils.Capture /* stderr */, utils.Show)
115+
out, _, err := builder_utils.ExecRecipe(ctx, properties, constants.RECIPE_SIZE_PATTERN, utils.Capture /* stdout */, utils.Show /* stderr */)
116116
if err != nil {
117117
resErr = errors.New("Error while determining sketch size: " + err.Error())
118118
return

legacy/builder/recipe_runner.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (s *RecipeByPrefixSuffixRunner) Run(ctx *types.Context) error {
4747
if ctx.DebugLevel >= 10 {
4848
logger.Fprintln(os.Stdout, constants.LOG_LEVEL_DEBUG, constants.MSG_RUNNING_RECIPE, recipe)
4949
}
50-
_, _, err := builder_utils.ExecRecipe(ctx, properties, recipe, false /* stdout */, utils.ShowIfVerbose /* stderr */, utils.Show)
50+
_, _, err := builder_utils.ExecRecipe(ctx, properties, recipe, utils.ShowIfVerbose /* stdout */, utils.Show /* stderr */)
5151
if err != nil {
5252
return errors.WithStack(err)
5353
}

0 commit comments

Comments
 (0)