1. 20 Feb, 2023 3 commits
  2. 17 Feb, 2023 2 commits
  3. 13 Feb, 2023 2 commits
  4. 09 Feb, 2023 1 commit
  5. 08 Feb, 2023 2 commits
  6. 07 Feb, 2023 1 commit
  7. 06 Feb, 2023 1 commit
  8. 02 Feb, 2023 1 commit
  9. 01 Feb, 2023 2 commits
  10. 31 Jan, 2023 2 commits
  11. 30 Jan, 2023 2 commits
  12. 27 Jan, 2023 1 commit
    • Cristian Maglie's avatar
      [skip-changelog] refactoring: Fixing legacy pathnames (#2038) · 58c6bc3c
      Cristian Maglie authored
      * Removed builderCtx.BuildCachePath
      
      Because it creates a lot of confusion
      
      * Removed useless assignment
      
      * Do not store sketch build-path but generate it on demand
      
      * Removed redundant SketchLocation field and related subroutines
      
      * Replaced deprecated calls (from go linter)
      58c6bc3c
  13. 24 Jan, 2023 2 commits
  14. 19 Jan, 2023 2 commits
  15. 17 Jan, 2023 2 commits
  16. 16 Jan, 2023 1 commit
    • Cristian Maglie's avatar
      [breaking] Fixed a lot of `--format json` and, in general, how Arduino CLI... · b3e8f8a4
      Cristian Maglie authored
      [breaking] Fixed a lot of `--format json` and, in general, how Arduino CLI output is handled (#2003)
      
      * Added source code static-check to enforce `--format` output.
      
      The first test run gives:
      
      === RUN   TestNoDirectOutputToStdOut
      burnbootloader/burnbootloader.go:85:5: object `os.Stdout` should not be used in this package (use `feedback.*` instead)
      burnbootloader/burnbootloader.go:85:16: object `os.Stderr` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:235:84: object `os.Stdout` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:235:95: object `os.Stderr` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:274:72: object `os.Stdout` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:274:83: object `os.Stderr` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:296:4: function `fmt.Println` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:297:4: function `fmt.Println` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:298:4: function `fmt.Println` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:305:3: function `fmt.Println` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:306:3: function `fmt.Println` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:307:3: function `fmt.Println` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:308:3: function `fmt.Println` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:309:3: function `fmt.Println` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:311:3: function `fmt.Println` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:313:4: function `fmt.Println` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:319:4: function `fmt.Println` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:321:5: function `fmt.Println` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:325:4: function `fmt.Println` should not be used in this package (use `feedback.*` instead)
      compile/compile.go:326:4: function `fmt.Print` should not be used in this package (use `feedback.*` instead)
      completion/completion.go:58:34: object `os.Stdout` should not be used in this package (use `feedback.*` instead)
      completion/completion.go:61:38: object `os.Stdout` should not be used in this package (use `feedback.*` instead)
      completion/completion.go:63:32: object `os.Stdout` should not be used in this package (use `feedback.*` instead)
      completion/completion.go:66:32: object `os.Stdout` should not be used in this package (use `feedback.*` instead)
      completion/completion.go:68:38: object `os.Stdout` should not be used in this package (use `feedback.*` instead)
      daemon/interceptors.go:29:19: object `os.Stdout` should not be used in this package (use `feedback.*` instead)
      debug/debug.go:106:82: object `os.Stdout` should not be used in this package (use `feedback.*` instead)
      monitor/term.go:38:9: object `os.Stdout` should not be used in this package (use `feedback.*` instead)
      output/rpc_progress.go:115:4: function `fmt.Print` should not be used in this package (use `feedback.*` instead)
      output/rpc_progress.go:117:5: function `fmt.Println` should not be used in this package (use `feedback.*` instead)
      output/rpc_progress.go:119:5: function `fmt.Println` should not be used in this package (use `feedback.*` instead)
      upload/upload.go:163:5: object `os.Stdout` should not be used in this package (use `feedback.*` instead)
      upload/upload.go:163:16: object `os.Stderr` should not be used in this package (use `feedback.*` instead)
      cli.go:215:4: function `fmt.Println` should not be used in this package (use `feedback.*` instead)
      --- FAIL: TestNoDirectOutputToStdOut (0.01s)
      FAIL
      exit status 1
      FAIL	github.com/arduino/arduino-cli/cli	0.019s
      
      * Slightly improved naming/docs of OutputFormat enumeration
      
      Also changed a condition in a more meaningful way.
      
      * Removed `feedback.Feedback` since only the global instance is used
      
      We may think of bringing it back again in the future if the global
      instance will be removed in a major refactoring of the CLI.
      
      * Moved `cli/output` package into `cli/feedback`
      
      This is the better place where it belongs, and slighlty simplifies the
      golang API.
      
      * Print progress bar and task progess only on interactive terminals
      
      * Use feedback functions to output task progress
      
      * User-input functions are now moved into `feedback` package
      
      * Fix user-input function
      
      - Final "\n" is automatically printed when entering non-passwords (no
        need to do a Println()
      - The final "\n" is included in the result of ReadBytes() so it will be
        removed.
      
      * Added cmd to test feedback functions
      
      * Better error message
      
      * Removed unprotected print
      
      * Removed useless response from Upload and UploadWithProgrammer
      
      * VersionInfo now implements feedback.Result interface
      
      * Added `feedback` support for direct streaming
      
      When the Text format is selected the output is sent straigh to the
      output stream, otherwise it is buffered and returned as a
      `feedback.Result` to be used at the end of the job.
      
      * Replace direct use of os.Stdout/Stderr in Upload command
      
      * Implemented feedback.Fatal and FatalError
      
      These functions outputs the error (also in machine-encoded if user
      choose to do so) and at the same time exits with os.Exit().
      
      This API is much more readable and provides a better meaning to the CLI
      commands implementation.
      
      * Added output buffers in error messages (if used)
      
      * Removed direct access to stdio streams in monitor command
      
      * Removed direct access to stdio streams in debug command
      
      * Removed direct access to stdio streams in daemon command
      
      * Removed direct access to stdio streams in burn-bootlodaer command
      
      * Removed direct access to stdio streams in compile command
      
      * Removed direct access to stdio streams in completion command
      
      * compile: print platforms stats only if present
      
      * Removed direct access to stdio streams in --dump-profile command
      
      * Added feedback functions to report warnings
      
      * Moved `errorcodes` into `feedback`
      
      * Remove direct os.Stdin access from daemon command
      
      * Removed redundant `cli/globals` package
      
      This will help later to make the whole `cli` package internal.
      
      * Made `cli` package internal
      
      * updated docs
      
      * Removed redundant logic in getter for stdio streams
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      
      * Internationalize more strings
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      
      * Spellcheck internal/cli/feedback/stdio.go
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      
      * Spellcheck internal/cli/feedback/feedback_cmd.go
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      
      * feedback: remove stray '\r' on Windows on interactive input
      
      * Ban use of os.Exit from cli package
      
      * Removed unused parameter in compile.Compile
      
      * Non-interactive stream are always buffered
      
      * Use direct streams where appropiate
      
      * Compile outputs profile dump as part of the result
      
      * Report saved warnings also when erroring out
      
      * Print compile error and suggestions as part of the result
      
      * Add trailing newline only if compiler has produced output
      
      * FatalResult now outputs the error on stderr
      Co-authored-by: default avatarper1234 <accounts@perglass.com>
      b3e8f8a4
  17. 12 Jan, 2023 2 commits
  18. 10 Jan, 2023 1 commit
    • Giuliano Panzironi's avatar
      Store all temporary files under a single folder (#2031) · 34762a6d
      Giuliano Panzironi authored
      Fix #2028
      
      Any temporary file will be persisted in a new dedicated folder named as "arduino" located in the OS-specific temporary directory, e.g.:
      /tmp/
      ├── arduino
      │   ├── arduino-core-cache
      │   │   └── core_arduino_avr_uno_640aa5b4d646262327bbea65c3462b39.a
      │   └── arduino-sketch-89E1544CF5F196B29E530BA6940B661F
      │       ├── 06.ino.elf
      │       ├── 06.ino.with_bootloader.bin
      │       ├── build.options.json
      │       ├── compile_commands.json
      │       ├── core
      │       │   ├── abi.cpp.d
      [...]
      
      This change is meant to make easier maintenance operations for both end-users and operating-systems.
      Signed-off-by: default avatargiuliano <panzironi.giuliano@gmail.com>
      34762a6d
  19. 05 Jan, 2023 1 commit
  20. 04 Jan, 2023 1 commit
  21. 03 Jan, 2023 2 commits
  22. 21 Dec, 2022 1 commit
  23. 19 Dec, 2022 2 commits
    • MatteoPologruto's avatar
      Add `Online Help` link to gRPC interface's `Platform` (#2009) · 13fa409c
      MatteoPologruto authored
      * Add online help field to rpc platform
      
      * Add online help field to the output of `core search --format json`
      
      * Add tests for the changes
      13fa409c
    • per1234's avatar
      Disable "fail fast" feature in "Test Go" workflow (#2014) · de905799
      per1234 authored
      For efficiency, the "Test Go" GitHub Actions workflow splits the test suite into multiple jobs which run in parallel.
      This is done via a "job matrix".
      
      By default GitHub Actions uses a "fail fast" behavior for job matrixes, where all in progress or pending jobs of the
      matrix are immediately canceled upon failure of any job.
      
      The benefit of this "fail fast" behavior is efficiency in the case where a failure is universal and those other jobs
      were certain to eventually fail. However, in other cases a failure is either specific to the configuration of a single
      job (e.g., a Windows-specific bug), or a spurious result of a transient network outage. In the latter case, canceling
      the other jobs is very harmful. Running the jobs for the other operating systems would highlight the nature of an
      OS-specific failure for the contributor. Canceling other jobs due to a transient failure means all those jobs must be
      reran instead of only the specific job that suffered the failure.
      
      The workflow is hereby configured to disable the "fail fast" behavior. All the matrix jobs will now run even if one of
      them has failed.
      de905799
  24. 16 Dec, 2022 2 commits
  25. 14 Dec, 2022 1 commit
    • MatteoPologruto's avatar
      [skip-changelog]Migrate tests from `upload_test.py` to `test_upload.go` (#2001) · f850706b
      MatteoPologruto authored
      * Migrate TestUpload from test_upload.py to upload_test.go
      
      * Migrate TestUploadWithInputDirFlag from test_upload.py to upload_test.go
      
      * Migrate TestUploadWithInputFileFlag from test_upload.py to upload_test.go
      
      * Migrate TestCompileAndUploadCombo from test_upload.py to upload_test.go
      
      * Migrate TestCompileAndUploadComboWithCustomBuildPath from test_upload.py to upload_test.go
      
      * Migrate TestCompileAndUploadComboWithPdeExtension from test_upload.py to upload_test.go
      
      * Migrate TestUploadSketchWithPdeExtension from test_upload.py to upload_test.go
      
      * Migrate TestUploadWithInputDirContainingMultipleBinaries from test_upload.py to upload_test.go
      
      * Migrate TestCompileAndUploadComboSketchWithMismatchedCasing from test_upload.py to upload_test.go
      
      * Migrate TestUploadSketchWithMismatchedCasing from test_upload.py to upload_test.go
      
      * Migrate TestUploadToPortWithBoardAutodetect from test_upload.py to upload_test.go
      
      * Migrate TestCompileAndUploadToPortWithBoardAutodetect to upload_test.go and delete test_upload.py
      f850706b