1. 09 Aug, 2021 1 commit
    • per1234's avatar
      [skip changelog] Sync certificate check CI workflow with template (#1379) · 0db96b30
      per1234 authored
      We have assembled a collection of reusable GitHub Actions workflows:
      https://github.com/arduino/tooling-project-assets
      These workflows will be used in the repositories of all Arduino tooling projects.
      
      Some minor improvements and standardizations have been made in the upstream "template" workflow, and those are introduced to this repository via this pull request.
      Notable:
      
      - Trigger workflow run on modification to facilitate testing.
      - `repository_dispatch` event trigger to allow for automated triggering across many repositories via the GitHub API following a relevant external change.
      - Change Slack webhook repository secret name.
      - Use major version ref of `rtCamp/action-slack-notify` so that the latest release of the action is used up to the next major bump.
      0db96b30
  2. 06 Aug, 2021 4 commits
  3. 05 Aug, 2021 3 commits
    • per1234's avatar
      Expand i18n coverage to all relevant strings (#1370) · e31a717e
      per1234 authored
      * Bring Go code formatting into compliance
      
      * Expand i18n coverage to all relevant strings
      
      This provides internationalization of the strings of the Arduino CLI code base. It will now be possible to completely
      translate the primary Arduino CLI user interface.
      
      We decided that the log messages would be excluded from the internationalization scope for now. The reason is that the
      addition of these strings would significantly increase the workload on the community translators, while generally being
      of less visibility and/or importance to the users. Even though on an individual basis there are surely specific log
      messages of higher importance than specific non-log strings that were internationalized, the log/non-log dichotomy
      provided an objective criterion for determining which strings were in scope for this initial effort. Perhaps we will
      expand the i18n coverage at some time in the future after there has been good progress on the initial translation effort.
      
      Some techniques were employed to facilitate translation:
      
      - Code references were moved out of strings in cases where a translator might mistake them for prose and translate them.
      - Indices were added to printf verbs when multiple were present in a string. This allows the translator to easily insert
        them at the appropriate location in the sentence structure without being required to understand the Go printf syntax
        and without being restricted to their relative order in the English language source string.
      Co-authored-by: default avatarSilvano Cerza <3314350+silvanocerza@users.noreply.github.com>
      e31a717e
    • per1234's avatar
      [skip changelog] Configure Dependabot to check for outdated actions used in workflows (#1373) · 92a4c3aa
      per1234 authored
      Dependabot will periodically check the versions of all actions used in the repository's workflows. If any are found to
      be outdated, it will submit a pull request to update them.
      
      NOTE: Dependabot's PRs will occasionally propose to pin to the patch version of the action (e.g., updating
      `uses: foo/bar@v1` to `uses: foo/bar@v2.3.4`). When the action author has provided a major version ref, use that instead
      (e.g., `uses: foo/bar@v2`). Dependabot will automatically close its PR once the workflow has been updated.
      
      More information:
      https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot
      92a4c3aa
    • per1234's avatar
      [skip changelog] Remove obsolete "Dependabot Preview" configuration file (#1372) · df46e787
      per1234 authored
      Dependabot Preview shut down 2021-08-03. It is replaced by GitHub-native Dependabot, which uses the
      `.github/dependabot.yml` configuration file, with a different data format.
      
      From an investigation into how the obsolete configuration could be migrated to the new format, I determined that the
      specific "security updates only" configuration used by this repository is not provided by the new configuration file,
      which is for configuring updates of any outdated dependencies. The "security updates" feature is configured via the
      repository settings (Settings > Security & analysis).
      
      Since the old file is no longer used, and might cause confusion, it is best to remove it from the repository.
      df46e787
  4. 28 Jul, 2021 1 commit
    • per1234's avatar
      [breaking] Pass user locale preference directly to i18n package (#1365) · 7b68b48d
      per1234 authored
      The user can configure their locale preference via the `locale` configuration key. This information is given priority by
      the `github.com/arduino/arduino-cli/configuration` package over the automatically detected locale.
      
      Previously, the `i18n` package got the configuration setting from the `github.com/arduino/arduino-cli/configuration`
      package, but this will result in an import cycle when the `i18n` package is used to enable translation of the output
      strings of the `configuration` package.
      
      To avoid this, the caller now reads the configuration and passes the locale code to the `i18n` package via its `Init`
      function:
      
      i18n.Init("it")
      
      The argument can be omitted if only automated locale detection is needed:
      
      i18n.Init()
      7b68b48d
  5. 22 Jul, 2021 1 commit
  6. 20 Jul, 2021 1 commit
  7. 19 Jul, 2021 1 commit
    • per1234's avatar
      [skip changelog] Make `i18n:generate` task Windows compatible (#1360) · 8cefc960
      per1234 authored
      For the sake of portability of tasks, Task uses `mvdan.cc/sh` to provide an command interpreter that is independent of
      the environment. While one of the great strengths of Task, this produces unexpected results in some rare cases. This is
      one of those cases. There is some unusual interaction between `mvdan.cc/sh`, Windows, and running the `rice embed-go`
      command from the subshell created by the parentheses in this command:
      
      ```
      $ task i18n:update
      ←[32mtask: [i18n:update] go run ./i18n/cmd/main.go catalog generate . > ./i18n/data/en.po
      ←[0m←[32mtask: [i18n:generate] git add -N ./i18n/data
      ←[0m←[32mtask: [i18n:generate] git diff --exit-code ./i18n/data &> /dev/null || (cd ./i18n && rice embed-go)
      ←[0merror reading package: go/build: go list github.com/arduino/arduino-cli/i18n: exec: "go": executable file not found in %PATH%
      ```
      
      It is my belief that the sole purpose of these parentheses was to group the commands and that there is no need to run
      these commands in a subshell. If so, the change to using braces to group the commands without the creation of a subshell
      will have no functional effect on the commands, but will allow the task to run on Windows.
      8cefc960
  8. 15 Jul, 2021 1 commit
  9. 13 Jul, 2021 1 commit
    • Silvano Cerza's avatar
      [breaking] Refactor codebase to use a single Sketch struct (#1353) · e7d4eaab
      Silvano Cerza authored
      * Refactor codebase to use a single Sketch struct
      
      * Add back removed legacy test
      
      * Changed Sketch struct to not use pointers
      
      * Fix small comment
      
      * Fix checkSketchCasing to work with .pde files too
      
      * Add tests loading Sketch with symlinks
      
      * Update UPGRADING.md
      
      * Clarify a code comment
      
      * Add some more tests for Sketches with symlinks
      
      * Fix Sketch symlinks tests for Windows
      e7d4eaab
  10. 12 Jul, 2021 1 commit
  11. 06 Jul, 2021 2 commits
  12. 05 Jul, 2021 2 commits
  13. 02 Jul, 2021 3 commits
  14. 01 Jul, 2021 3 commits
  15. 23 Jun, 2021 1 commit
  16. 22 Jun, 2021 1 commit
  17. 21 Jun, 2021 1 commit
  18. 18 Jun, 2021 3 commits
  19. 17 Jun, 2021 2 commits
  20. 16 Jun, 2021 3 commits
    • Silvano Cerza's avatar
      [breaking] Refactor initialization steps (#1274) · a66fea91
      Silvano Cerza authored
      * [breaking] Split rpc Init and remove Rescan function
      
      * [breaking] Refactored commands package to reflect gRPC changes
      
      * [breaking] Refactored cli package to reflect commands changes
      
      * Fix instance creation for CLI commands that update indexes
      
      * Fix unit tests
      
      * Change update indexes commands to not reload instance after
      
      * Fix installation of builtin tools
      
      * Fix integration tests
      
      * Fix code for linting
      
      * Update i18n files
      
      * Update UPGRADING.md with breaking changes
      
      * Update comment with correct information
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      
      * Using callback instead of channel+goroutine for Init
      
      * Enhance platform loading step
      
      * Update client_example to reflect new gRPC changes
      
      * Enhance Init docstring
      
      * Enhance builtin tools installation during Init
      
      * Fix unit test
      
      * Fix integration tests
      
      * [skip changelog] Fix after botched rebase
      
      * Fix issue when using Init to rescan installed core on already initialized instance
      
      * Update generated file from .proto
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      Co-authored-by: default avatarCristian Maglie <c.maglie@arduino.cc>
      a66fea91
    • Silvano Cerza's avatar
      3ae63cfc
    • Silvano Cerza's avatar
      [skip changelog] Update proto files build step (#1277) · c8059b5d
      Silvano Cerza authored
      * [skip changelog] Update proto files build step
      
      * Added missing go.sum
      
      * Update builders to 1.16.4
      
      * Fixed crossbuild for Linux ARMv6/ARMv7
      
      * Fixed macOS_64bit build
      Co-authored-by: default avatarCristian Maglie <c.maglie@arduino.cc>
      c8059b5d
  21. 14 Jun, 2021 1 commit
  22. 07 Jun, 2021 1 commit
  23. 04 Jun, 2021 1 commit
  24. 03 Jun, 2021 1 commit