Skip to content

[breaking] Remove legacy vid-pid build properties selector #2121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion commands/compile/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ func Compile(ctx context.Context, req *rpc.CompileRequest, outStream, errStream

builderCtx.Jobs = int(req.GetJobs())

builderCtx.USBVidPid = req.GetVidPid()
builderCtx.WarningsLevel = req.GetWarnings()

builderCtx.CustomBuildProperties = append(req.GetBuildProperties(), "build.warn_data_percentage=75")
Expand Down
5 changes: 5 additions & 0 deletions docs/UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ $ arduino-cli outdated --format json
}
```

### Command `compile` does not support `--vid-pid` flag anymore

It was a legacy and undocumented feature that is now useless. The corresponding field in gRPC `CompileRequest.vid_pid`
has been removed as well.

### golang API: method `github.com/arduino/arduino-cli/arduino/libraries/Library.LocationPriorityFor` removed

That method was outdated and must not be used.
Expand Down
3 changes: 0 additions & 3 deletions internal/cli/compile/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ var (
warnings string // Used to tell gcc which warning level to use.
verbose bool // Turns on verbose mode.
quiet bool // Suppresses almost every output.
vidPid string // VID/PID specific build properties.
uploadAfterCompile bool // Upload the binary after the compilation.
portArgs arguments.Port // Upload port, e.g.: COM10 or /dev/ttyACM0.
verify bool // Upload, verify uploaded binary after the upload.
Expand Down Expand Up @@ -145,7 +144,6 @@ func NewCommand() *cobra.Command {
compileCommand.Flags().BoolVarP(&uploadAfterCompile, "upload", "u", false, tr("Upload the binary after the compilation."))
portArgs.AddToCommand(compileCommand)
compileCommand.Flags().BoolVarP(&verify, "verify", "t", false, tr("Verify uploaded binary after the upload."))
compileCommand.Flags().StringVar(&vidPid, "vid-pid", "", tr("When specified, VID/PID specific build properties are used, if board supports them."))
compileCommand.Flags().StringSliceVar(&library, "library", []string{},
tr("Path to a single library’s root folder. Can be used multiple times or entries can be comma separated."))
compileCommand.Flags().StringSliceVar(&libraries, "libraries", []string{},
Expand Down Expand Up @@ -240,7 +238,6 @@ func runCompileCommand(cmd *cobra.Command, args []string) {
Warnings: warnings,
Verbose: verbose,
Quiet: quiet,
VidPid: vidPid,
ExportDir: exportDir,
Libraries: libraries,
OptimizeForDebug: optimizeForDebug,
Expand Down
2 changes: 0 additions & 2 deletions legacy/builder/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ const BUILD_PROPERTIES_FQBN = "build.fqbn"
const BUILD_PROPERTIES_INCLUDES = "includes"
const BUILD_PROPERTIES_OBJECT_FILE = "object_file"
const BUILD_PROPERTIES_PATTERN = "pattern"
const BUILD_PROPERTIES_PID = "pid"
const BUILD_PROPERTIES_PREPROCESSED_FILE_PATH = "preprocessed_file_path"
const BUILD_PROPERTIES_RUNTIME_PLATFORM_PATH = "runtime.platform.path"
const BUILD_PROPERTIES_SOURCE_FILE = "source_file"
const BUILD_PROPERTIES_TOOLS_KEY = "tools"
const BUILD_PROPERTIES_VID = "vid"
const CTAGS = "ctags"
const EMPTY_STRING = ""
const FILE_CTAGS_TARGET_FOR_GCC_MINUS_E = "ctags_target_for_gcc_minus_e.cpp"
Expand Down
1 change: 0 additions & 1 deletion legacy/builder/container_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ func (s *ContainerSetupHardwareToolsLibsSketchAndProps) Run(ctx *types.Context)

commands = []types.Command{
&SetupBuildProperties{},
&LoadVIDPIDSpecificProperties{},
&SetCustomBuildProperties{},
&AddMissingBuildPropertiesFromParentPlatformTxtFiles{},
}
Expand Down
66 changes: 0 additions & 66 deletions legacy/builder/load_vid_pid_specific_properties.go

This file was deleted.

87 changes: 0 additions & 87 deletions legacy/builder/test/load_vid_pid_specific_properties_test.go

This file was deleted.

1 change: 0 additions & 1 deletion legacy/builder/types/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ type Context struct {
TargetPackage *cores.Package
TargetPlatform *cores.PlatformRelease
ActualPlatform *cores.PlatformRelease
USBVidPid string

PlatformKeyRewrites PlatforKeysRewrite
HardwareRewriteResults map[*cores.PlatformRelease][]PlatforKeyRewrite
Expand Down
1 change: 0 additions & 1 deletion rpc/cc/arduino/cli/commands/v1/commands.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion rpc/cc/arduino/cli/commands/v1/common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading