Skip to content

Rework board attach command #1925

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

Closed
umbynos opened this issue Oct 17, 2022 · 4 comments · Fixed by #1930
Closed

Rework board attach command #1925

umbynos opened this issue Oct 17, 2022 · 4 comments · Fixed by #1930
Assignees
Labels
conclusion: resolved Issue was resolved criticality: medium Of moderate impact topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@umbynos
Copy link
Contributor

umbynos commented Oct 17, 2022

The board attach command has a broken implementation:

Inconsistent port argument format

Currently, the command will only accept a port when passed in as a full path (e.g.: serial:///dev/cu.usbmodem14301). This is inconsistent with all the other commands that accept a port argument, which allow the more user friendly address (e.g.: /dev/cu.usbmodem14301) to be used.

The command must accept the same address format as the other commands.

In order to allow a protocol of the port to be specified in addition to the address in cases where this is necessary, the command should also support a --protocol flag just as in the other commands that accept a port argument. This information will be stored in the cpu.protocol field of sketch.json.

Support for the previous port format should be retained.

Outdated board identification feature

Currently, when a port is passed to the command, it attempts to automatically identify the board on that port and save its FQBN and name in the cpu.fqbn and cpu.name fields of sketch.json.

$ arduino-cli board attach serial:///dev/cu.usbmodem614601
Board found: Arduino MKR1000...
Selected fqbn: arduino:samd:mkr1000

$ cat sketch.json
{
  "cpu": {
  "fqbn": "arduino:samd:mkr1000",
  "name": "Arduino MKR1000",
  "port": "serial:///dev/cu.usbmodem614601"
  }
}

This feature uses the obsolete github.com/arduino/board-discovery module.

Although the feature could be modernized, its value is questionable. The available resources would be better allocated to more important work than to updating and maintaining the feature. For this reason, the auto-detection of board data from port feature should simply be removed.

@umbynos umbynos added criticality: medium Of moderate impact topic: code Related to content of the project itself type: enhancement Proposed improvement labels Oct 17, 2022
@umbynos umbynos added this to the Arduino CLI 1.0 milestone Oct 17, 2022
@per1234
Copy link
Contributor

per1234 commented Oct 17, 2022

The deficiency of being unable to specify both port and FQBN via the command is tracked at #1073

@ubidefeo
Copy link

@per1234
this issue was only tracked internally.
Yesterday, during grooming/planning, we made it public in order to add it to the 1.0 milestone.
This is why this one popped up seemingly out of the blue.
Your mention of #1073 publicly links the two 🙏🏼

@silvanocerza
Copy link
Contributor

Am doing this.

@umbynos
Copy link
Contributor Author

umbynos commented Oct 19, 2022

🤘

@per1234 per1234 changed the title Remove board attach command and related gRPC interface function Rework board attach command Oct 26, 2022
@per1234 per1234 added the conclusion: resolved Issue was resolved label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved criticality: medium Of moderate impact topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants