@@ -210,7 +210,7 @@ func (s *Builder) Run(ctx *types.Context) error {
210210 types .BareCommand (func (ctx * types.Context ) error {
211211 return MergeSketchWithBootloader (
212212 ctx .OnlyUpdateCompilationDatabase , ctx .Verbose ,
213- ctx .BuildPath , ctx .Sketch , ctx .BuildProperties ,
213+ ctx .BuildPath , ctx .Builder . Sketch () , ctx .BuildProperties ,
214214 func (s string ) { ctx .Info (s ) },
215215 func (s string ) { ctx .Warn (s ) },
216216 )
@@ -258,7 +258,7 @@ func (s *Builder) Run(ctx *types.Context) error {
258258 ctx .BuildPath , ctx .SketchBuildPath ,
259259 ctx .SketchLibrariesDetector .ImportedLibraries (),
260260 ctx .BuildProperties ,
261- ctx .Sketch ,
261+ ctx .Builder . Sketch () ,
262262 ctx .SketchLibrariesDetector .IncludeFolders (),
263263 ctx .LineOffset ,
264264 ctx .OnlyUpdateCompilationDatabase ,
@@ -305,7 +305,7 @@ func (s *Builder) Run(ctx *types.Context) error {
305305func preprocessSketchCommand (ctx * types.Context ) types.BareCommand {
306306 return func (ctx * types.Context ) error {
307307 normalOutput , verboseOutput , err := PreprocessSketch (
308- ctx .Sketch , ctx .BuildPath , ctx .SketchLibrariesDetector .IncludeFolders (), ctx .LineOffset ,
308+ ctx .Builder . Sketch () , ctx .BuildPath , ctx .SketchLibrariesDetector .IncludeFolders (), ctx .LineOffset ,
309309 ctx .BuildProperties , ctx .OnlyUpdateCompilationDatabase )
310310 if ctx .Verbose {
311311 ctx .WriteStdout (verboseOutput )
@@ -357,7 +357,7 @@ func (s *Preprocess) Run(ctx *types.Context) error {
357357 }
358358
359359 // Output arduino-preprocessed source
360- preprocessedSketch , err := ctx .SketchBuildPath .Join (ctx .Sketch .MainFile .Base () + ".cpp" ).ReadFile ()
360+ preprocessedSketch , err := ctx .SketchBuildPath .Join (ctx .Builder . Sketch () .MainFile .Base () + ".cpp" ).ReadFile ()
361361 if err != nil {
362362 return err
363363 }
@@ -401,7 +401,7 @@ func findIncludes(ctx *types.Context) types.BareCommand {
401401 ctx .BuildProperties .GetPath ("build.core.path" ),
402402 ctx .BuildProperties .GetPath ("build.variant.path" ),
403403 ctx .SketchBuildPath ,
404- ctx .Sketch ,
404+ ctx .Builder . Sketch () ,
405405 ctx .LibrariesBuildPath ,
406406 ctx .BuildProperties ,
407407 ctx .TargetPlatform .Platform .Architecture ,
@@ -438,7 +438,7 @@ func containerBuildOptions(ctx *types.Context) types.BareCommand {
438438 // ctx.BuildProperties
439439 buildOptionsJSON , buildOptionsJSONPrevious , infoMessage , err := ContainerBuildOptions (
440440 ctx .HardwareDirs , ctx .BuiltInToolsDirs , ctx .OtherLibrariesDirs ,
441- ctx .BuiltInLibrariesDirs , ctx .BuildPath , ctx .Sketch , ctx .CustomBuildProperties ,
441+ ctx .BuiltInLibrariesDirs , ctx .BuildPath , ctx .Builder . Sketch () , ctx .CustomBuildProperties ,
442442 ctx .FQBN .String (), ctx .Clean , ctx .BuildProperties ,
443443 )
444444 if infoMessage != "" {
0 commit comments