1. 05 Oct, 2022 2 commits
  2. 04 Oct, 2022 5 commits
    • Cristian Maglie's avatar
      [breaking] Removed `real_name` field from gRPC Library message and JSON responses (#1890) · bcb69d99
      Cristian Maglie authored
      * Removed real_name field from gRPC Library message
      
      * Update docs/UPGRADING.md
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      bcb69d99
    • Cristian Maglie's avatar
      Made `core search` results more similar to Arduino IDE 1.8.x search dialog (#1904) · 1021e76f
      Cristian Maglie authored
      * Factored function to get search terms
      
      * Made 'core search' logic identical to Arduino IDE 1.8.x search dialog
      
      * Drastically simplified search algorithm for libs
      
      * Fixed SearchTermsFromQueryString function
      
      * Moving SearchTermsFromQueryString into proper place
      1021e76f
    • per1234's avatar
      [skip changelog] Use appropriate name for field that stores library folder name (#1900) · ce7b0620
      per1234 authored
      Each Arduino library has a name, which is used as its sole identifier by the user in `arduino-cli lib` commands, and by
      Arduino CLI when referring to the library in messages displayed to the user.
      
      The name is defined by:
      
      - "1.5 format" libraries: `name` field in the library.properties metadata file
      - "1.0 format" (AKA "legacy") libraries: installation folder name
      
      The name is resolved when loading the library and stored in the `Name` field of the
      `github.com/arduino/arduino-cli/arduino/libraries.Library` struct.
      
      The name of the library's installation folder is used by Arduino CLI in several other ways, most notably for determining
      "folder name priority" for use in library dependency resolution. For this reason, the folder name is also stored in the
      struct when loading the library.
      
      Arduino CLI and arduino-builder have been plagued by problems caused by the inappropriate use of this folder name as the
      identifier for the library instead of the sole correct identifier (which is only the folder name in the case of
      "1.0 format" libraries. The design of the `github.com/arduino/arduino-cli/arduino/libraries.Library` struct may have
      been a contributing factor in those bugs, since at the time of their occurrence the folder name was stored in the `Name`
      field, the metadata-defined name in a `RealName`. In addition to the fact that no one field could be used as a source of
      the name in all cases, I suspect the ambiguous field names themselves caused confusion to developers.
      
      This situation was improved by providing the library identifier via a single field for all library formats. The name
      provided by this field is the "canonical" name of the library. Inexplicably, at that time the field containing the
      folder name was renamed "CanonicalName". The string contained by this field is in no way a "canonical" name for the
      library, so the field name is bound to cause more of the same bugs and confusion the redesign of the struct was intended
      to prevent.
      
      The inappropriately named `github.com/arduino/arduino-cli/arduino/libraries.Library.CanonicalName` field is hereby
      renamed to the accurate `DirName`.
      ce7b0620
    • Cristian Maglie's avatar
      [skip-changelog] Fix integration test intermittent failure due to download/file in use (#1905) · 02e8c778
      Cristian Maglie authored
      * Do not run go integration tests in parallel
      
      This is required since the integration tests shares the download folder.
      Still not ideal, it would be better if the cli could handle concurrent
      access to the download folder (from multiple cli processes...), but at
      least allows to run the tests without random failures.
      
      * Fixed integration test
      02e8c778
    • Cristian Maglie's avatar
      `board listall` (in json/machine readable output) return boards sorted with... · 3d5a87e1
      Cristian Maglie authored
      `board listall` (in json/machine readable output) return boards sorted with the same order as in the original `boards.txt` (#1903)
      
      * Simplified internal boards menu maps construction
      
      * Redesign boards build loop to iterate following boards.txt boards order
      
      * Return board list with the same ordering as in original boards.txt
      
      * Added integration test
      3d5a87e1
  3. 03 Oct, 2022 1 commit
    • per1234's avatar
      [skip changelog] Fix pull request template markup (#1901) · 2ad24a76
      per1234 authored
      * [skip changelog] Use correct markup for PR template headings
      
      This repository uses a pull request template in order to provide a standardized structure for pull request messages.
      
      The template imposes a framework for the organization of the pull request message by providing a section to contain each
      of the distinct types of important information to be included in the pull request. As should be obvious, the only
      correct formatting for section headings is heading markup, yet somehow list markup was chosen instead. This collides
      with the appropriate use of lists within the sections.
      
      The template is hereby changed to use the correct markup for headings.
      
      * [skip changelog] Move contributor guide link to appropriate section of PR template
      
      This repository uses a pull request template in order to provide a standardized structure for pull request messages.
      
      The template includes a link to the project's contributor guide. Previously, this link was at the bottom of the
      template, separated from the other content by a horizontal rule. One of the unfortunate ambiguities of the Markdown
      syntax is that the horizontal rule syntax is the same as the "setext" H2 heading syntax, with the differentiation
      depending on whether the prior line is empty. This results in text intended to be part of the "Other information"
      section of the PR message instead being formatted as an H2 heading if the contributor does not add an empty line at the
      end of the "Other information" section.
      
      Moving the link to the section of the template that contains a checklist for the PR requirements makes the relevant
      information readily accessible to the contributor while also avoiding the creation of a formatting trap.
      2ad24a76
  4. 29 Sep, 2022 1 commit
    • MatteoPologruto's avatar
      [skip-changelog] Use a matrix to create parallel builds for each OS (#1883) · 9c784d80
      MatteoPologruto authored
      * Use a matrix create parallel builds for each os
      
      Using a matrix to run each build task greatly improves performances,
      since they can all start concurrently. The finishing time of the job
      will be equal to the one of the longer task to build, instead of being
      the sum of each individual task's finishing time.
      
      * Calculate checksums during release creation
      
      Checksums of the output files where previously calculated during the initial creation of the artifacts, during the notarization process and, finally, at the release creation's step.
      The whole process has been simplified and checksums are now computed only during the creation of the release.
      
      * Set condition to create changelog once
      
      The changelog is the same for each OS. It does not make sense to generate it more than once.
      
      * Disable s3 push for testing
      
      * Upload nightly artifacts for testing
      
      * Fix linux_arm_6 typo
      
      * Stop uploading nigthly artifacts
      
      * Enable s3 pushing
      
      * Upload build artifacts separately
      
      Previously, the different builds were firstly uploaded using a single artifact, which was then downloaded to create different ones and eventually deleted.
      Now, since builds are created concurrently, the same matrix can be used to directly upload an artifact for each build. It's necessary to use a second job to calculate the checksum related to
      each build and save them all in a single .txt file.
      9c784d80
  5. 28 Sep, 2022 1 commit
  6. 27 Sep, 2022 1 commit
    • MatteoPologruto's avatar
      [skip-changelog] Set test environment directory as CLI WorkingDir (#1886) · baa322f9
      MatteoPologruto authored
      * Set test environment directory as CLI WorkingDir
      
      By default, the working directory is the one containing the test.go file. This causes problems when executing commands that have to create files specifically in the working directory, because they either must be deleted manually or the user has to be aware of it and defer a deleting instruction. Furthermore, it messes with tests using relative paths.
      Setting the environment directory as the CLI's WorkingDir prevents the above mentioned issues from occurring.
      
      * Fix errors related to the change of the working directory
      
      * Use absolute path to create daemon environment
      baa322f9
  7. 26 Sep, 2022 1 commit
    • MatteoPologruto's avatar
      [skip-changelog] Migrate tests from `test_compile_part_1.py` to `compile_part_1_test.go` (#1861) · 6c3755c7
      MatteoPologruto authored
      * Migrate TestCompileWithoutFqbn from test_compile_part_1.py to compile_part_1_test.go
      
      * Migrate TestCompileErrorMessage from test_compile_part_1.py to compile_part_1_test.go
      
      * Migrate TestCompileWithSimpleSketch from test_compile_part_1.py to compile_part_1_test.go
      
      * Migrate TestOutputFlagDefaultPath from test_compile_part_1.py to compile_part_1_test.go
      
      * Migrate TestCompileWithSketchWithSymlinkSelfloop from test_compile_part_1.py to compile_part_1_test.go
      
      * Migrate TestCompileBlacklistedSketchname from test_compile_part_1.py to compile_part_1_test.go
      
      * Migrate TestCompileWithoutPrecompiledLibraries from test_compile_part_1.py to compile_part_1_test.go
      
      * Migrate TestCompileWithBuildPropertiesFlag from test_compile_part_1.py to compile_part_1_test.go
      
      * Migrate TestCompileWithBuildPropertyContainingQuotes from
      test_compile_part_1.py to compile_part_1_test.go
      
      * Migrate TestCompileWithMultipleBuildPropertyFlags to compile_part_1_test.go and delete test_compile_part_1.py
      
      * Shorten testsuite ProjectName and DataDir to prevent errors on Windows runner
      
      Long paths caused certain commands to fail on the Windows runner. Reducing their lengths prevents those errors from occurring.
      6c3755c7
  8. 21 Sep, 2022 2 commits
  9. 20 Sep, 2022 1 commit
  10. 19 Sep, 2022 1 commit
  11. 15 Sep, 2022 1 commit
  12. 12 Sep, 2022 1 commit
  13. 09 Sep, 2022 2 commits
  14. 06 Sep, 2022 3 commits
  15. 02 Sep, 2022 8 commits
  16. 01 Sep, 2022 1 commit
  17. 30 Aug, 2022 1 commit
  18. 27 Aug, 2022 1 commit
  19. 26 Aug, 2022 2 commits
    • Cristian Maglie's avatar
      63f1e185
    • Cristian Maglie's avatar
      [breaking] daemon: Fix concurrency and streamline access to PackageManager (#1828) · 276b0cc9
      Cristian Maglie authored
      * legacy: Removed ToolsLoader step
      
      It has been splitted and merged into HardwareLoader and TargetBoardResolver
      that are more appropriate.
      
      * Fixed some function comments
      
      * Thread-safe protect access to instances map
      
      * Removed state-altering methods from PackageManager
      
      They have been moved into a Builder object that has the ability to build
      a new PackageManager. This allows to clearly separate subrotuines that
      actually change the status of the PackageManager from subroutines that
      just need to query it.
      
      * Created packagemanager.Explorer to query PackageManager data
      
      The Explorer object can be see as a read-only "view" to the underlying
      PackageManager: we may ask the PackageManager to create an Explorer on
      itself. The returned explorer will held a read-lock on the
      PackageManager until it's disposed.
      
      This architecture should prevent unwanted changes on the PackageManager
      while it's being used, and viceversa, when the PackageManager is updated
      it should be guaranteed that no Explorers are reading it.
      
      * PlatformInstall/Uninstall must release PackageManager.Explorer before calling commands.Init
      
      Otherwise, since Init will try to take a write-lock, it will block
      indefinitely.
      
      * Moved commands.InstanceContainer -> rpc.InstanceCommand
      
      * Created a coreInstancesContainer
      
      This container will handle all the atomic access to the instances map.
      
      * Made CoreInstance.PackageManager field private
      
      * Moved the reminder of PackageManager functions to Explorer or Builder
      
      * Now GetPackageManager accepts an rpc.InstanceCommand
      
      It has also been deprecated in favor of GetPackageManagerExplorer.
      
      * Now GetLibraryManager accepts an rpc.InstanceCommand
      
      * Refactored automatic builtin-tool installation
      
      * Added gRPC LibraryUpgrade call and fixed 'lib upgrade' command
      
      * Explorer and Builder should not extend PackageManager
      
      Previuosly the methods PackageManager.NewBuilder and
      PackageManager.NewExplorer were available also on Builder and Explorer.
      
      Now Builder and Explorer does not inherith these methods anymore,
      avoiding trivial errors like the one fixed in this commit in the
      builder_utils package.
      
      * Updated documentation
      
      * Apply suggestions from code review
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      276b0cc9
  20. 24 Aug, 2022 3 commits
  21. 22 Aug, 2022 1 commit