Commit Graph

14 Commits

Author SHA1 Message Date
Dmitrii Galimzianov
a8b71ea97f Add -print-diagnostic-groups flag
This change adds the `-print-diagnostic-groups` flag as described by SE-0443.
2024-09-11 13:34:42 +02:00
Ben Barham
273d7ee79d [Serialization] Do not serialize unstable hashes
https://github.com/llvm/llvm-project/pull/96282 changed
`get_execution_seed` to be non-deterministic. Use stable hashes instead.
2024-08-13 19:51:35 -07:00
Ben Barham
ef8825bfe6 Migrate llvm::Optional to std::optional
LLVM has removed llvm::Optional, move over to std::optional. Also
clang-format to fix up all the renamed #includes.
2024-02-21 11:20:06 -08:00
Pavel Yaskevich
10b609caec [Localization] Remove YAML format and tool 2022-08-22 10:53:51 -07:00
Pavel Yaskevich
7c416ee122 [Localization] Implement .def to .strings converter
Format is as follows:

- Comment: /* ... */
- Diagnostic: "<id>" = "<translation>";
2022-08-22 09:22:18 -07:00
Hassan
481b29b6ca [Localization] Delay loading localization
- Add `LocalizationProducerState` to manage the states of LocalizationProducers.
- Add `initializeImpl` and `initializeIfNeeded` to manage lazily initialization of `LocalizationProducer`s.
- Move constructing a localization producer from DiagEngine to `LocalizationProrducer` itself.
2021-05-14 01:28:55 +02:00
Hassan
09b794d002 [Localization] Correct namings and improve comment 2021-03-23 22:39:35 +02:00
Hassan
8665e0cb55 [Localization] Move localization allocator from DiagEngine to the localization producer 2021-03-23 10:41:54 +02:00
Hassan
ef7551d4f5 [Localization] Add an allocator to to retain diagnostic strings 2021-03-17 10:23:02 +02:00
Hassan
651655e3db [Localization] Allocate a copy of diagnostic + name strings in LocalizationProducer 2021-03-14 17:38:34 +02:00
Hassan
1b0e8f9cec [Localization] Make localization producer handle printing diagnostics IDs 2021-03-14 17:38:34 +02:00
Pavel Yaskevich
c7a15e108c [Localization] Simplify localization producer interface
Require producers to implement `getMessage(DiagID)` and
establish default implementation of `getMessageOr`, so
producers don't have to worry about handling fallback if
translation is unavailable.
2020-09-16 11:47:07 -07:00
Pavel Yaskevich
5d11fe6b62 [Localization] Extract def-to-yaml conversion logic into DefToYAMLConverter to ease testing 2020-09-03 16:33:23 -07:00
Saleem Abdulrasool
fe0a945898 AST: split out diagnostics serialization
Create a new diagnostics serialization library, splitting out of
swiftAST to reduce the overheads for building the tooling for
cross-compiling the toolchain.  This should reduce the build time for
swift-serialize-diagnostics to enable cross-compilation.
2020-08-24 09:21:55 -07:00