Skip to content

[6.2 🍒][Dependency Scanning] Miscellaneous fixes to import statement info serialization #81254

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

Open
wants to merge 1 commit into
base: release/6.2
Choose a base branch
from

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented May 2, 2025

Cherry-pick of #80723

Explanation: This change is an overall code improvement to handling of import statement information as it gets serialized into the dependency scanner incremental build state. import statement data technically isn't crucially important to get serialized, as up-to-date modules will have their imports already resolved, and non-up-to-date modules will have their imports re-scanned, but the code change still cleans up overall handling to ensure serialized state is consistent.

  • Deserialization of binary module dependencies was still relying on stale code (e.g. currentModuleImports, currentOptionalModuleImports) from serialized import strings, instead of the now in-use import infos.
  • Imports without a source location (e.g. implicit imports of stdlib) were not getting serialized at all
  • Optional import arrays were not being written out at all

Risk: Low, serialization of import statements is now more sound than it was before. Though they should not get used often much.
Testing: Added tests to test suite
Original PRs: #80723
Reviewers: @cachemeifyoucan

…rialization

- Deserialization of binary module dependencies was still relying on stale code (e.g. 'currentModuleImports', 'currentOptionalModuleImports') from serialized import strings, instead of the now in-use import infos.
- Imports without a source location (e.g. implicit imports of stdlib) were not getting serialized at all
- Optional import arrays were not being written out at all
@artemcm
Copy link
Contributor Author

artemcm commented May 2, 2025

@swift-ci test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 6.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants