Skip to content

Commit b75d4a6

Browse files
committed
Restore v8 archive flashing compatibility.
A field in the archive switched from a T to an Option<T> in the v9 format change. Unfortunately, this means old v8 archives are missing a Some() that RON expects. My intention was to gloss over this issue by enabling RON's IMPLICIT_SOME option... but I failed to. It turns out that the flash loading stuff is not covered by Humility's test suites, which is good to know. This change enables IMPLICIT_SOME and works with both v8 and v9.
1 parent 3ce8d82 commit b75d4a6

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ name = "humility"
1717
#
1818
# Be sure to check in and push all of the files that change. Happy versioning!
1919
#
20-
version = "0.11.12"
20+
version = "0.11.13"
2121
authors = ["Bryan Cantrill <[email protected]>"]
2222
edition = "2018"
2323
license = "MPL-2.0"

humility-core/src/hubris.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,9 @@ impl HubrisArchive {
15591559
)
15601560
})?;
15611561

1562-
let config: HubrisFlashMeta = ron::de::from_reader(flash_ron)?;
1562+
let config: HubrisFlashMeta = ron::options::Options::default()
1563+
.with_default_extension(ron::extensions::Extensions::IMPLICIT_SOME)
1564+
.from_reader(flash_ron)?;
15631565

15641566
// This is incredibly ugly! It also gives us backwards compatibility!
15651567
let chip: Option<String> = match config.chip {

tests/cmd/chip.trycmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ For more information try --help
1313

1414
```
1515
$ humility --chip this-can-be-anything -V
16-
humility 0.11.12
16+
humility 0.11.13
1717

1818
```
1919

@@ -28,7 +28,7 @@ For more information try --help
2828

2929
```
3030
$ humility -c apx432 -V
31-
humility 0.11.12
31+
humility 0.11.13
3232

3333
```
3434

tests/cmd/version.trycmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ Long version flag:
22

33
```
44
$ humility --version
5-
humility 0.11.12
5+
humility 0.11.13
66

77
```
88

99
Short version flag:
1010

1111
```
1212
$ humility -V
13-
humility 0.11.12
13+
humility 0.11.13
1414

1515
```

0 commit comments

Comments
 (0)