diff --git a/commands/service_compile.go b/commands/service_compile.go index 69865f3522c..37f401397de 100644 --- a/commands/service_compile.go +++ b/commands/service_compile.go @@ -160,7 +160,7 @@ func (s *arduinoCoreServerImpl) Compile(req *rpc.CompileRequest, stream rpc.Ardu return errors.New(i18n.Tr("Firmware encryption/signing requires all the following properties to be defined: %s", "build.keys.keychain, build.keys.sign_key, build.keys.encrypt_key")) } - // Generate or retrieve build path + // Retrieve build path from user arguments var buildPath *paths.Path if buildPathArg := req.GetBuildPath(); buildPathArg != "" { buildPath = paths.New(req.GetBuildPath()).Canonical() @@ -170,44 +170,46 @@ func (s *arduinoCoreServerImpl) Compile(req *rpc.CompileRequest, stream rpc.Ardu } } } - if buildPath == nil { - buildPath = sk.DefaultBuildPath() - } - if err = buildPath.MkdirAll(); err != nil { - return &cmderrors.PermissionDeniedError{Message: i18n.Tr("Cannot create build directory"), Cause: err} - } - buildcache.New(buildPath.Parent()).GetOrCreate(buildPath.Base()) - // cache is purged after compilation to not remove entries that might be required - - defer maybePurgeBuildCache( - s.settings.GetCompilationsBeforeBuildCachePurge(), - s.settings.GetBuildCacheTTL().Abs()) - var buildCachePath *paths.Path - if req.GetBuildCachePath() != "" { - p, err := paths.New(req.GetBuildCachePath()).Abs() - if err != nil { + // If no build path has been set by the user: + // - set up the build cache directory + // - set the sketch build path inside the build cache directory. + var coreBuildCachePath *paths.Path + var extraCoreBuildCachePaths paths.PathList + if buildPath == nil { + var buildCachePath *paths.Path + if p := req.GetBuildCachePath(); p != "" { //nolint:staticcheck + buildCachePath = paths.New(p) + } else { + buildCachePath = s.settings.GetBuildCachePath() + } + if err := buildCachePath.ToAbs(); err != nil { return &cmderrors.PermissionDeniedError{Message: i18n.Tr("Cannot create build cache directory"), Cause: err} } - buildCachePath = p - } else if p, ok := s.settings.GetBuildCachePath(); ok { - buildCachePath = p - } else { - buildCachePath = paths.TempDir().Join("arduino") - } - if err := buildCachePath.MkdirAll(); err != nil { - return &cmderrors.PermissionDeniedError{Message: i18n.Tr("Cannot create build cache directory"), Cause: err} - } - coreBuildCachePath := buildCachePath.Join("cores") + if err := buildCachePath.MkdirAll(); err != nil { + return &cmderrors.PermissionDeniedError{Message: i18n.Tr("Cannot create build cache directory"), Cause: err} + } + coreBuildCachePath = buildCachePath.Join("cores") - var extraCoreBuildCachePaths paths.PathList - if len(req.GetBuildCacheExtraPaths()) == 0 { - extraCoreBuildCachePaths = s.settings.GetBuildCacheExtraPaths() - } else { - extraCoreBuildCachePaths = paths.NewPathList(req.GetBuildCacheExtraPaths()...) + if len(req.GetBuildCacheExtraPaths()) == 0 { + extraCoreBuildCachePaths = s.settings.GetBuildCacheExtraPaths() + } else { + extraCoreBuildCachePaths = paths.NewPathList(req.GetBuildCacheExtraPaths()...) + } + for i, p := range extraCoreBuildCachePaths { + extraCoreBuildCachePaths[i] = p.Join("cores") + } + + buildPath = s.getDefaultSketchBuildPath(sk, buildCachePath) + buildcache.New(buildPath.Parent()).GetOrCreate(buildPath.Base()) + + // cache is purged after compilation to not remove entries that might be required + defer maybePurgeBuildCache( + s.settings.GetCompilationsBeforeBuildCachePurge(), + s.settings.GetBuildCacheTTL().Abs()) } - for i, p := range extraCoreBuildCachePaths { - extraCoreBuildCachePaths[i] = p.Join("cores") + if err = buildPath.MkdirAll(); err != nil { + return &cmderrors.PermissionDeniedError{Message: i18n.Tr("Cannot create build directory"), Cause: err} } if _, err := pme.FindToolsRequiredForBuild(targetPlatform, buildPlatform); err != nil { @@ -416,6 +418,16 @@ func (s *arduinoCoreServerImpl) Compile(req *rpc.CompileRequest, stream rpc.Ardu return nil } +// getDefaultSketchBuildPath generates the default build directory for a given sketch. +// The sketch build path is inside the build cache path and is unique for each sketch. +// If overriddenBuildCachePath is nil the build cache path is taken from the settings. +func (s *arduinoCoreServerImpl) getDefaultSketchBuildPath(sk *sketch.Sketch, overriddenBuildCachePath *paths.Path) *paths.Path { + if overriddenBuildCachePath == nil { + overriddenBuildCachePath = s.settings.GetBuildCachePath() + } + return overriddenBuildCachePath.Join("sketches", sk.Hash()) +} + // maybePurgeBuildCache runs the build files cache purge if the policy conditions are met. func maybePurgeBuildCache(compilationsBeforePurge uint, cacheTTL time.Duration) { // 0 means never purge diff --git a/commands/service_compile_test.go b/commands/service_compile_test.go new file mode 100644 index 00000000000..3eeb4521f1e --- /dev/null +++ b/commands/service_compile_test.go @@ -0,0 +1,32 @@ +// This file is part of arduino-cli. +// +// Copyright 2024 ARDUINO SA (http://www.arduino.cc/) +// +// This software is released under the GNU General Public License version 3, +// which covers the main part of arduino-cli. +// The terms of this license can be found at: +// https://www.gnu.org/licenses/gpl-3.0.en.html +// +// You can be released from the requirements of the above licenses by purchasing +// a commercial license. Buying such a license is mandatory if you want to +// modify or otherwise use the software for commercial activities involving the +// Arduino software without disclosing the source code of your own applications. +// To purchase a commercial license, send an email to license@arduino.cc. + +package commands + +import ( + "testing" + + "github.com/arduino/arduino-cli/internal/arduino/sketch" + paths "github.com/arduino/go-paths-helper" + "github.com/stretchr/testify/assert" +) + +func TestGenBuildPath(t *testing.T) { + srv := NewArduinoCoreServer().(*arduinoCoreServerImpl) + want := srv.settings.GetBuildCachePath().Join("sketches", "ACBD18DB4CC2F85CEDEF654FCCC4A4D8") + act := srv.getDefaultSketchBuildPath(&sketch.Sketch{FullPath: paths.New("foo")}, nil) + assert.True(t, act.EquivalentTo(want)) + assert.Equal(t, "ACBD18DB4CC2F85CEDEF654FCCC4A4D8", (&sketch.Sketch{FullPath: paths.New("foo")}).Hash()) +} diff --git a/commands/service_debug.go b/commands/service_debug.go index 31123cc9ae1..740e06fd2c7 100644 --- a/commands/service_debug.go +++ b/commands/service_debug.go @@ -214,7 +214,7 @@ func (s *arduinoCoreServerImpl) Debug(stream rpc.ArduinoCoreService_DebugServer) defer release() // Exec debugger - commandLine, err := getCommandLine(debugConfReq, pme) + commandLine, err := s.getDebugCommandLine(debugConfReq, pme) if err != nil { return err } @@ -254,9 +254,9 @@ func (s *arduinoCoreServerImpl) Debug(stream rpc.ArduinoCoreService_DebugServer) return sendResult(&rpc.DebugResponse_Result{}) } -// getCommandLine compose a debug command represented by a core recipe -func getCommandLine(req *rpc.GetDebugConfigRequest, pme *packagemanager.Explorer) ([]string, error) { - debugInfo, err := getDebugProperties(req, pme, false) +// getDebugCommandLine compose a debug command represented by a core recipe +func (s *arduinoCoreServerImpl) getDebugCommandLine(req *rpc.GetDebugConfigRequest, pme *packagemanager.Explorer) ([]string, error) { + debugInfo, err := s.getDebugProperties(req, pme, false) if err != nil { return nil, err } diff --git a/commands/service_debug_config.go b/commands/service_debug_config.go index 232940eb293..c2cf04e5aa3 100644 --- a/commands/service_debug_config.go +++ b/commands/service_debug_config.go @@ -45,7 +45,7 @@ func (s *arduinoCoreServerImpl) GetDebugConfig(ctx context.Context, req *rpc.Get return nil, err } defer release() - return getDebugProperties(req, pme, false) + return s.getDebugProperties(req, pme, false) } // IsDebugSupported checks if the given board/programmer configuration supports debugging. @@ -65,7 +65,7 @@ func (s *arduinoCoreServerImpl) IsDebugSupported(ctx context.Context, req *rpc.I Programmer: req.GetProgrammer(), DebugProperties: req.GetDebugProperties(), } - expectedOutput, err := getDebugProperties(configRequest, pme, true) + expectedOutput, err := s.getDebugProperties(configRequest, pme, true) var x *cmderrors.FailedDebugError if errors.As(err, &x) { return &rpc.IsDebugSupportedResponse{DebuggingSupported: false}, nil @@ -81,7 +81,7 @@ func (s *arduinoCoreServerImpl) IsDebugSupported(ctx context.Context, req *rpc.I checkFQBN := minimumFQBN.Clone() checkFQBN.Configs.Remove(config) configRequest.Fqbn = checkFQBN.String() - checkOutput, err := getDebugProperties(configRequest, pme, true) + checkOutput, err := s.getDebugProperties(configRequest, pme, true) if err == nil && reflect.DeepEqual(expectedOutput, checkOutput) { minimumFQBN.Configs.Remove(config) } @@ -92,7 +92,7 @@ func (s *arduinoCoreServerImpl) IsDebugSupported(ctx context.Context, req *rpc.I }, nil } -func getDebugProperties(req *rpc.GetDebugConfigRequest, pme *packagemanager.Explorer, skipSketchChecks bool) (*rpc.GetDebugConfigResponse, error) { +func (s *arduinoCoreServerImpl) getDebugProperties(req *rpc.GetDebugConfigRequest, pme *packagemanager.Explorer, skipSketchChecks bool) (*rpc.GetDebugConfigResponse, error) { var ( sketchName string sketchDefaultFQBN string @@ -111,7 +111,7 @@ func getDebugProperties(req *rpc.GetDebugConfigRequest, pme *packagemanager.Expl } sketchName = sk.Name sketchDefaultFQBN = sk.GetDefaultFQBN() - sketchDefaultBuildPath = sk.DefaultBuildPath() + sketchDefaultBuildPath = s.getDefaultSketchBuildPath(sk, nil) } else { // Use placeholder sketch data sketchName = "Sketch" diff --git a/commands/service_debug_test.go b/commands/service_debug_test.go index 1aa4feb9796..f389d1486dc 100644 --- a/commands/service_debug_test.go +++ b/commands/service_debug_test.go @@ -66,15 +66,16 @@ func TestGetCommandLine(t *testing.T) { pme, release := pm.NewExplorer() defer release() + srv := NewArduinoCoreServer().(*arduinoCoreServerImpl) { // Check programmer not found req.Programmer = "not-existent" - _, err := getCommandLine(req, pme) + _, err := srv.getDebugCommandLine(req, pme) require.Error(t, err) } req.Programmer = "edbg" - command, err := getCommandLine(req, pme) + command, err := srv.getDebugCommandLine(req, pme) require.Nil(t, err) commandToTest := strings.Join(command, " ") require.Equal(t, filepath.FromSlash(goldCommand), filepath.FromSlash(commandToTest)) @@ -97,7 +98,7 @@ func TestGetCommandLine(t *testing.T) { fmt.Sprintf(" --file \"%s/arduino-test/samd/variants/mkr1000/openocd_scripts/arduino_zero.cfg\"", customHardware) + fmt.Sprintf(" -c \"gdb_port pipe\" -c \"telnet_port 0\" %s/build/arduino-test.samd.mkr1000/hello.ino.elf", sketchPath) - command2, err := getCommandLine(req2, pme) + command2, err := srv.getDebugCommandLine(req2, pme) assert.Nil(t, err) commandToTest2 := strings.Join(command2, " ") assert.Equal(t, filepath.FromSlash(goldCommand2), filepath.FromSlash(commandToTest2)) diff --git a/commands/service_upload.go b/commands/service_upload.go index e3c8c176278..3ebc76a9804 100644 --- a/commands/service_upload.go +++ b/commands/service_upload.go @@ -189,7 +189,7 @@ func (s *arduinoCoreServerImpl) Upload(req *rpc.UploadRequest, stream rpc.Arduin }) }) defer errStream.Close() - updatedPort, err := runProgramAction( + updatedPort, err := s.runProgramAction( stream.Context(), pme, sk, @@ -262,7 +262,7 @@ func (s *arduinoCoreServerImpl) UploadUsingProgrammer(req *rpc.UploadUsingProgra }, streamAdapter) } -func runProgramAction(ctx context.Context, pme *packagemanager.Explorer, +func (s *arduinoCoreServerImpl) runProgramAction(ctx context.Context, pme *packagemanager.Explorer, sk *sketch.Sketch, importFile, importDir, fqbnIn string, userPort *rpc.Port, programmerID string, @@ -443,7 +443,7 @@ func runProgramAction(ctx context.Context, pme *packagemanager.Explorer, } if !burnBootloader { - importPath, sketchName, err := determineBuildPathAndSketchName(importFile, importDir, sk) + importPath, sketchName, err := s.determineBuildPathAndSketchName(importFile, importDir, sk) if err != nil { return nil, &cmderrors.NotFoundError{Message: i18n.Tr("Error finding build artifacts"), Cause: err} } @@ -746,7 +746,7 @@ func runTool(recipeID string, props *properties.Map, outStream, errStream io.Wri return nil } -func determineBuildPathAndSketchName(importFile, importDir string, sk *sketch.Sketch) (*paths.Path, string, error) { +func (s *arduinoCoreServerImpl) determineBuildPathAndSketchName(importFile, importDir string, sk *sketch.Sketch) (*paths.Path, string, error) { // In general, compiling a sketch will produce a set of files that are // named as the sketch but have different extensions, for example Sketch.ino // may produce: Sketch.ino.bin; Sketch.ino.hex; Sketch.ino.zip; etc... @@ -799,7 +799,7 @@ func determineBuildPathAndSketchName(importFile, importDir string, sk *sketch.Sk // Case 4: only sketch specified. In this case we use the generated build path // and the given sketch name. - return sk.DefaultBuildPath(), sk.Name + sk.MainFile.Ext(), nil + return s.getDefaultSketchBuildPath(sk, nil), sk.Name + sk.MainFile.Ext(), nil } func detectSketchNameFromBuildPath(buildPath *paths.Path) (string, error) { diff --git a/commands/service_upload_burnbootloader.go b/commands/service_upload_burnbootloader.go index 8f98cd07a05..e03e8b3195c 100644 --- a/commands/service_upload_burnbootloader.go +++ b/commands/service_upload_burnbootloader.go @@ -72,7 +72,7 @@ func (s *arduinoCoreServerImpl) BurnBootloader(req *rpc.BurnBootloaderRequest, s } defer release() - if _, err := runProgramAction( + if _, err := s.runProgramAction( stream.Context(), pme, nil, // sketch diff --git a/commands/service_upload_test.go b/commands/service_upload_test.go index c13b66af29d..737eec92e83 100644 --- a/commands/service_upload_test.go +++ b/commands/service_upload_test.go @@ -71,6 +71,8 @@ func TestDetermineBuildPathAndSketchName(t *testing.T) { fqbn, err := cores.ParseFQBN("arduino:samd:mkr1000") require.NoError(t, err) + srv := NewArduinoCoreServer().(*arduinoCoreServerImpl) + tests := []test{ // 00: error: no data passed in {"", "", nil, nil, "", ""}, @@ -81,7 +83,7 @@ func TestDetermineBuildPathAndSketchName(t *testing.T) { // 03: error: used both importPath and importFile {"testdata/upload/build_path_2/Blink.ino.hex", "testdata/upload/build_path_2", nil, nil, "", ""}, // 04: only sketch without FQBN - {"", "", blonk, nil, blonk.DefaultBuildPath().String(), "Blonk.ino"}, + {"", "", blonk, nil, srv.getDefaultSketchBuildPath(blonk, nil).String(), "Blonk.ino"}, // 05: use importFile to detect build.path and project_name, sketch is ignored. {"testdata/upload/build_path_2/Blink.ino.hex", "", blonk, nil, "testdata/upload/build_path_2", "Blink.ino"}, // 06: use importPath as build.path and Blink as project name, ignore the sketch Blonk @@ -97,7 +99,7 @@ func TestDetermineBuildPathAndSketchName(t *testing.T) { // 11: error: used both importPath and importFile {"testdata/upload/build_path_2/Blink.ino.hex", "testdata/upload/build_path_2", nil, fqbn, "", ""}, // 12: use sketch to determine project name and sketch+fqbn to determine build path - {"", "", blonk, fqbn, blonk.DefaultBuildPath().String(), "Blonk.ino"}, + {"", "", blonk, fqbn, srv.getDefaultSketchBuildPath(blonk, nil).String(), "Blonk.ino"}, // 13: use importFile to detect build.path and project_name, sketch+fqbn is ignored. {"testdata/upload/build_path_2/Blink.ino.hex", "", blonk, fqbn, "testdata/upload/build_path_2", "Blink.ino"}, // 14: use importPath as build.path and Blink as project name, ignore the sketch Blonk, ignore fqbn @@ -111,7 +113,7 @@ func TestDetermineBuildPathAndSketchName(t *testing.T) { } for i, test := range tests { t.Run(fmt.Sprintf("SubTest%02d", i), func(t *testing.T) { - buildPath, sketchName, err := determineBuildPathAndSketchName(test.importFile, test.importDir, test.sketch) + buildPath, sketchName, err := srv.determineBuildPathAndSketchName(test.importFile, test.importDir, test.sketch) if test.resBuildPath == "" { require.Error(t, err) require.Nil(t, buildPath) @@ -183,10 +185,11 @@ func TestUploadPropertiesComposition(t *testing.T) { pme, release := pm.NewExplorer() defer release() + srv := NewArduinoCoreServer().(*arduinoCoreServerImpl) testRunner := func(t *testing.T, test test, verboseVerify bool) { outStream := &bytes.Buffer{} errStream := &bytes.Buffer{} - _, err := runProgramAction( + _, err := srv.runProgramAction( context.Background(), pme, nil, // sketch diff --git a/docs/UPGRADING.md b/docs/UPGRADING.md index 194c0296332..d83701331e6 100644 --- a/docs/UPGRADING.md +++ b/docs/UPGRADING.md @@ -1,6 +1,31 @@ # Upgrading -Here you can find a list of migration guides to handle breaking changes between releases of the CLI. +Here you can find a list of migration guides to handle breaking changes, deprecations, and bugfixes that may cause +problems between releases of the CLI. + +## 1.0.4 + +### The build cache path specified with `compile --build-cache-path` or `build_cache.path` now affects also sketches. + +Previously the specified build cache path only affected cores and it was ignored for sketches. This is now fixed and +both cores and sketches are cached in the given directory. + +### A full build of the sketch is performed if a build path is specified in `compile --build-path ...`. + +Previously if a build path was specified a cached core could have been used from the global build cache path resulting +in a partial build inside the given build path. + +Now if a build path is specified, the global build cache path is ignored and the full build is done in the given build +path. + +#### `compile --build-cache-path` is deprecated. + +The change above, makes the `compile --build-cache-path` flag useless. It is kept just for backward compatibility. + +### The default `build_cache.path` has been moved from the temp folder to the user's cache folder. + +Previously the `build_cache.path` was in `$TMP/arduino`. Now it has been moved to the specific OS user's cache folder, +for example in Linux it happens to be `$HOME/.cache/arduino`. ## 1.0.0 diff --git a/internal/arduino/sketch/sketch.go b/internal/arduino/sketch/sketch.go index 2d0c47f35d4..8be6e790345 100644 --- a/internal/arduino/sketch/sketch.go +++ b/internal/arduino/sketch/sketch.go @@ -279,12 +279,6 @@ func (e *InvalidSketchFolderNameError) Error() string { return i18n.Tr("no valid sketch found in %[1]s: missing %[2]s", e.SketchFolder, e.SketchFile) } -// DefaultBuildPath generates the default build directory for a given sketch. -// The build path is in a temporary directory and is unique for each sketch. -func (s *Sketch) DefaultBuildPath() *paths.Path { - return paths.TempDir().Join("arduino", "sketches", s.Hash()) -} - // Hash generate a unique hash for the given sketch. func (s *Sketch) Hash() string { path := s.FullPath.String() diff --git a/internal/arduino/sketch/sketch_test.go b/internal/arduino/sketch/sketch_test.go index 9f18e45c591..f16ae8bfdcc 100644 --- a/internal/arduino/sketch/sketch_test.go +++ b/internal/arduino/sketch/sketch_test.go @@ -285,12 +285,6 @@ func TestNewSketchFolderSymlink(t *testing.T) { require.True(t, sketch.RootFolderFiles.ContainsEquivalentTo(sketchPathSymlink.Join("s_file.S"))) } -func TestGenBuildPath(t *testing.T) { - want := paths.TempDir().Join("arduino", "sketches", "ACBD18DB4CC2F85CEDEF654FCCC4A4D8") - assert.True(t, (&Sketch{FullPath: paths.New("foo")}).DefaultBuildPath().EquivalentTo(want)) - assert.Equal(t, "ACBD18DB4CC2F85CEDEF654FCCC4A4D8", (&Sketch{FullPath: paths.New("foo")}).Hash()) -} - func TestNewSketchWithSymlink(t *testing.T) { sketchPath, _ := paths.New("testdata", "SketchWithSymlink").Abs() mainFilePath := sketchPath.Join("SketchWithSymlink.ino") diff --git a/internal/cli/arguments/arguments.go b/internal/cli/arguments/arguments.go index 2d5077dbf7a..a096154a864 100644 --- a/internal/cli/arguments/arguments.go +++ b/internal/cli/arguments/arguments.go @@ -25,12 +25,16 @@ import ( // CheckFlagsConflicts is a helper function useful to report errors when more than one conflicting flag is used func CheckFlagsConflicts(command *cobra.Command, flagNames ...string) { + var used []string for _, flagName := range flagNames { - if !command.Flag(flagName).Changed { - return + if command.Flag(flagName).Changed { + used = append(used, flagName) } } - flags := "--" + strings.Join(flagNames, ", --") + if len(used) <= 1 { + return + } + flags := "--" + strings.Join(used, ", --") msg := i18n.Tr("Can't use the following flags together: %s", flags) feedback.Fatal(msg, feedback.ErrBadArgument) } diff --git a/internal/cli/compile/compile.go b/internal/cli/compile/compile.go index 25cea1427bb..b4c093127b1 100644 --- a/internal/cli/compile/compile.go +++ b/internal/cli/compile/compile.go @@ -86,6 +86,9 @@ func NewCommand(srv rpc.ArduinoCoreServiceServer, settings *rpc.Configuration) * " " + os.Args[0] + ` compile -b arduino:avr:uno --build-property build.extra_flags=-DPIN=2 --build-property "compiler.cpp.extra_flags=\"-DSSID=\"hello world\"\"" /home/user/Arduino/MySketch` + "\n", Args: cobra.MaximumNArgs(1), Run: func(cmd *cobra.Command, args []string) { + if cmd.Flag("build-cache-path").Changed { + feedback.Warning(i18n.Tr("The flag --build-cache-path has been deprecated. Please use just --build-path alone or configure the build cache path in the Arduino CLI settings.")) + } runCompileCommand(cmd, args, srv) }, } @@ -95,7 +98,8 @@ func NewCommand(srv rpc.ArduinoCoreServiceServer, settings *rpc.Configuration) * compileCommand.Flags().BoolVar(&dumpProfile, "dump-profile", false, i18n.Tr("Create and print a profile configuration from the build.")) showPropertiesArg.AddToCommand(compileCommand) compileCommand.Flags().BoolVar(&preprocess, "preprocess", false, i18n.Tr("Print preprocessed code to stdout instead of compiling.")) - compileCommand.Flags().StringVar(&buildCachePath, "build-cache-path", "", i18n.Tr("Builds of 'core.a' are saved into this path to be cached and reused.")) + compileCommand.Flags().StringVar(&buildCachePath, "build-cache-path", "", i18n.Tr("Builds of cores and sketches are saved into this path to be cached and reused.")) + compileCommand.Flag("build-cache-path").Hidden = true // deprecated compileCommand.Flags().StringVar(&exportDir, "output-dir", "", i18n.Tr("Save build artifacts in this directory.")) compileCommand.Flags().StringVar(&buildPath, "build-path", "", i18n.Tr("Path where to save compiled files. If omitted, a directory will be created in the default temporary path of your OS.")) diff --git a/internal/cli/configuration/build_cache.go b/internal/cli/configuration/build_cache.go index f7ea225d54c..f2a8014e459 100644 --- a/internal/cli/configuration/build_cache.go +++ b/internal/cli/configuration/build_cache.go @@ -38,12 +38,11 @@ func (s *Settings) GetBuildCacheTTL() time.Duration { } // GetBuildCachePath returns the path to the build cache. -func (s *Settings) GetBuildCachePath() (*paths.Path, bool) { - p, ok, _ := s.GetStringOk("build_cache.path") - if !ok { - return nil, false +func (s *Settings) GetBuildCachePath() *paths.Path { + if p, ok, _ := s.GetStringOk("build_cache.path"); ok { + return paths.New(p) } - return paths.New(p), true + return paths.New(s.Defaults.GetString("build_cache.path")) } // GetBuildCacheExtraPaths returns the extra paths to the build cache. diff --git a/internal/cli/configuration/configuration.go b/internal/cli/configuration/configuration.go index c567955382a..134efdfdaf6 100644 --- a/internal/cli/configuration/configuration.go +++ b/internal/cli/configuration/configuration.go @@ -101,6 +101,18 @@ func getDefaultUserDir() string { } } +// getDefaultBuildCacheDir returns the full path to the default build cache folder +func getDefaultBuildCacheDir() string { + var cacheDir *paths.Path + if p, err := os.UserCacheDir(); err == nil { + cacheDir = paths.New(p) + } else { + // fallback to /tmp + cacheDir = paths.TempDir() + } + return cacheDir.Join("arduino").String() +} + // FindConfigFlagsInArgsOrFallbackOnEnv returns the config file path using the // argument '--config-file' (if specified), if empty looks for the ARDUINO_CONFIG_FILE env, // or looking in the current working dir diff --git a/internal/cli/configuration/defaults.go b/internal/cli/configuration/defaults.go index b2437fb91af..a810265785a 100644 --- a/internal/cli/configuration/defaults.go +++ b/internal/cli/configuration/defaults.go @@ -52,7 +52,7 @@ func SetDefaults(settings *Settings) { setDefaultValueAndKeyTypeSchema("sketch.always_export_binaries", false) setDefaultValueAndKeyTypeSchema("build_cache.ttl", (time.Hour * 24 * 30).String()) setDefaultValueAndKeyTypeSchema("build_cache.compilations_before_purge", uint(10)) - setKeyTypeSchema("build_cache.path", "") + setDefaultValueAndKeyTypeSchema("build_cache.path", getDefaultBuildCacheDir()) setKeyTypeSchema("build_cache.extra_paths", []string{}) // daemon settings diff --git a/internal/cli/debug/debug.go b/internal/cli/debug/debug.go index fa6e91491c4..a9dd9d976a0 100644 --- a/internal/cli/debug/debug.go +++ b/internal/cli/debug/debug.go @@ -54,6 +54,9 @@ func NewCommand(srv rpc.ArduinoCoreServiceServer) *cobra.Command { Long: i18n.Tr("Debug Arduino sketches. (this command opens an interactive gdb session)"), Example: " " + os.Args[0] + " debug -b arduino:samd:mkr1000 -P atmel_ice /home/user/Arduino/MySketch", Args: cobra.MaximumNArgs(1), + PreRun: func(cmd *cobra.Command, args []string) { + arguments.CheckFlagsConflicts(cmd, "input-dir", "build-path") + }, Run: func(cmd *cobra.Command, args []string) { runDebugCommand(cmd.Context(), srv, args, &portArgs, &fqbnArg, interpreter, importDir, &programmer, printInfo, &profileArg, debugProperties) }, @@ -65,6 +68,7 @@ func NewCommand(srv rpc.ArduinoCoreServiceServer) *cobra.Command { programmer.AddToCommand(debugCommand, srv) profileArg.AddToCommand(debugCommand, srv) debugCommand.Flags().StringVar(&interpreter, "interpreter", "console", i18n.Tr("Debug interpreter e.g.: %s", "console, mi, mi1, mi2, mi3")) + debugCommand.Flags().StringVarP(&importDir, "build-path", "", "", i18n.Tr("Directory containing binaries for debug.")) debugCommand.Flags().StringVarP(&importDir, "input-dir", "", "", i18n.Tr("Directory containing binaries for debug.")) debugCommand.Flags().BoolVarP(&printInfo, "info", "I", false, i18n.Tr("Show metadata about the debug session instead of starting the debugger.")) debugCommand.Flags().StringArrayVar(&debugProperties, "debug-property", []string{}, diff --git a/internal/cli/upload/upload.go b/internal/cli/upload/upload.go index 28a961bc593..b33c5d1a4fc 100644 --- a/internal/cli/upload/upload.go +++ b/internal/cli/upload/upload.go @@ -60,7 +60,7 @@ func NewCommand(srv rpc.ArduinoCoreServiceServer) *cobra.Command { " " + os.Args[0] + " upload -p 192.168.10.1 -b arduino:avr:uno --upload-field password=abc", Args: cobra.MaximumNArgs(1), PreRun: func(cmd *cobra.Command, args []string) { - arguments.CheckFlagsConflicts(cmd, "input-file", "input-dir") + arguments.CheckFlagsConflicts(cmd, "input-file", "input-dir", "build-path") }, Run: func(cmd *cobra.Command, args []string) { runUploadCommand(cmd.Context(), srv, args, uploadFields) @@ -70,6 +70,7 @@ func NewCommand(srv rpc.ArduinoCoreServiceServer) *cobra.Command { fqbnArg.AddToCommand(uploadCommand, srv) portArgs.AddToCommand(uploadCommand, srv) profileArg.AddToCommand(uploadCommand, srv) + uploadCommand.Flags().StringVarP(&importDir, "build-path", "", "", i18n.Tr("Directory containing binaries to upload.")) uploadCommand.Flags().StringVarP(&importDir, "input-dir", "", "", i18n.Tr("Directory containing binaries to upload.")) uploadCommand.Flags().StringVarP(&importFile, "input-file", "i", "", i18n.Tr("Binary file to upload.")) uploadCommand.Flags().StringArrayVar(&uploadProperties, "upload-property", []string{}, diff --git a/internal/integrationtest/compile_1/compile_test.go b/internal/integrationtest/compile_1/compile_test.go index 27b31cb82c1..3f09906310d 100644 --- a/internal/integrationtest/compile_1/compile_test.go +++ b/internal/integrationtest/compile_1/compile_test.go @@ -125,15 +125,17 @@ func compileWithSimpleSketch(t *testing.T, env *integrationtest.Environment, cli func compileWithCachePurgeNeeded(t *testing.T, env *integrationtest.Environment, cli *integrationtest.ArduinoCLI) { // create directories that must be purged - baseDir := paths.TempDir().Join("arduino", "sketches") + out, _, err := cli.Run("config", "get", "build_cache.path") + require.NoError(t, err) + cacheDir := paths.New(strings.TrimSpace(string(out))).Join("sketches") // purge case: last used file too old - oldDir1 := baseDir.Join("test_old_sketch_1") + oldDir1 := cacheDir.Join("test_old_sketch_1") require.NoError(t, oldDir1.MkdirAll()) require.NoError(t, oldDir1.Join(".last-used").WriteFile([]byte{})) require.NoError(t, oldDir1.Join(".last-used").Chtimes(time.Now(), time.Unix(0, 0))) // no purge case: last used file not existing - missingFileDir := baseDir.Join("test_sketch_2") + missingFileDir := cacheDir.Join("test_sketch_2") require.NoError(t, missingFileDir.MkdirAll()) defer oldDir1.RemoveAll() @@ -172,12 +174,13 @@ func compileWithSimpleSketchCustomEnv(t *testing.T, env *integrationtest.Environ require.NoError(t, err) require.NotEmpty(t, compileOutput["compiler_out"]) require.Empty(t, compileOutput["compiler_err"]) + builderResult := compileOutput["builder_result"].(map[string]any) + buildDir := paths.New(builderResult["build_path"].(string)) // Verifies expected binaries have been built md5 := md5.Sum(([]byte(sketchPath.String()))) sketchPathMd5 := strings.ToUpper(hex.EncodeToString(md5[:])) require.NotEmpty(t, sketchPathMd5) - buildDir := paths.TempDir().Join("arduino", "sketches", sketchPathMd5) require.FileExists(t, buildDir.Join(sketchName+".ino.eep").String()) require.FileExists(t, buildDir.Join(sketchName+".ino.elf").String()) require.FileExists(t, buildDir.Join(sketchName+".ino.hex").String()) @@ -427,11 +430,16 @@ func compileWithOutputDirFlag(t *testing.T, env *integrationtest.Environment, cl _, _, err = cli.Run("compile", "-b", fqbn, sketchPath.String(), "--output-dir", outputDir.String()) require.NoError(t, err) + // Get default build cache dir + out, _, err := cli.Run("config", "get", "build_cache.path") + require.NoError(t, err) + buildCache := paths.New(strings.TrimSpace(string(out))) + // Verifies expected binaries have been built md5 := md5.Sum(([]byte(sketchPath.String()))) sketchPathMd5 := strings.ToUpper(hex.EncodeToString(md5[:])) require.NotEmpty(t, sketchPathMd5) - buildDir := paths.TempDir().Join("arduino", "sketches", sketchPathMd5) + buildDir := buildCache.Join("sketches", sketchPathMd5) require.FileExists(t, buildDir.Join(sketchName+".ino.eep").String()) require.FileExists(t, buildDir.Join(sketchName+".ino.elf").String()) require.FileExists(t, buildDir.Join(sketchName+".ino.hex").String()) @@ -1008,14 +1016,15 @@ func compileWithInvalidBuildOptionJson(t *testing.T, env *integrationtest.Enviro _, _, err := cli.Run("sketch", "new", sketchPath.String()) require.NoError(t, err) - // Get the build directory - md5 := md5.Sum(([]byte(sketchPath.String()))) - sketchPathMd5 := strings.ToUpper(hex.EncodeToString(md5[:])) - require.NotEmpty(t, sketchPathMd5) - buildDir := paths.TempDir().Join("arduino", "sketches", sketchPathMd5) - - _, _, err = cli.Run("compile", "-b", fqbn, sketchPath.String(), "--verbose") + out, _, err := cli.Run("compile", "-b", fqbn, sketchPath.String(), "--json") require.NoError(t, err) + var builderOutput struct { + BuilderResult struct { + BuildPath string `json:"build_path"` + } `json:"builder_result"` + } + require.NoError(t, json.Unmarshal(out, &builderOutput)) + buildDir := paths.New(builderOutput.BuilderResult.BuildPath) // Breaks the build.options.json file buildOptionsJson := buildDir.Join("build.options.json") diff --git a/internal/integrationtest/compile_4/compile_test.go b/internal/integrationtest/compile_4/compile_test.go index a909cab3ab8..f0916138246 100644 --- a/internal/integrationtest/compile_4/compile_test.go +++ b/internal/integrationtest/compile_4/compile_test.go @@ -929,19 +929,26 @@ func TestBuildCaching(t *testing.T) { // Find cached core and save timestamp pathList, err := buildCachePath.ReadDirRecursiveFiltered(nil, paths.FilterPrefixes("core.a")) require.NoError(t, err) - require.Len(t, pathList, 1) + require.Len(t, pathList, 2) cachedCoreFile := pathList[0] - lastUsedPath := cachedCoreFile.Parent().Join(".last-used") - require.True(t, lastUsedPath.Exist()) + require.True(t, cachedCoreFile.Parent().Join(".last-used").Exist()) coreStatBefore, err := cachedCoreFile.Stat() require.NoError(t, err) + sketchCoreFile := pathList[1] + require.True(t, sketchCoreFile.Parent().Parent().Join(".last-used").Exist()) + sketchStatBefore, err := sketchCoreFile.Stat() + require.NoError(t, err) + // Run build again and check timestamp is unchanged _, _, err = cli.Run("compile", "-b", "arduino:avr:uno", "--build-cache-path", buildCachePath.String(), sketchPath.String()) require.NoError(t, err) coreStatAfterRebuild, err := cachedCoreFile.Stat() require.NoError(t, err) require.Equal(t, coreStatBefore.ModTime(), coreStatAfterRebuild.ModTime()) + sketchStatAfterRebuild, err := sketchCoreFile.Stat() + require.NoError(t, err) + require.Equal(t, sketchStatBefore.ModTime(), sketchStatAfterRebuild.ModTime()) // Touch a file of the core and check if the builder invalidate the cache time.Sleep(time.Second) diff --git a/internal/integrationtest/compile_4/core_caching_test.go b/internal/integrationtest/compile_4/core_caching_test.go index 582a2e29ec7..9fcef13f2e8 100644 --- a/internal/integrationtest/compile_4/core_caching_test.go +++ b/internal/integrationtest/compile_4/core_caching_test.go @@ -16,6 +16,7 @@ package compile_test import ( + "strings" "testing" "github.com/arduino/arduino-cli/internal/integrationtest" @@ -31,8 +32,12 @@ func TestBuildCacheCoreWithExtraDirs(t *testing.T) { _, _, err := cli.Run("core", "install", "arduino:avr@1.8.6") require.NoError(t, err) + // Get default cache path + out, _, err := cli.Run("config", "get", "build_cache.path") + require.NoError(t, err) + defaultCache := paths.New(strings.TrimSpace(string(out))) + // Main core cache - defaultCache := paths.TempDir().Join("arduino") cache1, err := paths.MkTempDir("", "core_cache") require.NoError(t, err) t.Cleanup(func() { cache1.RemoveAll() }) diff --git a/internal/integrationtest/core/core_test.go b/internal/integrationtest/core/core_test.go index 08ed34fadfd..cd28d8286c0 100644 --- a/internal/integrationtest/core/core_test.go +++ b/internal/integrationtest/core/core_test.go @@ -16,8 +16,6 @@ package core_test import ( - "crypto/md5" - "encoding/hex" "encoding/json" "fmt" "os" @@ -277,13 +275,17 @@ func TestCoreInstallEsp32(t *testing.T) { sketchPath := cli.SketchbookDir().Join(sketchName) _, _, err = cli.Run("sketch", "new", sketchPath.String()) require.NoError(t, err) - _, _, err = cli.Run("compile", "-b", "esp32:esp32:esp32", sketchPath.String()) + out, _, err := cli.Run("compile", "-b", "esp32:esp32:esp32", sketchPath.String(), "--json") require.NoError(t, err) + var builderOutput struct { + BuilderResult struct { + BuildPath string `json:"build_path"` + } `json:"builder_result"` + } + require.NoError(t, json.Unmarshal(out, &builderOutput)) + buildDir := paths.New(builderOutput.BuilderResult.BuildPath) + // prevent regressions for https://github.com/arduino/arduino-cli/issues/163 - md5 := md5.Sum(([]byte(sketchPath.String()))) - sketchPathMd5 := strings.ToUpper(hex.EncodeToString(md5[:])) - require.NotEmpty(t, sketchPathMd5) - buildDir := paths.TempDir().Join("arduino", "sketches", sketchPathMd5) require.FileExists(t, buildDir.Join(sketchName+".ino.partitions.bin").String()) } diff --git a/internal/integrationtest/upload_mock/upload_mock_test.go b/internal/integrationtest/upload_mock/upload_mock_test.go index 330358bb1ba..db10fc383df 100644 --- a/internal/integrationtest/upload_mock/upload_mock_test.go +++ b/internal/integrationtest/upload_mock/upload_mock_test.go @@ -655,7 +655,17 @@ func TestUploadSketch(t *testing.T) { sketchPath := cli.SketchbookDir().Join(sketchName) _, _, err := cli.Run("sketch", "new", sketchPath.String()) require.NoError(t, err) - buildDir := generateBuildDir(sketchPath, t) + + out, _, err := cli.Run("config", "get", "build_cache.path") + require.NoError(t, err) + cacheDir := paths.New(strings.TrimSpace(string(out))) + + md5 := md5.Sum(([]byte(sketchPath.String()))) + sketchPathMd5 := strings.ToUpper(hex.EncodeToString(md5[:])) + buildDir := cacheDir.Join("sketches", sketchPathMd5) + require.NoError(t, buildDir.MkdirAll()) + require.NoError(t, buildDir.ToAbs()) + t.Cleanup(func() { buildDir.RemoveAll() }) for i, _test := range testParameters { @@ -718,15 +728,6 @@ func TestUploadSketch(t *testing.T) { } } -func generateBuildDir(sketchPath *paths.Path, t *testing.T) *paths.Path { - md5 := md5.Sum(([]byte(sketchPath.String()))) - sketchPathMd5 := strings.ToUpper(hex.EncodeToString(md5[:])) - buildDir := paths.TempDir().Join("arduino", "sketches", sketchPathMd5) - require.NoError(t, buildDir.MkdirAll()) - require.NoError(t, buildDir.ToAbs()) - return buildDir -} - func TestUploadWithInputDirFlag(t *testing.T) { env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t) defer env.CleanUp() diff --git a/rpc/cc/arduino/cli/commands/v1/compile.pb.go b/rpc/cc/arduino/cli/commands/v1/compile.pb.go index 33fa8d6314c..87aaa41f88f 100644 --- a/rpc/cc/arduino/cli/commands/v1/compile.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/compile.pb.go @@ -53,7 +53,10 @@ type CompileRequest struct { ShowProperties bool `protobuf:"varint,4,opt,name=show_properties,json=showProperties,proto3" json:"show_properties,omitempty"` // Print preprocessed code to stdout instead of compiling. Preprocess bool `protobuf:"varint,5,opt,name=preprocess,proto3" json:"preprocess,omitempty"` - // Builds of 'core.a' are saved into this path to be cached and reused. + // Builds of core and sketches are saved into this path to be cached and + // reused. + // + // Deprecated: Marked as deprecated in cc/arduino/cli/commands/v1/compile.proto. BuildCachePath string `protobuf:"bytes,6,opt,name=build_cache_path,json=buildCachePath,proto3" json:"build_cache_path,omitempty"` // Path to use to store the files used for the compilation. If omitted, // a directory will be created in the operating system's default temporary @@ -183,6 +186,7 @@ func (x *CompileRequest) GetPreprocess() bool { return false } +// Deprecated: Marked as deprecated in cc/arduino/cli/commands/v1/compile.proto. func (x *CompileRequest) GetBuildCachePath() string { if x != nil { return x.BuildCachePath @@ -912,7 +916,7 @@ var file_cc_arduino_cli_commands_v1_compile_proto_rawDesc = []byte{ 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x69, 0x62, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c, 0x09, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x09, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, @@ -925,162 +929,162 @@ var file_cc_arduino_cli_commands_v1_compile_proto_rawDesc = []byte{ 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x68, 0x6f, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x70, 0x72, - 0x65, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x62, 0x75, 0x69, 0x6c, + 0x65, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x2c, 0x0a, 0x10, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x61, - 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x61, 0x74, - 0x68, 0x12, 0x29, 0x0a, 0x10, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, - 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x62, - 0x6f, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, - 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x69, 0x65, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x05, 0x71, 0x75, 0x69, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, - 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x1c, 0x0a, 0x09, - 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x09, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x6f, 0x70, - 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x62, 0x75, 0x67, - 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, - 0x46, 0x6f, 0x72, 0x44, 0x65, 0x62, 0x75, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, - 0x70, 0x6f, 0x72, 0x74, 0x44, 0x69, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x65, 0x61, 0x6e, - 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x12, 0x47, 0x0a, - 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, - 0x79, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, - 0x73, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x67, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x3e, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, - 0x2c, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x69, - 0x65, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x18, 0x0a, - 0x07, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x18, 0x18, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, - 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x6b, 0x65, 0x79, 0x73, 0x5f, - 0x6b, 0x65, 0x79, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x6b, 0x65, 0x79, 0x73, 0x4b, 0x65, 0x79, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x19, 0x0a, 0x08, - 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x73, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x38, 0x0a, 0x18, 0x73, 0x6b, 0x69, 0x70, - 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x73, 0x6b, 0x69, 0x70, - 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x12, 0x42, 0x0a, 0x1e, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x70, - 0x61, 0x6e, 0x64, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x64, 0x6f, 0x4e, 0x6f, - 0x74, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, - 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x70, 0x61, 0x74, 0x68, - 0x73, 0x18, 0x1e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x61, - 0x63, 0x68, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x50, 0x61, 0x74, 0x68, 0x73, 0x1a, 0x41, 0x0a, - 0x13, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x69, 0x6e, 0x61, - 0x72, 0x69, 0x65, 0x73, 0x22, 0xeb, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x5f, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x09, - 0x6f, 0x75, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1f, 0x0a, 0x0a, 0x65, 0x72, 0x72, - 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, - 0x09, 0x65, 0x72, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x46, 0x0a, 0x08, 0x70, 0x72, - 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, - 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x50, 0x72, - 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x43, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, - 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x22, 0x24, 0x0a, 0x22, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x65, - 0x65, 0x64, 0x73, 0x52, 0x65, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa1, 0x04, 0x0a, 0x0d, 0x42, 0x75, 0x69, - 0x6c, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x62, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, 0x4a, 0x0a, 0x0e, 0x75, 0x73, 0x65, - 0x64, 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, - 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x64, 0x4c, 0x69, 0x62, 0x72, - 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x6b, 0x0a, 0x18, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, - 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65, 0x52, 0x16, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x69, - 0x7a, 0x65, 0x12, 0x5d, 0x0a, 0x0e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x63, 0x63, 0x2e, - 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, - 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x52, 0x0d, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x12, 0x5d, 0x0a, 0x0e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x63, 0x63, 0x2e, 0x61, - 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, - 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x52, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x12, 0x29, 0x0a, 0x10, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x62, 0x75, 0x69, 0x6c, - 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x0b, 0x64, - 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2d, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, - 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, - 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x5a, 0x0a, 0x15, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x19, 0x0a, - 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x07, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xa2, 0x02, 0x0a, 0x11, 0x43, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x12, 0x1a, - 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x4e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, - 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, - 0x73, 0x74, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x12, 0x47, 0x0a, 0x05, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, + 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x61, 0x63, + 0x68, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x69, 0x65, 0x74, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x71, 0x75, 0x69, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, + 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x0f, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2c, + 0x0a, 0x12, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x64, + 0x65, 0x62, 0x75, 0x67, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6f, 0x70, 0x74, 0x69, + 0x6d, 0x69, 0x7a, 0x65, 0x46, 0x6f, 0x72, 0x44, 0x65, 0x62, 0x75, 0x67, 0x12, 0x1d, 0x0a, 0x0a, + 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x69, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, + 0x6c, 0x65, 0x61, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x63, 0x6c, 0x65, 0x61, + 0x6e, 0x12, 0x47, 0x0a, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x67, 0x0a, 0x0f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x16, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, - 0x69, 0x63, 0x4e, 0x6f, 0x74, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x74, 0x0a, - 0x18, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, - 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, - 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x22, 0x71, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, - 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x4e, 0x6f, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, - 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x72, 0x64, - 0x75, 0x69, 0x6e, 0x6f, 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x63, 0x2f, - 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x69, + 0x6e, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0e, + 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x69, 0x65, 0x73, 0x88, 0x01, + 0x01, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x18, 0x18, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x07, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x6b, + 0x65, 0x79, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x19, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x6b, 0x65, 0x79, 0x73, 0x4b, 0x65, 0x79, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x12, 0x19, 0x0a, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x1a, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x38, 0x0a, 0x18, + 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x5f, 0x64, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, + 0x73, 0x6b, 0x69, 0x70, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x12, 0x42, 0x0a, 0x1e, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, + 0x5f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, + 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x1e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x62, 0x75, 0x69, + 0x6c, 0x64, 0x43, 0x61, 0x63, 0x68, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x50, 0x61, 0x74, 0x68, + 0x73, 0x1a, 0x41, 0x0a, 0x13, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, + 0x62, 0x69, 0x6e, 0x61, 0x72, 0x69, 0x65, 0x73, 0x22, 0xeb, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0a, + 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x48, 0x00, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1f, 0x0a, + 0x0a, 0x65, 0x72, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x48, 0x00, 0x52, 0x09, 0x65, 0x72, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x46, + 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, + 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, + 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x08, 0x70, 0x72, + 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, + 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x24, 0x0a, 0x22, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x4e, 0x65, 0x65, 0x64, 0x73, 0x52, 0x65, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa1, 0x04, 0x0a, + 0x0d, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, 0x4a, 0x0a, + 0x0e, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, + 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x64, + 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x6b, 0x0a, 0x18, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x63, + 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65, 0x52, 0x16, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x5d, 0x0a, 0x0e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, + 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0d, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x5d, 0x0a, 0x0e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, + 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x29, 0x0a, 0x10, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, + 0x4f, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, + 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, + 0x74, 0x69, 0x63, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, + 0x22, 0x5a, 0x0a, 0x15, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xa2, 0x02, 0x0a, + 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, + 0x69, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, + 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x4e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x63, 0x2e, 0x61, + 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, + 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, + 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x47, 0x0a, 0x05, 0x6e, 0x6f, 0x74, 0x65, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, + 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, + 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x4e, 0x6f, 0x74, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x65, + 0x73, 0x22, 0x74, 0x0a, 0x18, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, + 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, + 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x22, 0x71, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x4e, 0x6f, 0x74, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, + 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, + 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, + 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x72, 0x70, 0x63, + 0x2f, 0x63, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/rpc/cc/arduino/cli/commands/v1/compile.proto b/rpc/cc/arduino/cli/commands/v1/compile.proto index fb21c8f9bae..7bd9bb7c900 100644 --- a/rpc/cc/arduino/cli/commands/v1/compile.proto +++ b/rpc/cc/arduino/cli/commands/v1/compile.proto @@ -36,8 +36,9 @@ message CompileRequest { bool show_properties = 4; // Print preprocessed code to stdout instead of compiling. bool preprocess = 5; - // Builds of 'core.a' are saved into this path to be cached and reused. - string build_cache_path = 6; + // Builds of core and sketches are saved into this path to be cached and + // reused. + string build_cache_path = 6 [ deprecated = true ]; // Path to use to store the files used for the compilation. If omitted, // a directory will be created in the operating system's default temporary // path.