Skip to content

Commit b4d9171

Browse files
committed
Deprecated --build-cache-path option in compile
1 parent 9b61ad8 commit b4d9171

File tree

3 files changed

+163
-156
lines changed

3 files changed

+163
-156
lines changed

internal/cli/compile/compile.go

+4
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ func NewCommand(srv rpc.ArduinoCoreServiceServer, settings *rpc.Configuration) *
8686
" " + 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",
8787
Args: cobra.MaximumNArgs(1),
8888
Run: func(cmd *cobra.Command, args []string) {
89+
if cmd.Flag("build-cache-path").Changed {
90+
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."))
91+
}
8992
runCompileCommand(cmd, args, srv)
9093
},
9194
}
@@ -96,6 +99,7 @@ func NewCommand(srv rpc.ArduinoCoreServiceServer, settings *rpc.Configuration) *
9699
showPropertiesArg.AddToCommand(compileCommand)
97100
compileCommand.Flags().BoolVar(&preprocess, "preprocess", false, i18n.Tr("Print preprocessed code to stdout instead of compiling."))
98101
compileCommand.Flags().StringVar(&buildCachePath, "build-cache-path", "", i18n.Tr("Builds of cores and sketches are saved into this path to be cached and reused."))
102+
compileCommand.Flag("build-cache-path").Hidden = true // deprecated
99103
compileCommand.Flags().StringVar(&exportDir, "output-dir", "", i18n.Tr("Save build artifacts in this directory."))
100104
compileCommand.Flags().StringVar(&buildPath, "build-path", "",
101105
i18n.Tr("Path where to save compiled files. If omitted, a directory will be created in the default temporary path of your OS."))

0 commit comments

Comments
 (0)