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 default languages.toml if user's is invalid #994

Merged
merged 1 commit into from
Nov 9, 2021

Conversation

Omnikar
Copy link
Contributor

@Omnikar Omnikar commented Nov 6, 2021

I forgot to account for languages.toml in #982.

@@ -40,13 +40,14 @@ where
}

#[derive(Debug, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it is a good idea to deny unknown fields, if later when we add or remove a new field it might be a breaking change that affects the user.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The default languages.toml is embedded in the binary, meaning that if new fields are added to it, they won't end up reaching the user unless they get an updated binary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rationale for adding it in the first place: #982 (comment)

@Omnikar Omnikar requested a review from pickfire November 8, 2021 20:56
@archseer archseer merged commit a424ef4 into helix-editor:master Nov 9, 2021
@Omnikar Omnikar deleted the use-defaults branch November 9, 2021 02:21
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.

3 participants