1. 04 Oct, 2021 1 commit
  2. 01 Oct, 2021 1 commit
    • Cristian Maglie's avatar
      [skip-changelog] Pluggable monitor fix and refactor (#1482) · 9079f851
      Cristian Maglie authored
      * Fixed race condition in pluggable monitor
      
      Many methods had the stateLock held for the entire scope of the function
      call but the 'port_closed' message can be received at any moment,
      asyncronously, and it requires a stateLock as well. In this case the
      worst case is that the decode loop is blocked for 10 seconds until the
      timeout occurs, but this is not ideal.
      
      This bug has been fixed by removing the state, since it's not really
      useful.
      
      * Improved message logging in pluggable monitor
      
      * Refactored message processing in pluggable monitor
      
      * Fix i18n
      
      * fixed lint suggestion
      
      * fix from code review
      9079f851
  3. 29 Sep, 2021 2 commits
  4. 27 Sep, 2021 3 commits
    • per1234's avatar
      [skip changelog] Temporarily full pin Python in all GitHub Actions workflows (#1478) · 4708cde8
      per1234 authored
      A bug introduced in the 3.9.7 release of Python causes a spurious failure of the
      `test\test_lib.py::test_install_git_invalid_library` integration test:
      https://bugs.python.org/issue45121
      
      As a workaround, the last working version of Python must be used: 3.9.6. In order to ensure this is done when running the
      integration tests locally, this version is specified in the Poetry configuration. Even though only the integration tests
      require this version limitation, the Poetry configuration change affects all processes that use Poetry. Since only the
      integration test workflow was adjusted accordingly, the other workflows using Poetry continued to explicitely install
      a version of Python that did not fulfill the version constraints specified in the Poetry configuration. It seems it was
      possible for Poetry to find a compatible version on the runner:
      
      > The currently activated Python version 3.9.7 is not supported by the project (>=3.8, <3.9.7).
      > Trying to find and use a compatible version.
      > Using python3.8 (3.8.10)
      
      but this additional output caused a failure of the "Deploy Website" workflow due to expecting only valid JSON as the
      output from the siteversion.py script:
      
      ```
      Error: The template is not valid. Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: T. Path '', line 0, position 0.
      ```
      
      Even though the other workflows were able to continue to work with the discovered Python 3.8.10, it seems safest avoid
      reliance on whatever Python the runner happens to have installed and instead explicitly install the Python version we
      want to be used. So the full pin of Python is done in all workflows that use Poetry.
      
      Since it is convenient to get automatic updates for Python patch releases, this full pin should be reverted back to the
      "3.9" minor version pin once a new version of Python is released with the bug fixed and added to versions available for
      installation via the `actions/setup-python` GitHub Actions action.
      4708cde8
    • Silvano Cerza's avatar
    • Silvano Cerza's avatar
  5. 24 Sep, 2021 5 commits
  6. 23 Sep, 2021 5 commits
  7. 22 Sep, 2021 2 commits
  8. 17 Sep, 2021 1 commit
  9. 15 Sep, 2021 1 commit
  10. 13 Sep, 2021 3 commits
  11. 10 Sep, 2021 2 commits
  12. 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
  13. 03 Sep, 2021 2 commits
  14. 02 Sep, 2021 4 commits
  15. 01 Sep, 2021 2 commits
  16. 31 Aug, 2021 4 commits