@@ -18,6 +18,7 @@ package result
1818import (
1919 "cmp"
2020 "fmt"
21+ "slices"
2122
2223 "github.com/arduino/arduino-cli/i18n"
2324 f "github.com/arduino/arduino-cli/internal/algorithms"
@@ -425,6 +426,8 @@ func NewBoardDetailsResponse(b *rpc.BoardDetailsResponse) *BoardDetailsResponse
425426 if b == nil {
426427 return nil
427428 }
429+ buildProperties := b .GetBuildProperties ()
430+ slices .Sort (buildProperties )
428431 return & BoardDetailsResponse {
429432 Fqbn : b .GetFqbn (),
430433 Name : b .GetName (),
@@ -440,7 +443,7 @@ func NewBoardDetailsResponse(b *rpc.BoardDetailsResponse) *BoardDetailsResponse
440443 Programmers : NewProgrammers (b .GetProgrammers ()),
441444 DebuggingSupported : b .GetDebuggingSupported (),
442445 IdentificationProperties : NewBoardIdentificationProperties (b .GetIdentificationProperties ()),
443- BuildProperties : b . GetBuildProperties () ,
446+ BuildProperties : buildProperties ,
444447 DefaultProgrammerID : b .GetDefaultProgrammerId (),
445448 }
446449}
@@ -636,6 +639,10 @@ func NewProgrammers(c []*rpc.Programmer) []*Programmer {
636639 for i , v := range c {
637640 res [i ] = NewProgrammer (v )
638641 }
642+
643+ slices .SortFunc (res , func (a , b * Programmer ) int {
644+ return cmp .Compare (a .Id , b .Id )
645+ })
639646 return res
640647}
641648
0 commit comments