Skip to content

Commit d82f086

Browse files
committed
Removed unused parameter in compile.Compile
1 parent ecabe0a commit d82f086

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

commands/compile/compile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import (
3939
var tr = i18n.Tr
4040

4141
// Compile FIXMEDOC
42-
func Compile(ctx context.Context, req *rpc.CompileRequest, outStream, errStream io.Writer, progressCB rpc.TaskProgressCB, debug bool) (r *rpc.CompileResponse, e error) {
42+
func Compile(ctx context.Context, req *rpc.CompileRequest, outStream, errStream io.Writer, progressCB rpc.TaskProgressCB) (r *rpc.CompileResponse, e error) {
4343

4444
// There is a binding between the export binaries setting and the CLI flag to explicitly set it,
4545
// since we want this binding to work also for the gRPC interface we must read it here in this

commands/daemon/daemon.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ func (s *ArduinoCoreServerImpl) Compile(req *rpc.CompileRequest, stream rpc.Ardu
209209
errStream := feedStreamTo(func(data []byte) { stream.Send(&rpc.CompileResponse{ErrStream: data}) })
210210
compileResp, compileErr := compile.Compile(
211211
stream.Context(), req, outStream, errStream,
212-
func(p *rpc.TaskProgress) { stream.Send(&rpc.CompileResponse{Progress: p}) },
213-
false) // Set debug to false
212+
func(p *rpc.TaskProgress) { stream.Send(&rpc.CompileResponse{Progress: p}) })
214213
outStream.Close()
215214
errStream.Close()
216215
var compileRespSendErr error

docs/UPGRADING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,20 @@ func Upload(ctx context.Context, req *rpc.UploadRequest, outStream io.Writer, er
3232
func UsingProgrammer(ctx context.Context, req *rpc.UploadUsingProgrammerRequest, outStream io.Writer, errStream io.Writer) error { ... }
3333
```
3434

35+
### golang API: methods in `github.com/arduino/arduino-cli/commands/compile` changed signature
36+
37+
The following method in `github.com/arduino/arduino-cli/commands/compile`:
38+
39+
```go
40+
func Compile(ctx context.Context, req *rpc.CompileRequest, outStream, errStream io.Writer, progressCB rpc.TaskProgressCB, debug bool) (r *rpc.CompileResponse, e error) { ... }
41+
```
42+
43+
do not require the `debug` parameter anymore:
44+
45+
```go
46+
func Compile(ctx context.Context, req *rpc.CompileRequest, outStream, errStream io.Writer, progressCB rpc.TaskProgressCB) (r *rpc.CompileResponse, e error) { ... }
47+
```
48+
3549
### golang API: package `github.com/arduino/arduino-cli/cli` is no more public
3650

3751
The package `cli` has been made internal. The code in this package is no more public API and can not be directly

internal/cli/compile/compile.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,7 @@ func runCompileCommand(cmd *cobra.Command, args []string) {
216216
SkipLibrariesDiscovery: skipLibrariesDiscovery,
217217
}
218218
stdOut, stdErr, stdIORes := feedback.OutputStreams()
219-
verboseCompile := configuration.Settings.GetString("logging.level") == "debug"
220-
compileRes, compileError := compile.Compile(context.Background(), compileRequest, stdOut, stdErr, nil, verboseCompile)
219+
compileRes, compileError := compile.Compile(context.Background(), compileRequest, stdOut, stdErr, nil)
221220

222221
if compileError == nil && uploadAfterCompile {
223222
userFieldRes, err := upload.SupportedUserFields(context.Background(), &rpc.SupportedUserFieldsRequest{

0 commit comments

Comments
 (0)