Skip to content

Commit 8507cbe

Browse files
committed
Fixed Preprocess task in legacy builder
It should print ctx.Source. Also removed the command PrintPreprocessedSource to furhter reduce boilerplate.
1 parent fc780ef commit 8507cbe

File tree

2 files changed

+7
-47
lines changed

2 files changed

+7
-47
lines changed

Diff for: legacy/builder/builder.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
package builder
3131

3232
import (
33+
"fmt"
3334
"os"
3435
"reflect"
3536
"strconv"
@@ -170,11 +171,15 @@ func (s *Preprocess) Run(ctx *types.Context) error {
170171
&WarnAboutArchIncompatibleLibraries{},
171172

172173
&PreprocessSketch{},
174+
}
173175

174-
&PrintPreprocessedSource{},
176+
if err := runCommands(ctx, commands, true); err != nil {
177+
return err
175178
}
176179

177-
return runCommands(ctx, commands, true)
180+
// Output arduino-preprocessed source
181+
fmt.Println(ctx.Source)
182+
return nil
178183
}
179184

180185
type ParseHardwareAndDumpBuildProperties struct{}

Diff for: legacy/builder/print_preprocessed_source.go

-45
This file was deleted.

0 commit comments

Comments
 (0)