Skip to content
New issue

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

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

Already on GitHub? # to your account

toml: enforce final (oxford) comma in multiline arrays, remove from singleline arrays #625

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

pjjw
Copy link
Contributor

@pjjw pjjw commented Sep 9, 2023

this is more a preference, but it comes from a learned (python)
annoyance- if you want to keep a set of things in sorted order, then
every time the last item changes you have to go in and pick around the
commas. in python it's a lot worse due to implicit string coercion,
this is thankfully just illegal in toml, but still feels a good move for
consistency and ease of sorting.

@pjjw pjjw marked this pull request as ready for review September 9, 2023 09:27
@pjjw pjjw marked this pull request as draft September 9, 2023 09:51
@pjjw pjjw force-pushed the pjjw/toml-array-final-commas branch from 6f000f4 to edbafa6 Compare September 9, 2023 15:24
@pjjw pjjw marked this pull request as ready for review September 10, 2023 18:42
@nbacquey
Copy link
Member

I have the impression this PR is somewhat mixed up with #624, could you un-entangle those two?

…ingleline arrays

this is more a preference, but it comes from a learned (python)
annoyance- if you want to keep a set of things in sorted order, then
every time the last item changes you have to go in and pick around the
commas. in python it's a lot worse due to implicit string coercion,
this is thankfully just illegal in toml, but still feels a good move for
consistency and ease of sorting.
@pjjw pjjw force-pushed the pjjw/toml-array-final-commas branch from edbafa6 to 96fb78f Compare September 14, 2023 15:04
@pjjw
Copy link
Contributor Author

pjjw commented Sep 14, 2023

I have the impression this PR is somewhat mixed up with #624, could you un-entangle those two?

@nbacquey it was, mostly because preserving the comment newline behavior while also adding trailing commas is an additional third thing that takes different queries. now that #624 is landed, i've rebased off main, so this should be a proper isolated diff now.

@nbacquey nbacquey merged commit 7e6cb4f into tweag:main Sep 14, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants