-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the 'New' Metadata Validator for slice2swift
#3530
Use the 'New' Metadata Validator for slice2swift
#3530
Conversation
void | ||
SwiftGenerator::validateSwiftModuleMappings(const UnitPtr& unit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All this code was just moved out of MetadataValidator::visitUnit
into a new static function.
I didn't change anything else about it.
}; | ||
knownMetadata.emplace("swift:class-resolver-prefix", classResolverPrefixInfo); | ||
|
||
// "swift:inherits" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should drop swift:inherits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this is merged I'll have a follow up PR to drop swift:inherits
and loosen the swift:module
check.
I think that should be all the issues around Swift metadata.
MetadataInfo moduleInfo = { | ||
.validOn = {typeid(Module)}, | ||
// Even though it's really 'module:prefix' the validator sees this as a single argument since there's no commas. | ||
.acceptedArgumentKind = MetadataArgumentKind::SingleArgument, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should drop the MetadataArgumentKind::MultipleArguments (?) option since we don't use it for any Slice metadata except support warnings.
This PR switches
slice2swift
to use the new metadata validator built intolibSlice
.It is the last language to be switched, and after this PR is merged, I will finally consider issue #117 fixed.