Skip to content

Ensure anchors are saved in a machine-readable way#2103

Merged
dumptruckman merged 1 commit into
Multiverse:masterfrom
blubberdiblub:make-saved-anchors-locale-insensitive
Oct 5, 2020
Merged

Ensure anchors are saved in a machine-readable way#2103
dumptruckman merged 1 commit into
Multiverse:masterfrom
blubberdiblub:make-saved-anchors-locale-insensitive

Conversation

@blubberdiblub

Copy link
Copy Markdown
Contributor

locationToString() is primarily used by the AnchorManager to persist
anchors to disk (the other use is for logging).

In a locale that uses periods as decimal separator, this works fine and
the anchors can be loaded when the server restarts.

However, in a locale that doesn't use periods (but commas, for instance)
this produces an anchors.yml that cannot be parsed when loaded.

Tying the string formatting in locationToString() to an English locale
makes it behave as expected, regardless of the external locale setting.

Fixes: #2102

`locationToString()` is primarily used by the AnchorManager to persist
anchors to disk (the other use is for logging).

In a locale that uses periods as decimal separator, this works fine and
the anchors can be loaded when the server restarts.

However, in a locale that doesn't use periods (but commas, for instance)
this produces an `anchors.yml` that cannot be parsed when loaded.

Tying the string formatting in `locationToString()` to an English locale
makes it behave as expected, regardless of the external locale setting.
@blubberdiblub

Copy link
Copy Markdown
Contributor Author

Looks like your CI setup doesn't like oraclejdk8 anymore. Something like this here: https://travis-ci.community/t/error-installing-oraclejdk8-expected-feature-release-number-in-range-of-9-to-14-but-got-8/3766

@dumptruckman dumptruckman changed the title Ensure archors are saved in a machine-readable way Ensure anchors are saved in a machine-readable way Jun 13, 2020
@nicegamer7 nicegamer7 mentioned this pull request Oct 1, 2020
21 tasks

@nicegamer7 nicegamer7 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@dumptruckman dumptruckman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice and simple. Sorry for the delay!

@dumptruckman dumptruckman merged commit d35363b into Multiverse:master Oct 5, 2020
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.

Anchors are saved locale-sensitively and fail to parse on restart

3 participants