Skip to content

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

@artemcm artemcm closed this pull request by merging all changes into swiftlang:release/6.2 in bb581a8 May 5, 2025
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