1. 18 Oct, 2021 3 commits
    • Silvano Cerza's avatar
    • Umberto Baldi's avatar
      add dynamic completion (#1509) · 10beac75
      Umberto Baldi authored
      * add completion for `-b` or `--fqbn` for every command
      
      * add completion for `-l` or `--protocol`
      But does only work for connected boards and do not list every protocol installed
      
      * the previous implementation was working only with a board connected to the pc
      RPC was not exposing that functionality
      
      * add static completion for `--log-level, `--log-format` and `--format`
      
      * add completion for `-P` or `--programmer` & fix typo
      
      * add completion for `core uninstall`
      maybe could be done better (filter and remove the manually installed ones)
      
      * add completion for `core install` and `core download`
      
      * add completion for `lib uninstall`
      
      * add completion for `lib install`, `lib download`
      
      * add completion for `lib examples`
      
      * add completion for `config add`, `config remove`, `config delete` and `config set`
      
      * add completion for `lib deps`
      
      * add tests
      
      * enhance the completion for `config add` and `config remove`
      
      * add description completion suggestion for core, lib, fqbn, programmer
      
      * add completion also for `-p` or `--port` flag
      
      * remove the `toComplete` parameter from all the completion functions
      as of now this parameter is useless because if a string is typed in the terminal it cannot be swapped with a different one.
      For example if I write `arduino-cli compile -b avr<TAB><TAB>` the completion function returns all elements starting with `arduino:avr...`.
      So the completions are not showed because they cannot be swapped with a string that starts differently.
      The only shell which seems to support this seems to be zsh
      
      * fixes after rebase
      
      * update docs
      
      * add `-b` or `--fqbn` completion for the monitor command and tests
      
      * apply suggestions from code review
      
      * fixes after rebase
      10beac75
    • Cristian Maglie's avatar
      [skip-changelog] Drop `go.rice` library in favor of golang native `embed`... · 6c3c8647
      Cristian Maglie authored
      [skip-changelog] Drop `go.rice` library in favor of golang native `embed` (available from go1.16) (#1513)
      
      * Removed 'go.rice' library in favor of 'embed'
      
      * fix i18n
      6c3c8647
  2. 15 Oct, 2021 1 commit
  3. 14 Oct, 2021 1 commit
    • per1234's avatar
      [skip changelog] Document `packages[*].platforms[*].deprecated` package index field (#1510) · 1bd9945c
      per1234 authored
      In the event an Arduino boards platform is deprecated by the maintainer, it will be useful to clearly communicate this
      fact to the user and ensure they will easily find a preferred alternative platform. In order to facilitate this, a
      `packages[*].platforms[*].deprecated`field was added to the Arduino package index format and this information is used to
      enhance the user interfaces of the official Arduino development software.
      
      This useful feature is now documented in the Arduino package index specification.
      1bd9945c
  4. 13 Oct, 2021 1 commit
    • per1234's avatar
      [skip changelog] Fix bugs in dry run determination code for "Sync Labels" workflow (#1507) · ba8c9b70
      per1234 authored
      * [skip changelog] Correct context key name in "Sync Labels" workflow
      
      Incorrect context key name resulted in impossible to satisfy conditional, meaning the dry run determination code was
      solely dependent on the check for whether the workflow was triggered from the default branch name.
      
      * [skip changelog] Sync labels in write mode on schedule trigger
      
      In order to facilitate the testing and review of proposed changes to the repository label infrastructure, the
      "Sync Labels" template workflow does a dry run when triggered under conditions that indicate it would not be appropriate
      to make real changes to the repository's labels. The changes that would have resulted are printed to the log, but not
      actually made.
      
      One of the criteria used to determine "dry run" mode usage is whether the event occurred on the repository's default
      branch. A trigger on a development branch or for a pull request should not result in a change to the labels.
      It turns out that GitHub does not define a `github.event.repository.default_branch` context item when a workflow is
      triggered by a `schedule` event. This resulted in the workflow always running in "dry run" mode on a `schedule` trigger.
      Since `schedule` and `repository_dispatch` triggers are only permitted for the default branch, there is no need to check
      whether the event's ref matches the default branch and it is safe to always run in write mode on these events.
      ba8c9b70
  5. 11 Oct, 2021 4 commits
  6. 08 Oct, 2021 2 commits
  7. 07 Oct, 2021 1 commit
  8. 06 Oct, 2021 1 commit
    • Cristian Maglie's avatar
      Add `--quiet` and `--config` flags (#1497) · fd14435e
      Cristian Maglie authored
      * Added silent mode for monitor
      
      * Added --config flag to monitor command
      
      * fix i18n
      
      * Applied review suggestions
      
      * rename --silent to --quiet
      * removed useless 'settings' variable
      * translation string for "Monitor port settings" in CLI mode
      fd14435e
  9. 05 Oct, 2021 3 commits
  10. 04 Oct, 2021 4 commits
  11. 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
  12. 29 Sep, 2021 2 commits
  13. 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
  14. 24 Sep, 2021 5 commits
  15. 23 Sep, 2021 5 commits
  16. 22 Sep, 2021 2 commits
  17. 17 Sep, 2021 1 commit