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

Implement interface hash generation based on Syntax tree #76527

Open
rintaro opened this issue Sep 17, 2024 · 0 comments
Open

Implement interface hash generation based on Syntax tree #76527

rintaro opened this issue Sep 17, 2024 · 0 comments
Labels
ASTGen Area → compiler: The ASTGen module, which translates SwiftSyntax trees to the C++ AST feature A feature request or implementation

Comments

@rintaro
Copy link
Member

rintaro commented Sep 17, 2024

Motivation

The interface hash (a.k.a. fingerprint) is generated as a byproduct of the current C++ parser. As part of adopting SwiftParser and retiring the current C++ parser, we have to implement this another way. See eg.

  • SourceFile::getInterfaceHash()
  • IterableDeclContext::getBodyFingerprint()
  • AbstractFunctionDecl::getBodyFingerprint()

Proposed solution

Implement interface hash by traversing syntax tree in Swift.

@rintaro rintaro added feature A feature request or implementation triage needed This issue needs more specific labels ASTGen Area → compiler: The ASTGen module, which translates SwiftSyntax trees to the C++ AST labels Sep 17, 2024
@bnbarham bnbarham removed the triage needed This issue needs more specific labels label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASTGen Area → compiler: The ASTGen module, which translates SwiftSyntax trees to the C++ AST feature A feature request or implementation
Projects
None yet
Development

No branches or pull requests

2 participants