hocon

Roadmap

hocon is built in phases, smallest-useful-thing first. The goal of the early phases is a parser good enough to write and read i18n translation files; later phases close the gap…

hocon is built in phases, smallest-useful-thing first. The goal of the early phases is a parser good enough to write and read i18n translation files; later phases close the gap to the full HOCON specification, with the reference implementation’s conformance corpus as the eventual oracle.

PhaseScopeStatus
1Lexer + parser → untyped Config (comments, quoted/unquoted strings, nested objects, path-expression keys, arrays).✅ Done
2Object merging + withFallback (base locale + overrides).✅ Done
3Substitutions: ${path}, ${?path}, environment fallback, cycle detection.✅ Done
4Value concatenation + durations (10s) and sizes (512K, 10MB).✅ Done
5include directives behind a pluggable, per-platform IO source.Planned
6Typed decoder with case-class derivation (config.as[A]).Planned
7Conformance against the reference test corpus.Planned

Design notes

  • Cross-platform from the first commit. The lexer, parser, and Config API are pure Scala in a shared source set; every test runs identically on the JVM, Scala.js, and Scala Native. IO and environment access — needed for include and substitution fallback — will live behind a small capability seam with per-platform implementations, so the core never touches a filesystem.
  • Untyped core first, typed decoder later. The Config tree and its getters are the foundation; the case-class decoder (config.as[A]) layers on top once the value model is complete, mirroring how the typed and untyped layers separate elsewhere.
  • Spec-correct, not convenient. Where the HOCON spec and a nicer-for-i18n shortcut disagree — most visibly the forbidden characters in unquoted strings — hocon follows the spec and asks you to quote, so the same files will validate against the conformance corpus in Phase 7.

Search

Esc
to navigate to open Esc to close