Skip to content

Swift: make extractor compile again after 6.1 upgrade #19315

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

redsun82
Copy link
Contributor

No description provided.

@redsun82 redsun82 force-pushed the redsun82/swift-6.1 branch from cc07637 to 593c8d8 Compare April 15, 2025 15:53
Comment on lines -356 to +359
llvm::SmallVector<char> uuid;
type->getOpenedExistentialID().toString(uuid);
return visitArchetypeType(type) << std::string_view(uuid.data(), uuid.size());
// llvm::SmallVector<char> uuid;
// type->getOpenedExistentialID().toString(uuid); // <- doesn't compile any more
// return visitArchetypeType(type) << std::string_view(uuid.data(), uuid.size());
return visitArchetypeType(type);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at swiftlang/swift#76238 I see the following change:

-      printFieldQuoted(T->getOpenedExistentialID(), "opened_existential_id");
+      auto *env = T->getGenericEnvironment();
+      printFieldQuoted(env->getOpenedExistentialUUID(), "opened_existential_id");

where T is of type OpenedArchetypeType.

auto pattern = expr.getRegexText();
auto pattern = expr.getParsedRegexText(); // TODO: there is now this and getRegexToEmit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getRegexText was removed in swiftlang/swift#76979.

Looks like the ASTDumper and ASTPrinter have the same replacement as we do here. In SILGenApply it gets replaced with getRegexToEmit. To me following what the dumper and printer do intuitively makes most sense given what we do with the result (put it in a database). Is that a correct observation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants