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

Providing an API to update the imported symbols for an ImportDeclaration #1908

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

Conversation

oxisto
Copy link
Member

@oxisto oxisto commented Dec 18, 2024

This introduces a new extension function ImportDeclaration.updateImportedSymbols. The idea behind that is that we might need to update the importedSymbols of an import declaration, if the symbols that "live" in the associated namespace change. This is mainly the case once we infer records out of known Type nodes. Therefore, the type resolver will update all the imported symbols before executing all the remaining passes. This way, the remainder of the passes can access imported symbols that were inferred.

Needed for #1862

…tion`

This introduces a new extension function `ImportDeclaration.updateImportedSymbols`. The idea behind that is that we might need to update the `importedSymbols` of an import declaration, if the symbols that "live" in the associated namespace change. This is mainly the case once we infer records out of known `Type` nodes. Therefore, the type resolver will update all the imported symbols before executing all the remaining passes. This way, the remainder of the passes can access imported symbols that were inferred.
@oxisto oxisto marked this pull request as ready for review December 18, 2024 08:55
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 77.04%. Comparing base (e39f15d) to head (f6bc1e3).

Files with missing lines Patch % Lines
...n/de/fraunhofer/aisec/cpg/passes/ImportResolver.kt 85.71% 0 Missing and 2 partials ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
...lin/de/fraunhofer/aisec/cpg/passes/TypeResolver.kt 95.83% <100.00%> (+0.18%) ⬆️
...n/de/fraunhofer/aisec/cpg/passes/ImportResolver.kt 89.65% <85.71%> (-0.46%) ⬇️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant