Skip to content
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

Conversation

InsertCreativityHere
Copy link
Member

This PR switches slice2swift to use the new metadata validator built into libSlice.
It is the last language to be switched, and after this PR is merged, I will finally consider issue #117 fixed.

Comment on lines +656 to +657
void
SwiftGenerator::validateSwiftModuleMappings(const UnitPtr& unit)
Copy link
Member Author

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"
Copy link
Member

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.

Copy link
Member Author

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,
Copy link
Member

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.

@InsertCreativityHere InsertCreativityHere merged commit f606bbd into zeroc-ice:main Feb 11, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants