Conversation
… corrupt during dumping Fixes #381 Signed-off-by: Frost Ming <me@frostming.com>
moz-v2v-gh
pushed a commit
to mozilla/releases-comm-central
that referenced
this pull request
Aug 13, 2025
…o.toml when regenerating it. r=tobyp It's a simple fix but it took me some time to fully understand why this is happening. `tomlkit.TOMLFile.read()` preserves whitespaces (including empty lines) when parsing a TOML file (so it can reproduce them if it needs to turn the `TOMLFile` into a string). However, our template adds two line breaks at the end of the `[features]` section (to separate it from the following `[workspace]` section). Which are then reproduced endlessly. I'm not entirely sure why it started happening at the time it did, but I suspect this might have something to do with python-poetry/tomlkit#421 or python-poetry/tomlkit#422 (although I'm not 100% certain since it doesn't entirely match what I saw when I was fiddling with the tomlkit source code to investigate this). Both these changes shipped in tomlkit 0.13.3 which released in early June, which is a couple of weeks before this issue started happening. Anyway, the right thing to do in our case seems to strip the extra line breaks since we already take care of adding them in the template. Differential Revision: https://phabricator.services.mozilla.com/D260963 --HG-- extra : amend_source : 4e9a682977b07aca8162951e5ce170534dc7f1f3
github-actions bot
pushed a commit
to thunderbird/comm-unified-l10n
that referenced
this pull request
Aug 14, 2025
…o.toml when regenerating it. r=tobyp It's a simple fix but it took me some time to fully understand why this is happening. `tomlkit.TOMLFile.read()` preserves whitespaces (including empty lines) when parsing a TOML file (so it can reproduce them if it needs to turn the `TOMLFile` into a string). However, our template adds two line breaks at the end of the `[features]` section (to separate it from the following `[workspace]` section). Which are then reproduced endlessly. I'm not entirely sure why it started happening at the time it did, but I suspect this might have something to do with python-poetry/tomlkit#421 or python-poetry/tomlkit#422 (although I'm not 100% certain since it doesn't entirely match what I saw when I was fiddling with the tomlkit source code to investigate this). Both these changes shipped in tomlkit 0.13.3 which released in early June, which is a couple of weeks before this issue started happening. Anyway, the right thing to do in our case seems to strip the extra line breaks since we already take care of adding them in the template. Differential Revision: https://phabricator.services.mozilla.com/D260963
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #381
Signed-off-by: Frost Ming me@frostming.com