@@ -32,6 +32,7 @@ import (
3232 "github.com/arduino/arduino-cli/internal/arduino/globals"
3333 "github.com/arduino/arduino-cli/internal/arduino/sketch"
3434 "github.com/arduino/arduino-cli/internal/i18n"
35+ "github.com/arduino/arduino-cli/pkg/fqbn"
3536 rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
3637 paths "github.com/arduino/go-paths-helper"
3738 properties "github.com/arduino/go-properties-orderedmap"
@@ -53,15 +54,15 @@ func (s *arduinoCoreServerImpl) SupportedUserFields(ctx context.Context, req *rp
5354 }
5455 defer release ()
5556
56- fqbn , err := cores . ParseFQBN (req .GetFqbn ())
57+ fqbn , err := fqbn . Parse (req .GetFqbn ())
5758 if err != nil {
5859 return nil , & cmderrors.InvalidFQBNError {Cause : err }
5960 }
6061
6162 _ , platformRelease , _ , boardProperties , _ , err := pme .ResolveFQBN (fqbn )
6263 if platformRelease == nil {
6364 return nil , & cmderrors.PlatformNotFoundError {
64- Platform : fmt .Sprintf ("%s:%s" , fqbn .Package , fqbn .PlatformArch ),
65+ Platform : fmt .Sprintf ("%s:%s" , fqbn .Packager , fqbn .Architecture ),
6566 Cause : err ,
6667 }
6768 } else if err != nil {
@@ -282,7 +283,7 @@ func (s *arduinoCoreServerImpl) runProgramAction(ctx context.Context, pme *packa
282283 return nil , & cmderrors.MissingProgrammerError {}
283284 }
284285
285- fqbn , err := cores . ParseFQBN (fqbnIn )
286+ fqbn , err := fqbn . Parse (fqbnIn )
286287 if err != nil {
287288 return nil , & cmderrors.InvalidFQBNError {Cause : err }
288289 }
@@ -292,7 +293,7 @@ func (s *arduinoCoreServerImpl) runProgramAction(ctx context.Context, pme *packa
292293 _ , boardPlatform , board , boardProperties , buildPlatform , err := pme .ResolveFQBN (fqbn )
293294 if boardPlatform == nil {
294295 return nil , & cmderrors.PlatformNotFoundError {
295- Platform : fmt .Sprintf ("%s:%s" , fqbn .Package , fqbn .PlatformArch ),
296+ Platform : fmt .Sprintf ("%s:%s" , fqbn .Packager , fqbn .Architecture ),
296297 Cause : err ,
297298 }
298299 } else if err != nil {
0 commit comments