Repository navigation
v0.3.0
The rest of the spec, durations and sizes, and three new commands.
Added
hocon.Duration,hocon.Periodandhocon.Size, read from30s,3 months,512MiBin any unit the spec lists.- Objects with numeric keys (
{ "0": a, "1": b }) read as lists, into a slice or an array. hocon getprints one value,hocon checkreads files, with--schemainto your own struct, andhocon diffcompares two files as they resolve.
Changed
- Nesting deeper than 500, or a chain of 500 substitutions, is
error.TooDeepinstead of a stack overflow. - An included
.propertiesfile has to be UTF-8.
Fixed
442 of the 445 tests in the conformance suite pass, up from 437.
- The file
--env=keepwrites reads back to the same result when a substitution comes from an include inside a block, and a+=still waiting on the environment is written as+=. - A lone surrogate in a quoted string (
"\ud83d") is kept and written back as it was read. - A
+in a run that is no number is an error. - An optional substitution that closes a cycle finds nothing.
- A key written many times merges in linear time.
How much of the code in src/ is written by hand, the rest with AI, counted with git blame over the lines that are not empty, by who wrote the commit each line comes from; moved code stays its author's. The tests are left out: most of them are written with AI.
| share | |
|---|---|
| Tokenizer | 73 % |
| AST | 51 % |
| Value | 15 % |
| Config | 20 % |
| API and CLI | 3 % |
all of src/ |
24 % of 6880 lines |
| conformance to the spec | 99 % (442 of 445 tests) |