Skip to content

Commit 34f3b43

Browse files
authored
[skip changelog] Improve documentation re: referencing tools in a package index (#814)
* Document how the `packager` value of a tool reference is defined Referencing tools from another package is any important concept for platform authors to understand. Previously, you had to guess as to what the "packager" value of a tool reference is, which was not obvious due to it being defined outside the tool's definition, and thus not mentioned at all in the "Tools definitions" section of the specification, which is the obvious place to look for this information. The situation is made more complicated by the fact that what is called "packager" in a tool reference is referred to as "vendor" everywhere else in the documentation. * Make it clear that tool references in package index result in installation The platforms containing referenced cores, variants, and even tools in the case of manual platform installation, must have been installed. This could lead a platform author to think the same applies to the tools referenced from other packages by the platform's toolsDependencies field in package_index.json and that this results in their platform having a dependency on the other package's platform which uses the tool.
1 parent b2378e7 commit 34f3b43

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/package_index_json-specification.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ Tools are mapped as JSON in this way:
125125
```
126126

127127
The field `name` and `version` are respectively the name and version of the tool. Each tool is uniquely identified by
128-
the triple (`vendor`, `name`, `version`) and there can be many different versions of the same tool available at the same
129-
time, for example:
128+
the triple (`packager`, `name`, `version`). `packager` (AKA "vendor") is defined by the `name` value of the tool's
129+
package. There can be many different versions of the same tool available at the same time, for example:
130130

131131
- (`arduino`, `avr-gcc`, `4.8.1-arduino2`)
132132
- (`arduino`, `avr-gcc`, `4.8.1-arduino3`)
@@ -215,8 +215,9 @@ Each PLATFORM describes a core for a specific architecture. The fields needed ar
215215
TOOLS
216216
- `boards`: the list of boards supported (note: just the names to display on the Arduino IDE and Arduino Pro IDE's
217217
Boards Manager GUI! the real boards definitions are inside `boards.txt` inside the core archive file)
218-
- `toolsDependencies`: the tools needed by this core. Each tool is referenced by the triple (`packager`, `name`,
219-
`version`) as previously said. Note that you can reference tools available in other packages as well.
218+
- `toolsDependencies`: the tools needed by this core. They will be installed by Boards Manager along with the platform.
219+
Each tool is referenced by the triple (`packager`, `name`, `version`) as previously said. Note that you can reference
220+
tools available in other packages as well, even if no platform of that package is installed.
220221

221222
The `version` field is validated by both Arduino IDE and [JSemVer](https://github.com/zafarkhaja/jsemver). Here are the
222223
rules Arduino IDE follows for parsing versions

0 commit comments

Comments
 (0)