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

Use JSON5 for parsing all config vars #671

Merged
merged 1 commit into from
Jan 8, 2024
Merged

Use JSON5 for parsing all config vars #671

merged 1 commit into from
Jan 8, 2024

Conversation

nsarrazin
Copy link
Collaborator

This should help with issues like #670 and a lot of others we've seen in the past where users were getting confused about their configs not parsing properly.

Most of the times it's due do trailing commas, comments in the JSON or similar. Using JSON5 solves all of these.

I tested it with the huggingchat prod config and it works fine.

@nsarrazin nsarrazin added enhancement New feature or request back This issue is related to the Svelte backend or the DB labels Dec 29, 2023
@nsarrazin
Copy link
Collaborator Author

In the long run I'd like to do a breaking change and replace the .env.local by a config.yaml or config.toml and refactor large parts of the config file so the vars make more sense, but for now I think this already helps 😁

@julien-c julien-c requested a review from coyotte508 January 2, 2024 09:56
Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR sounds good to me

@nsarrazin nsarrazin merged commit f09c5f3 into main Jan 8, 2024
3 checks passed
@nsarrazin nsarrazin deleted the enhancement/json5 branch January 8, 2024 08:00
ice91 pushed a commit to ice91/chat-ui that referenced this pull request Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back This issue is related to the Svelte backend or the DB enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants