Open mbigras opened 1 year ago
We're encountering this too, in: https://github.com/heroku/builder/actions/runs/6303904793/job/17114118993?pr=392#step:5:9
When running yq '.stack.run-image' builder-22/builder.toml
against this toml file:
https://github.com/heroku/builder/blob/b83a3606a68b882484ee3353a58c2813d321a9f4/builder-22/builder.toml
Also seeing the issue with sub-tables, for example:
curl -s https://raw.githubusercontent.com/veertuinc/gitlab-runner/master/config.toml.example | yq -p toml -o yaml .
still relevant.
Thank you for supporting TOML!
Another potentially useful test case:
julia_version = "1.10.5"
manifest_format = "2.0"
project_hash = "6a7f2fbcfb1740b9273397ba607e5438aaea4fa8"
[[deps.AbstractFFTs]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef"
uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c"
version = "1.5.0"
weakdeps = ["ChainRulesCore", "Test"]
[deps.AbstractFFTs.extensions]
AbstractFFTsChainRulesCoreExt = "ChainRulesCore"
AbstractFFTsTestExt = "Test"
(this is from a Julia language Manifest.toml file which I was hoping to use yq
to pull some metadata from)
Huh, it's interesting that tomljson
works w/ this syntax but yq doesn't, they're both using the same library under the hood (https://github.com/mikefarah/yq/blob/master/pkg/yqlib/decoder_toml.go#L13)
Describe the bug
Hi! Thank you for making and maintaining yq; I happily use your tool daily and especially thanks for starting work on TOML support—see https://github.com/mikefarah/yq/issues/1364!
Issue: Yq breaks when parsing TOML nested array of tables with arrays (LOL)—see https://toml.io/en/v1.0.0#array-of-tables. Workaround: You can parse TOML with https://github.com/pelletier/go-toml, then pipe JSON to yq.
Version of yq: v4.35.1,...,v4.42.1 Operating system: Mac and Linux Installed via: Homebrew and Docker
Input TOML data1.toml:
Command The command you ran:
Actual behavior
Expected behavior
Additional context I suspect this is a problem with yq because the tomljson can handle data1.toml like the following shell session illustrates:
Again, thank you for yq and for considering this sort of obtuse issue.