This includes:
- replacing "relationhips" with "relationships"
- emitting the "pathComponents" property on symbols
- emitting the "accessLevel" property on symbols
Paths
| Differential D123045
[clang][extract-api] Fix small issues with SymbolGraphSerializer ClosedPublic Authored by dang on Apr 4 2022, 9:21 AM.
Details Summary This includes:
Diff Detail
Event Timeline
Comment Actions After a quick scan comparing the current output of these symbol graphs with the primary library used for reading them, the last thing i can spot that's "off" is that the "function signature" is currently being serialized under a parameters field instead of the required functionSignature.
Comment Actions
Hmm, I was looking at the format specification at https://github.com/apple/swift-docc-symbolkit/blob/0a45209833f4a151212c1aa38e13cfc03b9462e4/openapi.yaml#L307, and I searched the term functionSignature in the spec but found no property with that name (except for the FunctionSignature schema that the parameters property is referring to). But anyway this should be a easy fix.
Comment Actions
It seems like the specification and implementation have diverged. The parser in swift-docc-symbolkit is looking for a functionSignature field by virtue of how it names its "coding key". By comparison, here is the functionSignature emitter in the Swift symbol-graph generator. Comment Actions
Yeah we should fix that I will do it as part of this patch since it seems like a small change.
Comment Actions Address code review feedback:
Comment Actions Manage PatchComponents stack manipulation using RAII to avoid forgetting to pop dang added inline comments.
Comment Actions I like the idea of using the RAII context/guard to manage the path components stack. I have one non-blocking comment about the rest of the patch now.
This revision is now accepted and ready to land.Apr 6 2022, 8:12 AM dang marked an inline comment as done. Comment ActionsMake SymbolGraphSerializer::serializeAPIRecord const again. Comment Actions Unused include of declaration fragments in SymbolGraphSerializer. Otherwise LGTM!
This revision was landed with ongoing or failed builds.Apr 6 2022, 10:46 AM Closed by commit rG28d793144f2a: [clang][extract-api] Fix small issues with SymbolGraphSerializer (authored by dang). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 420883 clang/include/clang/ExtractAPI/Serialization/SymbolGraphSerializer.h
clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
clang/test/ExtractAPI/enum.c
clang/test/ExtractAPI/global_record.c
clang/test/ExtractAPI/global_record_multifile.c
clang/test/ExtractAPI/language.c
clang/test/ExtractAPI/macro_undefined.c
clang/test/ExtractAPI/macros.c
clang/test/ExtractAPI/objc_interface.m
clang/test/ExtractAPI/objc_protocol.m
clang/test/ExtractAPI/struct.c
|
Now that the path components are being manipulated outside of serializeAPIRecord, can this function become const again?