Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 633ad64

Browse files
committedAug 9, 2019
Fixed Preprocess task in legacy builder
It should print ctx.Source. Also removed the command PrintPreprocessedSource to furhter reduce boilerplate.
1 parent fc780ef commit 633ad64

File tree

2 files changed

+7
-47
lines changed

2 files changed

+7
-47
lines changed
 

‎legacy/builder/builder.go

Lines changed: 7 additions & 2 deletions
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{}

‎legacy/builder/print_preprocessed_source.go

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.