@@ -18,6 +18,7 @@ package result
18
18
import (
19
19
"cmp"
20
20
"fmt"
21
+ "slices"
21
22
22
23
"github.com/arduino/arduino-cli/i18n"
23
24
f "github.com/arduino/arduino-cli/internal/algorithms"
@@ -425,6 +426,8 @@ func NewBoardDetailsResponse(b *rpc.BoardDetailsResponse) *BoardDetailsResponse
425
426
if b == nil {
426
427
return nil
427
428
}
429
+ buildProperties := b .GetBuildProperties ()
430
+ slices .Sort (buildProperties )
428
431
return & BoardDetailsResponse {
429
432
Fqbn : b .GetFqbn (),
430
433
Name : b .GetName (),
@@ -440,7 +443,7 @@ func NewBoardDetailsResponse(b *rpc.BoardDetailsResponse) *BoardDetailsResponse
440
443
Programmers : NewProgrammers (b .GetProgrammers ()),
441
444
DebuggingSupported : b .GetDebuggingSupported (),
442
445
IdentificationProperties : NewBoardIdentificationProperties (b .GetIdentificationProperties ()),
443
- BuildProperties : b . GetBuildProperties () ,
446
+ BuildProperties : buildProperties ,
444
447
DefaultProgrammerID : b .GetDefaultProgrammerId (),
445
448
}
446
449
}
@@ -636,6 +639,10 @@ func NewProgrammers(c []*rpc.Programmer) []*Programmer {
636
639
for i , v := range c {
637
640
res [i ] = NewProgrammer (v )
638
641
}
642
+
643
+ slices .SortFunc (res , func (a , b * Programmer ) int {
644
+ return cmp .Compare (a .Id , b .Id )
645
+ })
639
646
return res
640
647
}
641
648
0 commit comments