1. 19 Oct, 2023 1 commit
    • Cristian Maglie's avatar
      [skip-changelog] refactor: Made `command` functions to access PackageManager... · 4b2a32be
      Cristian Maglie authored
      [skip-changelog] refactor: Made `command` functions to access PackageManager unavailable from public API (#2335)
      
      * Let instance commands require an *rpc.Instance
      
      Removed the shorthand of the InstanceCommand interface.
      This makes the API more coherent among the `commands` instance handling.
      
      * Moved 'command' package's instances functions inside internal package
      
      This change highlights the incorrect PackageManager access in 'cli'
      package. Now those are errors:
      
      package github.com/arduino/arduino-cli
      	imports github.com/arduino/arduino-cli/internal/cli
      	imports github.com/arduino/arduino-cli/internal/cli/board
      	imports github.com/arduino/arduino-cli/internal/cli/arguments
      	internal/cli/arguments/completion.go:23:2: use of internal package github.com/arduino/arduino-cli/commands/internal/instances not allowed
      package github.com/arduino/arduino-cli
      	imports github.com/arduino/arduino-cli/internal/cli
      	imports github.com/arduino/arduino-cli/internal/cli/board
      	imports github.com/arduino/arduino-cli/internal/cli/arguments
      	internal/cli/arguments/port.go:24:2: use of internal package github.com/arduino/arduino-cli/commands/internal/instances not allowed
      
      * Made CoreInstance private
      
      * Inlined coreInstancesContainer singleton methods
      
      * Removed all wrong accesses to package Explorer
      
      * Replaced DiscoveryManager.Watch with equivalent gRPC BoardListWatch call
      
      * Replaced direct access to PackageManager to get discovery protocols
      
      Previously the function GetConnectedBoards() counter-intuitively
      returned a list of port address. Now it has been reneamed
      GetAvailablePorts() and returns the full Port object that is mapped into
      an array of Addresses or into an array of Prorocols based on the
      auto-completion request.
      4b2a32be
  2. 18 Oct, 2023 2 commits
  3. 17 Oct, 2023 3 commits
  4. 16 Oct, 2023 1 commit
  5. 13 Oct, 2023 3 commits
  6. 12 Oct, 2023 1 commit
  7. 11 Oct, 2023 1 commit
  8. 09 Oct, 2023 1 commit
  9. 02 Oct, 2023 3 commits
  10. 27 Sep, 2023 1 commit
  11. 26 Sep, 2023 1 commit
  12. 25 Sep, 2023 3 commits
  13. 22 Sep, 2023 1 commit
  14. 21 Sep, 2023 1 commit
    • Cristian Maglie's avatar
      legacy: Make a lot of Builder internals private (#2325) · dde30647
      Cristian Maglie authored
      * Removed logger as a field of BuildOptionManager
      
      * Made BuildOptionsManager a field of Builder
      
      * Renamed BuildOptionsManager -> BuildOptions
      
      * Made WipeBuildPath a method of Builder
      
      * Removed unused currentBuildOptionsJSON field
      
      * Separated wipeBuildPath and createBuildOptionsJSON actions
      
      * Made wipe() a proper method -> Buidler.wipeBuildPath()
      
      * Made BuildOptions private
      
      * Made SketchLibrariesDetector a private field of Buidler
      
      * Made BuildArtifacts private
      
      * Made all builder subpackages internal
      
      * Moved initialization of private structs inside NewBuilder
      dde30647
  15. 20 Sep, 2023 3 commits
  16. 18 Sep, 2023 1 commit
    • MatteoPologruto's avatar
      Add support for pre_uninstall scripts (#2311) · 29c70df8
      MatteoPologruto authored
      * Add skip_pre_uninstall parameter to gRPC platform requests
      
      * Add pre-uninstall flags to CLI arguments
      
      * Run pre-uninstall script when a platform or tool is uninstalled
      
      * Document the changes
      
      * Include pre-uninstall script run into the unit test
      29c70df8
  17. 16 Sep, 2023 1 commit
  18. 15 Sep, 2023 6 commits
    • Alessio Perugini's avatar
      55fc5aa7
    • Alessio Perugini's avatar
      [skip-changelog] bye bye legacy (#2317) · 4c0d72e5
      Alessio Perugini authored
      * Move Preprocess and Build in arduino/builder
      
      * Move the detector inside arduino/builder
      
      * remove legacy targets from TaskFile
      
      * inline some variable declaration
      
      * remove no longer used builder getters
      
      * make only necessary function public in the new builder
      
      * fix CR: avoid mutating internal state
      
      * fix CR: only print normaloutput when is not verbose
      4c0d72e5
    • Alessio Perugini's avatar
      Porting `legacy` tests to new integration-test infra (part 4...) (#2315) · 6d57ce69
      Alessio Perugini authored
      * ported SketchThatIncludesArduinoH from legacy into integration test
      
      * ported SketchWithStaticAsserts from legacy into integration test
      
      * ported SketchWithEnumClass from legacy into integration test
      
      * ported SketchWithExternC from legacy into integration test
      
      * ported testBuilderSketchWithMultilinePrototypes from legacy into integration test
      
      * ported SketchWithExternCMultiline from legacy into integration test
      
      * ported SketchWithMultilineTemplate from legacy into integration test
      
      * ported SketchWithFakeFunctionPointer from legacy into integration test
      
      * fix wrong templating
      
      * ported SketchWithMinMaxDefinitions from legacy into integration test
      
      * ported SketchWithFastledsLibrary from legacy into integration test
      
      * ported sketch with merged sketch and bootloader from legacy into integration test
      
      * temporary disable legacy test, before porting them to the new infra
      
      * update .gitignore
      
      * ported CheckBuildOptionsFile from legacy into integration test
      
      * ported SketchClassFunction from legacy into integration test
      
      * ported SketchThatChecksIfSPIHasTransactionsAndIncludesMissingEthernet from legacy into integration test
      
      * remove legacy builder test folder
      
      * remove unsued fields from context
      6d57ce69
    • Alessio Perugini's avatar
      legacy: Builder refactorization (part 5...) (#2312) · 9c073c14
      Alessio Perugini authored
      * move customBuildProperties to arduino/builder
      
      * remove BuildProperties from context
      
      * remove BuildPath from context
      
      * remove sketch,libraries,core build path from Context
      
      * remove buildPath parameter to PrepareSketchBuildPath func
      
      * Make CoreBuilder a method recevier of arduino/builder
      
      * Add BuilderLogger in arduino/builder
      
      * Remove BuilderLogger from CoreBuild parameter
      
      * Make getCachedCoreArchiveDirName unexported
      
      * heavily refactored the ContainerBuildOptions
      
      * remove fqbn from Context
      
      * remove clean from Context
      
      * remove unsued properties in Context
      
      * remove sourceOverrides from Context
      
      * make SketchBuilder a method recevier of arduino/builder
      
      * make BuildLibraries a method recevier of arduino/builder
      
      * make RunRecipe a method recevier of arduino/builder
      
      * make RemoveUnusedCompiledLibraries a method recevier of arduino/builder
      
      * make MergeSketchWithBootloader a method recevier of arduino/builder
      
      * make WarnAboutArchIncompatibleLibraries a method recevier of arduino/builder
      
      * make PrintUsedLibraries a method recevier of arduino/builder
      
      * make ExportCmake and PreprocessorSketch a method recevier of arduino/builder
      
      * remove legacy/constans pkg
      
      * make Linker a method recevier of arduino/builder
      
      * make Size a method recevier of arduino/builder
      
      * remove onlyUpdateCompilationDatabase from Context
      
      * remove Progress from Context
      
      * remove ExecutableSectionSize from Context
      
      * remove CompilationDatabase from Context
      
      * remove LineOffset from Context
      
      * introduce BuilderArtifacts to better isolate write operations
      
      * remove ActualPlatform and TargetPlatform from Context
      
      * directly pass the remaining properties of Context in the builder constructor
      
      The remaning fields is used only by legacy tests
      
      * polish legacy test
      9c073c14
    • Akos Kitta's avatar
      feat: log `Required tool` with `debug` severity (#2314) · 8c81d2cb
      Akos Kitta authored
      Logging with `info` generates too much noise.
      
      Closes arduino/arduino-cli#2313
      Signed-off-by: default avatarAkos Kitta <a.kitta@arduino.cc>
      8c81d2cb
    • github-actions[bot]'s avatar
  19. 11 Sep, 2023 3 commits
    • Alessio Perugini's avatar
      [skip-changelog] legacy: refactor (part 4) (#2310) · 3f5c0eb2
      Alessio Perugini authored
      * move CoreBuilder in arduino/builder and move CompilationDatabase in compilation pkg
      
      * rename CompilationDatabse in Database
      
      * move libraries phases in arduino/builder
      
      * move linker phases in arduino/builder
      
      * move sketch_builder phases in arduino/builder
      
      * move sizer phases in arduino/builder/sizer
      
      * create bulder logger
      
      * use builder logger in the sketLibrariesDetector
      
      * replace context Info logger with BuilderLogger
      
      * replace context Warn logger with BuilderLogger
      
      * replace context WriteStdout logger with BuilderLogger
      
      * replace context WriteStderr logger with BuilderLogger
      
      * directly pass the BuilderLogger to RecipeByPrefixSuffixRunner func
      
      * directly pass the BuilderLogger to part2
      
      * directly pass the BuilderLogger to Linker func
      
      * directly pass the BuilderLogger to sizer.Size func
      
      * remove Stdout, Stderr and stdlock from Context
      
      * appease golint
      
      * add missinig license headers
      
      * remove WarningsLevel from context
      
      * remove Verbose from context
      3f5c0eb2
    • Cristian Maglie's avatar
      Fixed weird error message in `core install` if invalid platform is spcified (#2309) · cf5db1b8
      Cristian Maglie authored
      * Fixed weird error message in 'core install' if invalid platform is specified
      
      * Fixed integration test
      cf5db1b8
    • Alessio Perugini's avatar
      [skip-changelog] legacy: refactor (part 3) (#2302) · 5e01a2ea
      Alessio Perugini authored
      * refactor RecipeRunner in a function
      
      * refactor CreateBuildOptionsMap in a function
      
      * refactor LoadPreviousBuildOptionsMap in a function
      
      * refactor StoreBuildOptionsMap in a function
      
      * refactor WipeoutBuildPathIfBuildOptionsChanged in a function
      
      * refactor ContainerBuildOptions in a function
      
      * refactor MergeSketchWithBootloader in a function
      
      * refactor PrintUsedLibrariesIfVerbose in a function
      
      * refactor UnusedCompiledLibrariesRemover in a function
      
      * refactor WarnAboutArchIncompatibleLibraries in a function
      
      * refactor CreateMakeRule in a function
      
      * move include finder with regex tests under detector
      
      * move jobs properites in arduino/builder component
      
      * remove sketch property from context
      
      * apply CR suggestion
      5e01a2ea
  20. 08 Sep, 2023 3 commits
    • Cristian Maglie's avatar
      [skip-changelog] legacy: refacored `makeSourceFile` / other minor code moved (#2303) · 65915d8a
      Cristian Maglie authored
      * Slightly de-entangled makeSourceFile
      
      * Moved some initializations directly into NewBuilder
      
      * Pruned constants
      
      * Pruned more constants
      
      * Fixed lint warnings
      65915d8a
    • Alessio Perugini's avatar
      [skip-changelog] legacy: Builder refactorization (part 2) (#2298) · b8024c31
      Alessio Perugini authored
      * remove unused LibraryDir from legacy context
      
      * remove unused WatchedLocation from legacy context
      
      * remove unused IgnoreSketchFolderNameErrors from legacy context
      
      * remove CanUseCachedTools from legacy context
      
      * remove UseArduinoPreprocessor from legacy context
      
      * make the CoreBuilder command a function
      
      * remove the use of context from builder_utils
      
      * mvoe types.ProgressStruct in a dedicated pkg
      
      * move ExecCommand under arduino/utils
      
      * move LogIfVerbose from utils to legacy builder
      
      * move some legacy constans in builder package
      
      * move builder_utils under arduino/builder/utils pkg
      
      * appease golint
      
      * move coreBuildCachePath in the arduino Builder
      
      * refactor Linker command in a function
      
      * refactor SketchBuilder in a function
      
      * refactor LibrariesBuilder in a function
      
      * refactor Sizer in a function
      
      * remove empty file
      
      * remove unused struct FailIfBuildPathEqualsSketchPath
      b8024c31
    • Cristian Maglie's avatar
      [skip-changelog] Porting `legacy` tests to new integration-test infra (part 3...) (#2300) · 1c110e9c
      Cristian Maglie authored
      * Ported TestCoreCaching to current integration test infra
      
      * Removed useless TestBuilderEmptySketch
      
      The same features are already tested in a number of other integration tests.
      
      * Ported TestBuilderWithBuildPathInSketchDir to current integration test infra
      
      * Ported TestLoadHardware to current integration test infra
      
      * Moved user_hardware testdata resources
      
      * Ported TestLoadHardwareMixingUserHardwareFolder to current integration test infra
      
      * Removed redundant legacy tests
      
      * Removed useless 'sleep' helper function
      
      * Removed unused LoadAndInterpolate function
      
      * Removed useless NoError helper function
      
      * Grouped tests inside the same correct sub-group
      
      * Ported TestFailIfBuildPathEqualsSketchPath and TestFailIfBuildPathEqualsSketchPathSketchPathDiffers to current integration test infra
      1c110e9c