fix(gotemplate-helm): toToml emits Go BurntSushi-style tables (#490 bucket 3)#497
Merged
Conversation
…ucket 3) toToml went through Jackson's TomlMapper, which serialises nested maps as dotted keys (mast.sail = "white") whereas Helm's Go BurntSushi encoder emits [table] headers. New TomlWriter reproduces BurntSushi's output, verified against the helm binary: - keys sorted alphabetically, scalar/inline-array fields before sub-tables - table key/values indented depth*2, [header] indented (depth-1)*2 - a blank line before every top-level table and every array-of-tables element (never before the first output line) - basic (double-quoted) strings, floats always carry a decimal point Replaces the Jackson serialisation + the tomlToGoStyle single->double-quote post-process (now dead) for both toToml and mustToToml; fromToml still parses via TomlMapper. Adds nested-table + array-of-tables unit tests with the exact helm output. Unpins the toToml conformance case. HelmConformanceTest backlog 2 -> 1 (only the fromToml "one" syntax-error string remains, an inherent Jackson-vs- BurntSushi wording difference). Verified: jhelm-gotemplate-helm verify green (131 tests, format/PMD/Checkstyle); 346/346 chart byte-parity unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5yvjG89AqMHPAGJawSmg9
Contributor
|
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes bucket 3 of #490.
HelmConformanceTestbacklog now 37 → 1.toTomlserialised via Jackson'sTomlMapper, which writes nested maps as dotted keys (mast.sail = "white"), whereas Helm's Go BurntSushi encoder emits[table]headers. NewTomlWriterreproduces BurntSushi's output, reverse-engineered from thehelmbinary:depth*2,[header]indented(depth-1)*2Replaces the Jackson serialisation and the now-dead
tomlToGoStylesingle→double-quote post-process for bothtoTomlandmustToToml;fromTomlstill parses viaTomlMapper. Adds nested-table + array-of-tables unit tests asserting the exact helm output.Remaining (1 divergence)
Only
fromToml "one"stays pinned — a true TOML syntax error whose exact BurntSushi wording (toml: line 1: unexpected EOF; expected key separator '=') a Jackson parser can't reproduce without overfitting.Verification
jhelm-gotemplate-helmverify green — 131 tests, spring-javaformat / PMD / CheckstyletoToml)🤖 Generated with Claude Code