I've been iterating through some older projects and rebuilding them with the latest SDK (Xcode 15 beta 2 in this case), and I've noticed that my docc build processes are sprouting a huge number of warnings without anything changing in the code from earlier versions of swift (some 5.8, some back to 5.6).
The (admittedly hacky) process I was using to pull together all the relevant symbols was to generate the documentation archive as normal, including the
--emit-digest option, and then doing some data parsing of the generated
docs/linkable-entities.json to get all the identifiers. The identifiers themselves have changed up in pattern - where previously symbols such as
> were transformed to a placeholder
_ and disambiguation extensions (such as
-6f26z) added, those symbols appear to be now legit.
Hacky process example:
cat docs/linkable-entities.json | jq '..referenceURL' -r > all_identifiers.txt sort all_identifiers.txt \ | sed -e 's/doc:\/\/com\.github\.heckj\.MeshGenerator\/documentation\///g' \ | sed -e 's/^/- ``/g' \ | sed -e 's/$/``/g' > all_symbols.txt
There's some fixits in Xcode that do a nice job of identifying a few mismatches, and prompting for the corrected values, but it doesn't seem to hit all of them. And I'm still seeing some of the
_ replacement pattern in place there - I'm assuming for some patterns that still aren't quite legit for use in a URL structure, but I'm not sure where the line is drawn.
So the question drops down to:
Is there a better way to get a list of all the unique symbols so that I can go through and curate them appropriately?
The current process I'm using seems to work reasonably well, but a bug with Xcode where it's not always clearing errors on a clean & rebuild of docs is making this a painful thing to update.
In one particular example, I've updated a symbol to:
But at the top of the DocC file, I'm still getting a warning from the older symbol structure that it's not legit:
'_(_:_:)-3x8q' doesn't exist at '/MeshGenerator/LineSegment'
example from Xcode:
Is this an erroneous error, or am I mistaking how to set up those symbols?
(and this isn't Xcode specific - same warnings appear in CLI output. this was just easier to present)