This repository was archived by the owner on Apr 6, 2026. It is now read-only.
Commit 5e48ab9
authored
Provide better errors when deserializing
Before this change when there was an error in `build.toml`, one would
get a generic error:
```
Error: Cannot parse TOML in /Users/daniel/git/relu-metal/build.toml
Caused by:
data did not match any variant of untagged enum BuildCompat
```
However, what we want is to give the error when trying to parse as the
V2 format, since the V1 format is only there for backwards
compat/updates. With this change the error of parsing as V2 is bubbled
up. For instance:
```
Error: Cannot parse TOML in /Users/daniel/git/relu-metal/build.toml
Caused by:
Unknown variant metal. Expected one of cuda, rocm
```build.toml (#145)1 parent bb1edfe commit 5e48ab9
3 files changed
Lines changed: 56 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | | - | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
16 | 34 | | |
17 | 35 | | |
18 | 36 | | |
| |||
0 commit comments