Re:I accidentally used YAML.parse instead of JSON.parse and ...
by zarzavat on Monday January 24, 2022 @12:17AM
(#30053976)
I see the point and this is certainly a drawback of TOML but for me this is something of a boundary case between configuration and data.
When configuration gets so complicated that the configuration starts to resemble structured data I tend to prefer to switch to a real scripting language and generate JSON instead.
Re:I accidentally used YAML.parse instead of JSON.parse and ...
by CameronNemo on Monday January 24, 2022 @12:37AM
(#30054068)
Expression languages like Nix, Jsonnet, Dhall, and Cue are really nice in these situations.
Re:I accidentally used YAML.parse instead of JSON.parse and ...
by bin_bash on Sunday January 23, 2022 @10:39PM
(#30053456)
for this reason I couldn't see a CI platform ever seriously consider TOML
(someone may point out to me a CI platform that relies on TOML—which I welcome)
Re:I accidentally used YAML.parse instead of JSON.parse and ...
by colejohnson66 on Sunday January 23, 2022 @11:28PM
(#30053750)
Rust is built on TOML. For better or worse.
Re:I accidentally used YAML.parse instead of JSON.parse and ...
by notriddle on Monday January 24, 2022 @12:19AM
(#30053980)
Do you mean Cargo? Because Cargo is not a CI system. You never embed shell commands in a Cargo.toml.
If you need to program complex logic to build a crate, you don’t write TOML. You write a build.rs file in actual Rust.
Re:I accidentally used YAML.parse instead of JSON.parse and ...
by Too on Monday January 24, 2022 @12:49AM
(#30054120)
If embedding shell commands in a configuration language is considered a CI system I think we are doomed.
Re:I accidentally used YAML.parse instead of JSON.parse and ...
by Dylan16807 on Monday January 24, 2022 @12:51AM
(#30054131)
> JSON with trailing commas
JSON5?
https://github.com/toml-lang/toml/issues/516
The official way to do list of tables is (look at how much duplication there is)
vs I would still reach for TOML first if I only needed simple key-value configuration (never YAML), but for anything requiring list-of-tables I would seriously consider JSON with trailing commas instead.