Generate Class Hierarchy metadata using local Apple Help

Description

Until now, we were generating ClassHierarchy.def using SourceKit (since https://swiftify.atlassian.net/browse/SWC-723 was implemented).

This becomes more and more problematic (see https://swiftify.atlassian.net/browse/SWC-1030), so we need to regenerate the same file in the JsonMetadataConverter project.

Important note about the file format - conformed protocol names should be listed after the comma, to distinguish between superclasses and protocols - see
https://swiftify.atlassian.net/browse/SWC-827

Environment

None

Activity

Show:
Alex Petuschak
June 18, 2020, 3:54 PM

This one looks incorrect:

NSCalendar.Unit does not derive from NSCalendar but is rather a class declared inside a class, ex.: https://take.ms/j3wpP

The mapping in our current project’s metadata also looks incorrect:

The correct one should be as follows (since OptionSet is a protocol name):

Vadim Vorotilin
June 18, 2020, 4:14 PM

looks like a bug. I’ll investigate it. there are more bugs I need to fix as well. but it shouldn’t take long.

Vadim Vorotilin
June 19, 2020, 10:58 AM

done in commit
all the bugs should be fixed by now. should we proceed to merge or should I create a pull request?

Alex Petuschak
June 19, 2020, 12:15 PM

  1. NSView is missing the superclass (which should be NSResponder).

  2. CGRectis a struct, thus it does not have a superclass, just conformed protocols.

should be similar to:

Pull requests are optional for this metadata project.

Put the task In Review once you are done.

When accepted, your feature branch can be merged to `Feature/Metadata.Swift5.2` (which is the common branch for all metadata changes).

I usually name sub-branches as `Feature/Metadata.Swift5.2.ClassHierarchyMetadataGeneration`

Vadim Vorotilin
June 20, 2020, 6:08 PM

everything should be fixed now. I’ve also renamed the branch.

Assignee

Vadim Vorotilin

Reporter

Alex Petuschak

Labels

None

GitHub Issue

None

Components

Fix versions

Priority

Medium
Configure