1. 27 Sep, 2021 1 commit
  2. 24 Sep, 2021 5 commits
  3. 23 Sep, 2021 5 commits
  4. 22 Sep, 2021 2 commits
  5. 17 Sep, 2021 1 commit
  6. 15 Sep, 2021 1 commit
  7. 13 Sep, 2021 3 commits
  8. 10 Sep, 2021 2 commits
  9. 07 Sep, 2021 2 commits
    • Cristian Maglie's avatar
      [skip-changelog] Removed unnecessary `fmt.*printf` before `tr(...)` / Fixed... · 7415e269
      Cristian Maglie authored
      [skip-changelog] Removed unnecessary `fmt.*printf` before `tr(...)` / Fixed i18n early static initialization problem (#1425)
      
      * Removed unnecessary fmt.*printf
      
      * removed unused variable
      
      * Fixed i18n early static initialization problem
      
      https://github.com/arduino/arduino-cli/pull/1425#discussion_r701014277
      
      these particular strings are not correctly handled by the i18n package because
      they are declared at package level before the call to i18n.Init(), and so are
      just returned as-is.
      
      * Fix lint errors and use error.Is instead of direct comparison
      
      * Revert "guard" in Tr function
      
      otherwise the unit-tests will fail:
      
      === RUN   TestBoardOptions
      --- FAIL: TestBoardOptions (0.00s)
      panic: i18n.Tr called before i18n.Init() [recovered]
      	panic: i18n.Tr called before i18n.Init()
      
      goroutine 9 [running]:
      testing.tRunner.func1.2(0xc56e00, 0xeaee20)
      	/opt/hostedtoolcache/go/1.16.7/x64/src/testing/testing.go:1143 +0x332
      testing.tRunner.func1(0xc0002a2f00)
      	/opt/hostedtoolcache/go/1.16.7/x64/src/testing/testing.go:1146 +0x4b6
      panic(0xc56e00, 0xeaee20)
      	/opt/hostedtoolcache/go/1.16.7/x64/src/runtime/panic.go:965 +0x1b9
      github.com/arduino/arduino-cli/i18n.Tr(0xdceacd, 0x28, 0x0, 0x0, 0x0, 0x0, 0x1)
      	/home/runner/work/arduino-cli/arduino-cli/i18n/i18n.go:54 +0xd9
      github.com/arduino/arduino-cli/arduino/cores.(*Board).GetBuildProperties(0x13bf060, 0xc0003b6150, 0xc000339400, 0x0, 0x0)
      	/home/runner/work/arduino-cli/arduino-cli/arduino/cores/board.go:109 +0x69d
      github.com/arduino/arduino-cli/arduino/cores.(*Board).GeneratePropertiesForConfiguration(0x13bf060, 0xdb5f54, 0xe, 0xc000309ef0, 0xc911e0, 0xc0003b6000)
      	/home/runner/work/arduino-cli/arduino-cli/arduino/cores/board.go:141 +0x28f
      github.com/arduino/arduino-cli/arduino/cores.TestBoardOptions(0xc0002a2f00)
      	/home/runner/work/arduino-cli/arduino-cli/arduino/cores/board_test.go:298 +0x4bd
      testing.tRunner(0xc0002a2f00, 0xe052a8)
      	/opt/hostedtoolcache/go/1.16.7/x64/src/testing/testing.go:1193 +0xef
      created by testing.(*T).Run
      	/opt/hostedtoolcache/go/1.16.7/x64/src/testing/testing.go:1238 +0x2b3
      FAIL	github.com/arduino/arduino-cli/arduino/cores	0.021s
      === RUN   TestIndexParsing
      --- FAIL: TestIndexParsing (0.00s)
      panic: i18n.Tr called before i18n.Init() [recovered]
      	panic: i18n.Tr called before i18n.Init()
      
      * Apply suggestions from code review
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      7415e269
    • Silvano Cerza's avatar
      [skip changelog] Fix Windows integration tests (#1432) · 15e24526
      Silvano Cerza authored
      * [skip changelog] Fix Windows integration tests
      
      * Update test/test_sketch.py
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      15e24526
  10. 03 Sep, 2021 2 commits
  11. 02 Sep, 2021 4 commits
  12. 01 Sep, 2021 2 commits
  13. 31 Aug, 2021 4 commits
  14. 30 Aug, 2021 2 commits
    • Silvano Cerza's avatar
      Enhance handling of colored output (#1418) · ff4eb92a
      Silvano Cerza authored
      ff4eb92a
    • Cristian Maglie's avatar
      [skip-changleog] Better gRPC error handling (#1251) · 75b9760c
      Cristian Maglie authored
      * Proper gRPC error handling
      
      * Update gRPC API of board command to return status.Status instead of error
      
      * Update gRPC API of remaining commands to return status.Status instead of error
      
      * Replace custom error with protobuf message
      
      Previously, a custom error was returned when attempting to upgrade a platform that was already at the latest available
      version. There is dedicated code for handling this specific error.
      
      Now that the function has been changed to return a status.Status instead of error, the previous check for the return
      being this error is no longer possible. The capability is restored by replacing the error with a protocol buffer message.
      
      * Handle details of any type in `core.PlatformUpgrade()` status
      
      The status details of the function are used to identify the specific cause of a non-nil status. This is done via a type
      assertion. Previously, this type assertion was configured such that a details of any type other than the expected would
      result in a panic. At the moment, that will not occur because we only add details of one type. However, the whole point
      of the type assertion is to support details of multiple types, and if other types are added a panic will not be the
      appropriate behavior.
      
      A better approach is to check the result of the type assertion, handling the non-nil status as a generic error if its
      details are of a different type.
      
      * Return nil on program action if an error occurred
      
      * Refactoring 'upload' commands
      
      * Refactoring 'board' commands
      
      * Refactoring 'compile' commands
      
      * Refactoring 'core' commands
      
      * Refactoring 'debug' commands
      
      * Refactoring 'lib' commands
      
      * Refactoring 'sketch' commands
      
      * Refactoring 'commands' commands
      
      * updated tests and fixed some error wording
      
      * fixed go lint warnings
      
      * Apply suggestions from code review
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      
      * Apply changes from code review
      Co-authored-by: default avatarSilvano Cerza <3314350+silvanocerza@users.noreply.github.com>
      
      * fix i18n
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      Co-authored-by: default avatarSilvano Cerza <3314350+silvanocerza@users.noreply.github.com>
      75b9760c
  15. 27 Aug, 2021 1 commit
  16. 26 Aug, 2021 3 commits