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

management/full-config: no toml highlighting #228

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

awelzel
Copy link
Contributor

@awelzel awelzel commented Nov 20, 2023

With Pygments 2.17, the TOML parser was rewritten[1, 2]. It now fails to parse and highlight the full-config.ini file. The key-only agent-testbox within [instances] makes the standard toml parsing barf, too. Flip to ini.

[1] https://pygments.org/docs/changelog/#version-2-17-0
[2] pygments/pygments#2576

With Pygments 2.17, the TOML parser was rewritten[1, 2]. It now fails
to parse and highlight the `full-config.ini` file. The key-only `agent-testbox`
within `[instances]` makes the standard toml parsing barf, too. Flip to ini.

[1] https://pygments.org/docs/changelog/#version-2-17-0
[2] pygments/pygments#2576
@awelzel awelzel force-pushed the topic/awelzel/no-toml-highlighting branch from cf746c9 to 7ff64f3 Compare November 20, 2023 09:22
@bbannier
Copy link
Member

bbannier commented Nov 20, 2023

Just wondering whether I am reading the Wikipedia article on the INI format correctly, INI does not usually have value-less entries, right? I am asking since if that's correct, maybe we should fix our format to e.g., make it easier to use libraries to generate such files (coming my experience of trying to read the non-standard multi-line strings in zkg.meta files).

Regardless, the file definitely isn't TOML (e.g., strings are not quoted).

@bbannier
Copy link
Member

Left a :shipit:, but per my above comment, I think it would be great to use an INI format with less extensions (i.e., here: always require values). Could you put an issue for that onto our pile @awelzel?

@awelzel awelzel merged commit 34c9cef into master Nov 20, 2023
10 checks passed
@awelzel awelzel deleted the topic/awelzel/no-toml-highlighting branch November 20, 2023 10:38
@timwoj
Copy link
Member

timwoj commented Nov 20, 2023

Regardless, the file definitely isn't TOML (e.g., strings are not quoted).

FWIW, our configuration files have never been completely TOML-compliant. They're TOML-ish, but not really TOML.

@ckreibich
Copy link
Member

Hey thanks for fixing this — what a headache. Per my former comment in the code I was really just looking for something that does a decent job highlighting the file. It was always simple Python convenience that wins out here. If there's any doubt here what to use, then let's simply not highlight at all.

FWIW, our configuration files have never been completely TOML-compliant. They're TOML-ish, but not really TOML.

Yeah.

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

Successfully merging this pull request may close these issues.

4 participants