Since GSoC is coming to an end here's a recap on what I did so far.
Done
- In #32483 Refactor DiagnosticEngine to use
YAML
files, I Introduced localization support for diagnostics via file-per-language store inYAML
format. And added aLocalizationFormat
interface and its implementationYAMLLocalizationProducer
. - In #32630 Create frontend flags for localization, I created frontend flags for localization and added tests to make sure everything is working.
- In #32698, #33464, and #33523, I created an
en.yaml
file that has all of diagnostic messages on the agreed-upon format. - In #33022 Create a serialized format for Localized Diagnostics, I created a serialized format for Localized Diagnostics and created a tool for converting the diagnostics files from
.yaml
to.db
- In #33316 Ignore diagnostic IDs that are available in YAML and not in
.def
, I modified ScalarEnumerationTraits to handle diagnostic IDs that are available in YAML and not in .def. - In #33337 Make the serialization tool print the removed diagnostics, I created a vector that will keep track of the diagnostic IDs that got removed from .def and still available in YAML. Then I made the swift-serialize-diagnostics tool print out all of the removed diagnostic IDs.
- In #33502 Refactor
diagnosticStringFor
to return StringRef, I refactored theDiagnosticEngine::diagnosticStringFor
to return a StringRef.
Ongoing
-
#33422 Switch diagnostic messages from
.def
to the new format, As of August 27th, 2020. I’m still in the process of switching to the new YAML files completely and removing text from.def
files, to depend only on the newly created format. -
#33661 Create swift-localize-diagnostics tool, I created a tool which will create a YAML file from the texts of the diagnostic messages in
.def
files.
To Do
As of August 27th, 2020, the remaining work is:
- Add documentation for localization in
docs/Diagnostics
- Create a pruning tool, to report and remove diagnostics that are in
.def
but not in YAML. - Create a linter for YAML files.
- Make changes in
LLVM::YAMLParser
to add support for multiline string folding.
At the end of GSoC, I really wanted to thank you all for your help and guidance throughout the past 4 months. My technical and communication skills improved exponentially, thanks again!