Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from ini to yaml #1425

Open
lra opened this issue Aug 12, 2019 · 8 comments
Open

Migrate from ini to yaml #1425

lra opened this issue Aug 12, 2019 · 8 comments
Labels

Comments

@lra
Copy link
Owner

lra commented Aug 12, 2019

  1. Migrate
  2. Validate with https://github.com/23andMe/Yamale
@lra lra added the TODO label Aug 12, 2019
@pvinis
Copy link
Contributor

pvinis commented Aug 26, 2019

If I can offer my opinion here, yaml can burn in hell.

@lra
Copy link
Owner Author

lra commented Aug 26, 2019

Any constructive alternative? I have to hack the INI format to support lists, which yaml does out of the box.

@pvinis
Copy link
Contributor

pvinis commented Aug 27, 2019

Oh I didn't know you faced limitations with ini. json5 is nice, and I guess yaml would also work. It just always feels easy to break or write in a wrong way because of the significant whitespace.

@kdabir
Copy link

kdabir commented Sep 25, 2019

how about toml ? I don't personally like it a lot however it it supports what you need and very much like ini

reference: https://github.com/toml-lang/toml

@dreed47
Copy link

dreed47 commented Oct 16, 2019

+1 yaml, its simple and easy to read

@Kemystra
Copy link

Kemystra commented Aug 2, 2022

Hello, is this TODO still active? I would like to try working on this.

Also, +1 for toml. Almost the same syntax, with additional features

@lra
Copy link
Owner Author

lra commented Aug 2, 2022

Yes, it's still active, but before starting any implementation, we should agree on a format, to leverage some toml features without making it too complex.

@joshmedeski
Copy link
Contributor

This is a big breaking change, I agree that it would be best to agree on a format that keeps things simple. Here are some of my thoughts.

  1. ini has felt very strait-forward but feels limited, I agree that a better language that offers schema validation would improve the project overall.
[application]
name = Tmux

[configuration_files]
.tmux.conf

[xdg_configuration_files]
tmux/tmux.conf
  1. toml and ini are very similar in syntax. We could use a toml array for the files. I've found that there is built-in support for schema validation as well. Plus, we could write a script that converts ini files to toml automatically so we don't have to manually update all the application files.
[application]
name = "Tmux"

[configuration_files]
files = [".tmux.conf"]

[xdg_configuration_files]
files = ["tmux/tmux.conf"]
  1. yaml is very common in my development world. There are also powerful packages like you mentioned but I hear you @pvinis that you do not like yaml as a language. But to explore it as an option, here's what it could look like.
name: Tmux
configuration_files:
  - .tmux.conf
xdg_configuration_files:
  - tmux/tmux.conf

What are your thoughts? Is there anything I haven't considered?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants