Skip to content

Localize jsonreader infrastructure.#893

Merged
BillyONeal merged 7 commits intomicrosoft:mainfrom
BillyONeal:localize-type-names
Feb 16, 2023
Merged

Localize jsonreader infrastructure.#893
BillyONeal merged 7 commits intomicrosoft:mainfrom
BillyONeal:localize-type-names

Conversation

@BillyONeal
Copy link
Copy Markdown
Member

  • Change type_name and friends to return LocalizedString instead of StringView as this now requires formatting.
  • StringDeserializer and ArrayDeserializer are "nerfed" in that they can't provide type_name; this now requires separate derivation because figuring out what type_name is must be deferred until after the current locale is loaded.

* Change type_name and friends to return LocalizedString instead of StringView as this now requires formatting.
* StringDeserializer and ArrayDeserializer are "nerfed" in that they can't provide type_name; this now requires separate derivation because figuring out what type_name is must be deferred until after the current locale is loaded.
@BillyONeal BillyONeal marked this pull request as draft February 11, 2023 04:47

template<class Underlying>
struct ArrayDeserializer final : IDeserializer<std::vector<typename Underlying::type>>
struct ArrayDeserializer : IDeserializer<std::vector<typename Underlying::type>>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why remove final from this struct?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It is now abstract.

@BillyONeal BillyONeal marked this pull request as ready for review February 13, 2023 02:37
@ras0219-msft ras0219-msft self-assigned this Feb 14, 2023
# Conflicts:
#	include/vcpkg/base/messages.h
#	src/vcpkg/base/messages.cpp
@BillyONeal BillyONeal merged commit b1981a1 into microsoft:main Feb 16, 2023
@BillyONeal BillyONeal deleted the localize-type-names branch February 16, 2023 21:41
@BillyONeal
Copy link
Copy Markdown
Member Author

@JavierMatosD Thanks!

BillyONeal added a commit to BillyONeal/vcpkg-tool that referenced this pull request Feb 16, 2023
* microsoft#893
* [...]

Audited:

* `print2` (deleted)
* `vcpkg::printf` (deleted)
* `Checks::not-msg` (deleted)
* `Strings::format` (deleted)
* `ExpectedS` (deleted)
* `Strings::append` (retained)
* `Strings::concat` (retained)
* `add_generic_error` (retained)
BillyONeal added a commit to BillyONeal/vcpkg-tool that referenced this pull request Feb 16, 2023
* microsoft#893
* [...]

Audited:

* `print2` (deleted)
* `vcpkg::printf` (deleted)
* `Checks::not-msg` (deleted)
* `Strings::format` (deleted)
* `ExpectedS` (deleted)
* `Strings::append` (retained)
* `Strings::concat` (retained)
* `add_generic_error` (retained)
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