Skip to content

Commit b1a290c

Browse files
authored
Revert "AddgRPC interface to collect every sketch file (#926)"
This reverts commit 21d2533.
1 parent 21d2533 commit b1a290c

17 files changed

+200
-544
lines changed

client_example/go.sum

Lines changed: 0 additions & 48 deletions
Large diffs are not rendered by default.

client_example/main.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ func main() {
7070
log.Println("calling Version")
7171
callVersion(client)
7272

73-
log.Println("calling LoadSketch")
74-
callLoadSketch(client)
75-
7673
// Use SetValue to configure the arduino-cli directories.
7774
log.Println("calling SetValue")
7875
callSetValue(settingsClient)
@@ -881,18 +878,3 @@ func waitForPrompt(debugStreamingOpenClient dbg.Debug_DebugClient, prompt string
881878
}
882879
}
883880
}
884-
885-
func callLoadSketch(client rpc.ArduinoCoreClient) {
886-
currDir, _ := os.Getwd()
887-
sketch, err := client.LoadSketch(context.Background(), &rpc.LoadSketchReq{
888-
SketchPath: filepath.Join(currDir, "hello"),
889-
})
890-
if err != nil {
891-
log.Fatalf("Error getting version: %s", err)
892-
}
893-
894-
log.Printf("Sketch main file: %s", sketch.GetMainFile())
895-
log.Printf("Sketch location: %s", sketch.GetLocationPath())
896-
log.Printf("Other sketch files: %v", sketch.GetOtherSketchFiles())
897-
log.Printf("Sketch additional files: %v", sketch.GetAdditionalFiles())
898-
}

commands/daemon/daemon.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,6 @@ func (s *ArduinoCoreServerImpl) Version(ctx context.Context, req *rpc.VersionReq
154154
return &rpc.VersionResp{Version: s.VersionString}, nil
155155
}
156156

157-
// LoadSketch FIXMEDOC
158-
func (s *ArduinoCoreServerImpl) LoadSketch(ctx context.Context, req *rpc.LoadSketchReq) (*rpc.LoadSketchResp, error) {
159-
return commands.LoadSketch(ctx, req)
160-
}
161-
162157
// Compile FIXMEDOC
163158
func (s *ArduinoCoreServerImpl) Compile(req *rpc.CompileReq, stream rpc.ArduinoCore_CompileServer) error {
164159
resp, err := compile.Compile(

commands/instances.go

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import (
2323
"net/url"
2424
"path"
2525

26-
"github.com/arduino/arduino-cli/arduino/builder"
2726
"github.com/arduino/arduino-cli/arduino/cores"
2827
"github.com/arduino/arduino-cli/arduino/cores/packageindex"
2928
"github.com/arduino/arduino-cli/arduino/cores/packagemanager"
@@ -677,28 +676,3 @@ func createInstance(ctx context.Context, getLibOnly bool) (*createInstanceResult
677676

678677
return res, nil
679678
}
680-
681-
// LoadSketch collects and returns all files composing a sketch
682-
func LoadSketch(ctx context.Context, req *rpc.LoadSketchReq) (*rpc.LoadSketchResp, error) {
683-
sketch, err := builder.SketchLoad(req.SketchPath, "")
684-
if err != nil {
685-
return nil, fmt.Errorf("Error loading sketch %v: %v", req.SketchPath, err)
686-
}
687-
688-
otherSketchFiles := make([]string, len(sketch.OtherSketchFiles))
689-
for i, file := range sketch.OtherSketchFiles {
690-
otherSketchFiles[i] = file.Path
691-
}
692-
693-
additionalFiles := make([]string, len(sketch.AdditionalFiles))
694-
for i, file := range sketch.AdditionalFiles {
695-
additionalFiles[i] = file.Path
696-
}
697-
698-
return &rpc.LoadSketchResp{
699-
MainFile: sketch.MainFile.Path,
700-
LocationPath: sketch.LocationPath,
701-
OtherSketchFiles: otherSketchFiles,
702-
AdditionalFiles: additionalFiles,
703-
}, nil
704-
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ require (
2020
github.com/fluxio/iohelpers v0.0.0-20160419043813-3a4dd67a94d2 // indirect
2121
github.com/fluxio/multierror v0.0.0-20160419044231-9c68d39025e5 // indirect
2222
github.com/gofrs/uuid v3.2.0+incompatible
23-
github.com/golang/protobuf v1.4.2
23+
github.com/golang/protobuf v1.4.1
2424
github.com/h2non/filetype v1.0.8 // indirect
2525
github.com/imjasonmiller/godice v0.1.2
2626
github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8 // indirect

go.sum

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W
8585
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
8686
github.com/golang/protobuf v1.4.1 h1:ZFgWrT+bLgsYPirOnRfKLYJLvssAegOj/hgyMFdJZe0=
8787
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
88-
github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
89-
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
9088
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
9189
github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
9290
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
@@ -322,7 +320,6 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ
322320
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
323321
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
324322
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
325-
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
326323
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
327324
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
328325
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=

rpc/commands/board.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)