Skip to content

Commit eb2a61d

Browse files
committed
Moved a batch of function from commands/* subpackage to commands
This commit is preparatory to move all the implementation of ArduinoCoreService interface directly as methods of ArduinoCoreService. The goal is to turn ArduinoCoreService into a proper implementation instead of being a mere proxy to global functions.
1 parent fd1c4c4 commit eb2a61d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+140
-158
lines changed

commands/instances.go

-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ import (
4343
"google.golang.org/grpc/status"
4444
)
4545

46-
var tr = i18n.Tr
47-
4846
func installTool(pm *packagemanager.PackageManager, tool *cores.ToolRelease, downloadCB rpc.DownloadProgressCB, taskCB rpc.TaskProgressCB) error {
4947
pme, release := pm.NewExplorer()
5048
defer release()

commands/lib/search_matcher.go renamed to commands/libraries_index_search_matcher.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// Arduino software without disclosing the source code of your own applications.
1414
// To purchase a commercial license, send an email to [email protected].
1515

16-
package lib
16+
package commands
1717

1818
import (
1919
"strings"

commands/daemon/daemon.go renamed to commands/service.go

+23-29
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// Arduino software without disclosing the source code of your own applications.
1414
// To purchase a commercial license, send an email to [email protected].
1515

16-
package daemon
16+
package commands
1717

1818
import (
1919
"context"
@@ -22,16 +22,12 @@ import (
2222
"io"
2323
"sync/atomic"
2424

25-
"github.com/arduino/arduino-cli/commands"
2625
"github.com/arduino/arduino-cli/commands/board"
2726
"github.com/arduino/arduino-cli/commands/cmderrors"
2827
"github.com/arduino/arduino-cli/commands/compile"
29-
"github.com/arduino/arduino-cli/commands/core"
30-
"github.com/arduino/arduino-cli/commands/lib"
3128
"github.com/arduino/arduino-cli/commands/monitor"
3229
"github.com/arduino/arduino-cli/commands/sketch"
3330
"github.com/arduino/arduino-cli/commands/upload"
34-
"github.com/arduino/arduino-cli/internal/i18n"
3531
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
3632
"github.com/sirupsen/logrus"
3733
"google.golang.org/grpc/metadata"
@@ -45,8 +41,6 @@ type ArduinoCoreServerImpl struct {
4541
VersionString string
4642
}
4743

48-
var tr = i18n.Tr
49-
5044
func convertErrorToRPCStatus(err error) error {
5145
if err == nil {
5246
return nil
@@ -76,13 +70,13 @@ func (s *ArduinoCoreServerImpl) BoardList(ctx context.Context, req *rpc.BoardLis
7670

7771
// BoardListAll FIXMEDOC
7872
func (s *ArduinoCoreServerImpl) BoardListAll(ctx context.Context, req *rpc.BoardListAllRequest) (*rpc.BoardListAllResponse, error) {
79-
resp, err := board.ListAll(ctx, req)
73+
resp, err := BoardListAll(ctx, req)
8074
return resp, convertErrorToRPCStatus(err)
8175
}
8276

8377
// BoardSearch exposes to the gRPC interface the board search command
8478
func (s *ArduinoCoreServerImpl) BoardSearch(ctx context.Context, req *rpc.BoardSearchRequest) (*rpc.BoardSearchResponse, error) {
85-
resp, err := board.Search(ctx, req)
79+
resp, err := BoardSearch(ctx, req)
8680
return resp, convertErrorToRPCStatus(err)
8781
}
8882

@@ -114,14 +108,14 @@ func (s *ArduinoCoreServerImpl) BoardListWatch(req *rpc.BoardListWatchRequest, s
114108

115109
// Destroy FIXMEDOC
116110
func (s *ArduinoCoreServerImpl) Destroy(ctx context.Context, req *rpc.DestroyRequest) (*rpc.DestroyResponse, error) {
117-
resp, err := commands.Destroy(ctx, req)
111+
resp, err := Destroy(ctx, req)
118112
return resp, convertErrorToRPCStatus(err)
119113
}
120114

121115
// UpdateIndex FIXMEDOC
122116
func (s *ArduinoCoreServerImpl) UpdateIndex(req *rpc.UpdateIndexRequest, stream rpc.ArduinoCoreService_UpdateIndexServer) error {
123117
syncSend := NewSynchronizedSend(stream.Send)
124-
err := commands.UpdateIndex(stream.Context(), req,
118+
err := UpdateIndex(stream.Context(), req,
125119
func(p *rpc.DownloadProgress) { syncSend.Send(&rpc.UpdateIndexResponse{DownloadProgress: p}) },
126120
)
127121
return convertErrorToRPCStatus(err)
@@ -130,7 +124,7 @@ func (s *ArduinoCoreServerImpl) UpdateIndex(req *rpc.UpdateIndexRequest, stream
130124
// UpdateLibrariesIndex FIXMEDOC
131125
func (s *ArduinoCoreServerImpl) UpdateLibrariesIndex(req *rpc.UpdateLibrariesIndexRequest, stream rpc.ArduinoCoreService_UpdateLibrariesIndexServer) error {
132126
syncSend := NewSynchronizedSend(stream.Send)
133-
err := commands.UpdateLibrariesIndex(stream.Context(), req,
127+
err := UpdateLibrariesIndex(stream.Context(), req,
134128
func(p *rpc.DownloadProgress) { syncSend.Send(&rpc.UpdateLibrariesIndexResponse{DownloadProgress: p}) },
135129
)
136130
return convertErrorToRPCStatus(err)
@@ -145,14 +139,14 @@ func (s *ArduinoCoreServerImpl) Create(ctx context.Context, req *rpc.CreateReque
145139
if len(userAgent) == 0 {
146140
userAgent = []string{"gRPCClientUnknown/0.0.0"}
147141
}
148-
res, err := commands.Create(req, userAgent...)
142+
res, err := Create(req, userAgent...)
149143
return res, convertErrorToRPCStatus(err)
150144
}
151145

152146
// Init FIXMEDOC
153147
func (s *ArduinoCoreServerImpl) Init(req *rpc.InitRequest, stream rpc.ArduinoCoreService_InitServer) error {
154148
syncSend := NewSynchronizedSend(stream.Send)
155-
err := commands.Init(req, func(message *rpc.InitResponse) { syncSend.Send(message) })
149+
err := Init(req, func(message *rpc.InitResponse) { syncSend.Send(message) })
156150
return convertErrorToRPCStatus(err)
157151
}
158152

@@ -217,7 +211,7 @@ func (s *ArduinoCoreServerImpl) Compile(req *rpc.CompileRequest, stream rpc.Ardu
217211
// PlatformInstall FIXMEDOC
218212
func (s *ArduinoCoreServerImpl) PlatformInstall(req *rpc.PlatformInstallRequest, stream rpc.ArduinoCoreService_PlatformInstallServer) error {
219213
syncSend := NewSynchronizedSend(stream.Send)
220-
resp, err := core.PlatformInstall(
214+
resp, err := PlatformInstall(
221215
stream.Context(), req,
222216
func(p *rpc.DownloadProgress) { syncSend.Send(&rpc.PlatformInstallResponse{Progress: p}) },
223217
func(p *rpc.TaskProgress) { syncSend.Send(&rpc.PlatformInstallResponse{TaskProgress: p}) },
@@ -231,7 +225,7 @@ func (s *ArduinoCoreServerImpl) PlatformInstall(req *rpc.PlatformInstallRequest,
231225
// PlatformDownload FIXMEDOC
232226
func (s *ArduinoCoreServerImpl) PlatformDownload(req *rpc.PlatformDownloadRequest, stream rpc.ArduinoCoreService_PlatformDownloadServer) error {
233227
syncSend := NewSynchronizedSend(stream.Send)
234-
resp, err := core.PlatformDownload(
228+
resp, err := PlatformDownload(
235229
stream.Context(), req,
236230
func(p *rpc.DownloadProgress) { syncSend.Send(&rpc.PlatformDownloadResponse{Progress: p}) },
237231
)
@@ -244,7 +238,7 @@ func (s *ArduinoCoreServerImpl) PlatformDownload(req *rpc.PlatformDownloadReques
244238
// PlatformUninstall FIXMEDOC
245239
func (s *ArduinoCoreServerImpl) PlatformUninstall(req *rpc.PlatformUninstallRequest, stream rpc.ArduinoCoreService_PlatformUninstallServer) error {
246240
syncSend := NewSynchronizedSend(stream.Send)
247-
resp, err := core.PlatformUninstall(
241+
resp, err := PlatformUninstall(
248242
stream.Context(), req,
249243
func(p *rpc.TaskProgress) { syncSend.Send(&rpc.PlatformUninstallResponse{TaskProgress: p}) },
250244
)
@@ -257,7 +251,7 @@ func (s *ArduinoCoreServerImpl) PlatformUninstall(req *rpc.PlatformUninstallRequ
257251
// PlatformUpgrade FIXMEDOC
258252
func (s *ArduinoCoreServerImpl) PlatformUpgrade(req *rpc.PlatformUpgradeRequest, stream rpc.ArduinoCoreService_PlatformUpgradeServer) error {
259253
syncSend := NewSynchronizedSend(stream.Send)
260-
resp, err := core.PlatformUpgrade(
254+
resp, err := PlatformUpgrade(
261255
stream.Context(), req,
262256
func(p *rpc.DownloadProgress) { syncSend.Send(&rpc.PlatformUpgradeResponse{Progress: p}) },
263257
func(p *rpc.TaskProgress) { syncSend.Send(&rpc.PlatformUpgradeResponse{TaskProgress: p}) },
@@ -270,7 +264,7 @@ func (s *ArduinoCoreServerImpl) PlatformUpgrade(req *rpc.PlatformUpgradeRequest,
270264

271265
// PlatformSearch FIXMEDOC
272266
func (s *ArduinoCoreServerImpl) PlatformSearch(ctx context.Context, req *rpc.PlatformSearchRequest) (*rpc.PlatformSearchResponse, error) {
273-
resp, err := core.PlatformSearch(req)
267+
resp, err := PlatformSearch(req)
274268
return resp, convertErrorToRPCStatus(err)
275269
}
276270

@@ -367,7 +361,7 @@ func (s *ArduinoCoreServerImpl) ListProgrammersAvailableForUpload(ctx context.Co
367361
// LibraryDownload FIXMEDOC
368362
func (s *ArduinoCoreServerImpl) LibraryDownload(req *rpc.LibraryDownloadRequest, stream rpc.ArduinoCoreService_LibraryDownloadServer) error {
369363
syncSend := NewSynchronizedSend(stream.Send)
370-
resp, err := lib.LibraryDownload(
364+
resp, err := LibraryDownload(
371365
stream.Context(), req,
372366
func(p *rpc.DownloadProgress) { syncSend.Send(&rpc.LibraryDownloadResponse{Progress: p}) },
373367
)
@@ -380,7 +374,7 @@ func (s *ArduinoCoreServerImpl) LibraryDownload(req *rpc.LibraryDownloadRequest,
380374
// LibraryInstall FIXMEDOC
381375
func (s *ArduinoCoreServerImpl) LibraryInstall(req *rpc.LibraryInstallRequest, stream rpc.ArduinoCoreService_LibraryInstallServer) error {
382376
syncSend := NewSynchronizedSend(stream.Send)
383-
err := lib.LibraryInstall(
377+
err := LibraryInstall(
384378
stream.Context(), req,
385379
func(p *rpc.DownloadProgress) { syncSend.Send(&rpc.LibraryInstallResponse{Progress: p}) },
386380
func(p *rpc.TaskProgress) { syncSend.Send(&rpc.LibraryInstallResponse{TaskProgress: p}) },
@@ -391,7 +385,7 @@ func (s *ArduinoCoreServerImpl) LibraryInstall(req *rpc.LibraryInstallRequest, s
391385
// LibraryUpgrade FIXMEDOC
392386
func (s *ArduinoCoreServerImpl) LibraryUpgrade(req *rpc.LibraryUpgradeRequest, stream rpc.ArduinoCoreService_LibraryUpgradeServer) error {
393387
syncSend := NewSynchronizedSend(stream.Send)
394-
err := lib.LibraryUpgrade(
388+
err := LibraryUpgrade(
395389
stream.Context(), req,
396390
func(p *rpc.DownloadProgress) { syncSend.Send(&rpc.LibraryUpgradeResponse{Progress: p}) },
397391
func(p *rpc.TaskProgress) { syncSend.Send(&rpc.LibraryUpgradeResponse{TaskProgress: p}) },
@@ -402,7 +396,7 @@ func (s *ArduinoCoreServerImpl) LibraryUpgrade(req *rpc.LibraryUpgradeRequest, s
402396
// LibraryUninstall FIXMEDOC
403397
func (s *ArduinoCoreServerImpl) LibraryUninstall(req *rpc.LibraryUninstallRequest, stream rpc.ArduinoCoreService_LibraryUninstallServer) error {
404398
syncSend := NewSynchronizedSend(stream.Send)
405-
err := lib.LibraryUninstall(stream.Context(), req,
399+
err := LibraryUninstall(stream.Context(), req,
406400
func(p *rpc.TaskProgress) { syncSend.Send(&rpc.LibraryUninstallResponse{TaskProgress: p}) },
407401
)
408402
return convertErrorToRPCStatus(err)
@@ -411,7 +405,7 @@ func (s *ArduinoCoreServerImpl) LibraryUninstall(req *rpc.LibraryUninstallReques
411405
// LibraryUpgradeAll FIXMEDOC
412406
func (s *ArduinoCoreServerImpl) LibraryUpgradeAll(req *rpc.LibraryUpgradeAllRequest, stream rpc.ArduinoCoreService_LibraryUpgradeAllServer) error {
413407
syncSend := NewSynchronizedSend(stream.Send)
414-
err := lib.LibraryUpgradeAll(req,
408+
err := LibraryUpgradeAll(req,
415409
func(p *rpc.DownloadProgress) { syncSend.Send(&rpc.LibraryUpgradeAllResponse{Progress: p}) },
416410
func(p *rpc.TaskProgress) { syncSend.Send(&rpc.LibraryUpgradeAllResponse{TaskProgress: p}) },
417411
)
@@ -420,19 +414,19 @@ func (s *ArduinoCoreServerImpl) LibraryUpgradeAll(req *rpc.LibraryUpgradeAllRequ
420414

421415
// LibraryResolveDependencies FIXMEDOC
422416
func (s *ArduinoCoreServerImpl) LibraryResolveDependencies(ctx context.Context, req *rpc.LibraryResolveDependenciesRequest) (*rpc.LibraryResolveDependenciesResponse, error) {
423-
resp, err := lib.LibraryResolveDependencies(ctx, req)
417+
resp, err := LibraryResolveDependencies(ctx, req)
424418
return resp, convertErrorToRPCStatus(err)
425419
}
426420

427421
// LibrarySearch FIXMEDOC
428422
func (s *ArduinoCoreServerImpl) LibrarySearch(ctx context.Context, req *rpc.LibrarySearchRequest) (*rpc.LibrarySearchResponse, error) {
429-
resp, err := lib.LibrarySearch(ctx, req)
423+
resp, err := LibrarySearch(ctx, req)
430424
return resp, convertErrorToRPCStatus(err)
431425
}
432426

433427
// LibraryList FIXMEDOC
434428
func (s *ArduinoCoreServerImpl) LibraryList(ctx context.Context, req *rpc.LibraryListRequest) (*rpc.LibraryListResponse, error) {
435-
resp, err := lib.LibraryList(ctx, req)
429+
resp, err := LibraryList(ctx, req)
436430
return resp, convertErrorToRPCStatus(err)
437431
}
438432

@@ -445,7 +439,7 @@ func (s *ArduinoCoreServerImpl) ArchiveSketch(ctx context.Context, req *rpc.Arch
445439
// ZipLibraryInstall FIXMEDOC
446440
func (s *ArduinoCoreServerImpl) ZipLibraryInstall(req *rpc.ZipLibraryInstallRequest, stream rpc.ArduinoCoreService_ZipLibraryInstallServer) error {
447441
syncSend := NewSynchronizedSend(stream.Send)
448-
err := lib.ZipLibraryInstall(
442+
err := ZipLibraryInstall(
449443
stream.Context(), req,
450444
func(p *rpc.TaskProgress) { syncSend.Send(&rpc.ZipLibraryInstallResponse{TaskProgress: p}) },
451445
)
@@ -455,7 +449,7 @@ func (s *ArduinoCoreServerImpl) ZipLibraryInstall(req *rpc.ZipLibraryInstallRequ
455449
// GitLibraryInstall FIXMEDOC
456450
func (s *ArduinoCoreServerImpl) GitLibraryInstall(req *rpc.GitLibraryInstallRequest, stream rpc.ArduinoCoreService_GitLibraryInstallServer) error {
457451
syncSend := NewSynchronizedSend(stream.Send)
458-
err := lib.GitLibraryInstall(
452+
err := GitLibraryInstall(
459453
stream.Context(), req,
460454
func(p *rpc.TaskProgress) { syncSend.Send(&rpc.GitLibraryInstallResponse{TaskProgress: p}) },
461455
)

commands/board/listall.go renamed to commands/service_board_listall.go

+5-6
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,21 @@
1313
// Arduino software without disclosing the source code of your own applications.
1414
// To purchase a commercial license, send an email to [email protected].
1515

16-
package board
16+
package commands
1717

1818
import (
1919
"context"
2020
"sort"
2121
"strings"
2222

23-
"github.com/arduino/arduino-cli/commands"
2423
"github.com/arduino/arduino-cli/commands/internal/instances"
2524
"github.com/arduino/arduino-cli/internal/arduino/cores"
2625
"github.com/arduino/arduino-cli/internal/arduino/utils"
2726
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
2827
)
2928

30-
// ListAll FIXMEDOC
31-
func ListAll(ctx context.Context, req *rpc.BoardListAllRequest) (*rpc.BoardListAllResponse, error) {
29+
// BoardListAll FIXMEDOC
30+
func BoardListAll(ctx context.Context, req *rpc.BoardListAllRequest) (*rpc.BoardListAllResponse, error) {
3231
pme, release, err := instances.GetPackageManagerExplorer(req.GetInstance())
3332
if err != nil {
3433
return nil, err
@@ -47,8 +46,8 @@ func ListAll(ctx context.Context, req *rpc.BoardListAllRequest) (*rpc.BoardListA
4746
}
4847

4948
rpcPlatform := &rpc.Platform{
50-
Metadata: commands.PlatformToRPCPlatformMetadata(platform),
51-
Release: commands.PlatformReleaseToRPC(installedPlatformRelease),
49+
Metadata: PlatformToRPCPlatformMetadata(platform),
50+
Release: PlatformReleaseToRPC(installedPlatformRelease),
5251
}
5352

5453
toTest := []string{

commands/board/search.go renamed to commands/service_board_search.go

+7-8
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,23 @@
1313
// Arduino software without disclosing the source code of your own applications.
1414
// To purchase a commercial license, send an email to [email protected].
1515

16-
package board
16+
package commands
1717

1818
import (
1919
"context"
2020
"sort"
2121
"strings"
2222

23-
"github.com/arduino/arduino-cli/commands"
2423
"github.com/arduino/arduino-cli/commands/internal/instances"
2524
"github.com/arduino/arduino-cli/internal/arduino/utils"
2625
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
2726
)
2827

29-
// Search returns all boards that match the search arg.
28+
// BoardSearch returns all boards that match the search arg.
3029
// Boards are searched in all platforms, including those in the index that are not yet
3130
// installed. Note that platforms that are not installed don't include boards' FQBNs.
3231
// If no search argument is used all boards are returned.
33-
func Search(ctx context.Context, req *rpc.BoardSearchRequest) (*rpc.BoardSearchResponse, error) {
32+
func BoardSearch(ctx context.Context, req *rpc.BoardSearchRequest) (*rpc.BoardSearchResponse, error) {
3433
pme, release, err := instances.GetPackageManagerExplorer(req.GetInstance())
3534
if err != nil {
3635
return nil, err
@@ -68,8 +67,8 @@ func Search(ctx context.Context, req *rpc.BoardSearchRequest) (*rpc.BoardSearchR
6867
Fqbn: board.FQBN(),
6968
IsHidden: board.IsHidden(),
7069
Platform: &rpc.Platform{
71-
Metadata: commands.PlatformToRPCPlatformMetadata(platform),
72-
Release: commands.PlatformReleaseToRPC(installedPlatformRelease),
70+
Metadata: PlatformToRPCPlatformMetadata(platform),
71+
Release: PlatformReleaseToRPC(installedPlatformRelease),
7372
},
7473
})
7574
}
@@ -83,8 +82,8 @@ func Search(ctx context.Context, req *rpc.BoardSearchRequest) (*rpc.BoardSearchR
8382
foundBoards = append(foundBoards, &rpc.BoardListItem{
8483
Name: strings.Trim(board.Name, " \n"),
8584
Platform: &rpc.Platform{
86-
Metadata: commands.PlatformToRPCPlatformMetadata(platform),
87-
Release: commands.PlatformReleaseToRPC(latestPlatformRelease),
85+
Metadata: PlatformToRPCPlatformMetadata(platform),
86+
Release: PlatformReleaseToRPC(latestPlatformRelease),
8887
},
8988
})
9089
}

commands/daemon/debug.go renamed to commands/service_debug.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// Arduino software without disclosing the source code of your own applications.
1414
// To purchase a commercial license, send an email to [email protected].
1515

16-
package daemon
16+
package commands
1717

1818
import (
1919
"context"

commands/lib/download.go renamed to commands/service_library_download.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,20 @@
1313
// Arduino software without disclosing the source code of your own applications.
1414
// To purchase a commercial license, send an email to [email protected].
1515

16-
package lib
16+
package commands
1717

1818
import (
1919
"context"
2020

21-
"github.com/arduino/arduino-cli/commands"
2221
"github.com/arduino/arduino-cli/commands/cmderrors"
2322
"github.com/arduino/arduino-cli/commands/internal/instances"
2423
"github.com/arduino/arduino-cli/internal/arduino/httpclient"
2524
"github.com/arduino/arduino-cli/internal/arduino/libraries/librariesindex"
26-
"github.com/arduino/arduino-cli/internal/i18n"
2725
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
2826
"github.com/arduino/go-paths-helper"
2927
"github.com/sirupsen/logrus"
3028
)
3129

32-
var tr = i18n.Tr
33-
3430
// LibraryDownload executes the download of the library.
3531
// A DownloadProgressCB callback function must be passed to monitor download progress.
3632
func LibraryDownload(ctx context.Context, req *rpc.LibraryDownloadRequest, downloadCB rpc.DownloadProgressCB) (*rpc.LibraryDownloadResponse, error) {
@@ -51,7 +47,7 @@ func LibraryDownload(ctx context.Context, req *rpc.LibraryDownloadRequest, downl
5147

5248
logrus.Info("Preparing download")
5349

54-
version, err := commands.ParseVersion(req.GetVersion())
50+
version, err := ParseVersion(req.GetVersion())
5551
if err != nil {
5652
return nil, err
5753
}

0 commit comments

Comments
 (0)