Skip to content

Commit a540762

Browse files
committed
Updated documentation
1 parent 1908634 commit a540762

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

Diff for: docs/UPGRADING.md

+46
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,52 @@ Here you can find a list of migration guides to handle breaking changes between
44

55
## 0.28.0
66

7+
### Breaking changes in libraries name handling
8+
9+
In the structure `github.com/arduino/arduino-cli/arduino/libraries.Library` the field:
10+
* `RealName` has been renamed to `Name`
11+
* `Name` has been renamed to `CanonicalName`
12+
13+
Now `Name` is the name of the library as it appears in the `library.properties` file and `CanonicalName` it's the name of the directory containing the library. The `CanonicalName` is usually the name of the library with non-alphanumeric characters converted to underscore, but it could be actually anything since the directory where the library is installed can be freely renamed.
14+
15+
This change improves the overall code base naming coherence since all the structures involving libraries have the `Name` field that refers to the library name as it appears in the `library.properties` file.
16+
17+
### `github.com/arduino/arduino-cli/arduino/libraries/librariesmanager.LibrariesManager.Install` removed parameter `installLocation`
18+
19+
The method:
20+
21+
```go
22+
func (lm *LibrariesManager) Install(indexLibrary *librariesindex.Release, libPath *paths.Path, installLocation libraries.LibraryLocation) error { ... }
23+
```
24+
25+
no more needs the `installLocation` parameter:
26+
27+
```go
28+
func (lm *LibrariesManager) Install(indexLibrary *librariesindex.Release, libPath *paths.Path) error { ... }
29+
```
30+
31+
The install location is determined from the libPath.
32+
33+
### `github.com/arduino/arduino-cli/arduino/libraries/librariesmanager.LibrariesManager.FindByReference` now returns a list of libraries.
34+
35+
The method:
36+
37+
```go
38+
func (lm *LibrariesManager) FindByReference(libRef *librariesindex.Reference, installLocation libraries.LibraryLocation) *libraries.Library { ... }
39+
```
40+
41+
has been changed to:
42+
43+
```go
44+
func (lm *LibrariesManager) FindByReference(libRef *librariesindex.Reference, installLocation libraries.LibraryLocation) libraries.List { ... }
45+
```
46+
47+
the method now returns all the libraries matching the criteria and not just the first one.
48+
49+
### `github.com/arduino/arduino-cli/arduino/libraries/librariesmanager.LibraryAlternatives` removed
50+
51+
The structure `librariesmanager.LibraryAlternatives` has been removed. The `libraries.List` object can be used as a replacement.
52+
753
### Breaking changes in UpdateIndex API (both gRPC and go-lang)
854

955
The gRPC message `cc.arduino.cli.commands.v1.UpdateIndexResponse` has been changed from:

0 commit comments

Comments
 (0)