Skip to content

Commit cc44f9b

Browse files
committed
Builtin discoveries are used by default, unless specified
1 parent 5149d92 commit cc44f9b

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

RFCs/0002-pluggable-discovery.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,6 @@ https://github.com/arduino/serial-discovery#example-of-usage
239239

240240
Discovery tools should be built natively for each OS and the CLI should run the correct tool for the running OS. This infrastracture is already available for platform tools so the most natural way forward is to distribute the discoveries as tools within core platforms (in the same way we do for `gcc` or `avrdude`).
241241

242-
Some discovery like the `serial-discovery` must be always available, so they will be part of the `builtin` platform package and installed without the need to be part of a real platform (`builtin` is a dummy package that we use to install tools that are not part of any platforms like `ctags` for example).
243-
244-
The CLI will run `serial-discovery`, and other “builtin“ discoveries that we may want, by default.
245-
246242
3rd party platforms may add other discoveries by providing them as tools dependencies for their platform and by adding a directive to their `platform.txt` that informs the CLI that a new discovery is available.
247243

248244
```
@@ -284,6 +280,19 @@ For example if a platform needs the `network` discovery from the Arduino AVR pla
284280
discovery.required=arduino:avr:network
285281
```
286282

283+
#### built-in discoveries and backward compatibliity consideration
284+
285+
Some discoveries like the Arduino `serial-discovery` or the Arduino `network-discovery` must be always available, so they will be part of the `builtin` platform package and installed without the need to be part of a real platform (`builtin:builtin` is a dummy package that we use to install tools that are not part of any platforms like `ctags` for example).
286+
287+
If a platform requires the builtin discoveries it must declare the usage with:
288+
289+
```
290+
discovery.required.0=builtin:builtin:serial_discovery
291+
discovery.required.1=builtin:builtin:network_discovery
292+
```
293+
294+
For backward compatiblity, if a platform does not declare any discovery (using the `discovery.*` properties in `platform.txt`) it will automatically use all the builtin discoveries. This will allow all legacy platforms to softly migrate to pluggable discovery.
295+
287296
#### Duplicate discoveries
288297

289298
It may happen that different 3rd party platforms provides the same discovery or different versions of the same discovery or, worse, different version of the same discovery launched with different parameters.

0 commit comments

Comments
 (0)