Skip to content

Commit d45e2c2

Browse files
committed
cleanup needed ctx sections between runs
1 parent 6366c3f commit d45e2c2

File tree

1 file changed

+8
-0
lines changed
  • src/arduino.cc/builder/jsonrpc

1 file changed

+8
-0
lines changed

src/arduino.cc/builder/jsonrpc/rpc.go

+8
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ func (h *BuildHandler) ServeJSONRPC(c context.Context, params *json.RawMessage)
7171
h.ctx.BuildCachePath = p.BuildCachePath
7272
h.ctx.BuildPath = p.BuildPath
7373
h.ctx.WarningsLevel = p.WarningsLevel
74+
h.ctx.PrototypesSection = ""
75+
76+
h.ctx.IncludeFolders = h.ctx.IncludeFolders[0:0]
77+
h.ctx.LibrariesObjectFiles = h.ctx.LibrariesObjectFiles[0:0]
78+
h.ctx.CoreObjectsFiles = h.ctx.CoreObjectsFiles[0:0]
79+
h.ctx.SketchObjectFiles = h.ctx.SketchObjectFiles[0:0]
80+
81+
h.ctx.ImportedLibraries = h.ctx.ImportedLibraries[0:0]
7482

7583
err := builder.RunBuilder(h.ctx)
7684
if err != nil {

0 commit comments

Comments
 (0)