Skip to content

Conversation

@egorzhdan
Copy link
Contributor

ClangImporter was importing C++ decls inconsistently when the experimental AddressableParameters feature is enabled vs disabled. This caused deserialization issues if a dependency module was build without AddressableParameters, but a client module enables them.

rdar://155319311

@egorzhdan egorzhdan requested a review from jckarter July 8, 2025 15:48
@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Jul 8, 2025
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan force-pushed the egorzhdan/always-addressable branch from f87ea28 to c727cfb Compare July 9, 2025 12:02
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan force-pushed the egorzhdan/always-addressable branch from c727cfb to 4ed9bd9 Compare July 21, 2025 12:51
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan force-pushed the egorzhdan/always-addressable branch from 4ed9bd9 to 3da89f4 Compare July 21, 2025 13:58
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan force-pushed the egorzhdan/always-addressable branch from 3da89f4 to e71b87c Compare July 22, 2025 12:44
@egorzhdan egorzhdan requested a review from hnrklssn as a code owner July 22, 2025 12:44
@egorzhdan egorzhdan force-pushed the egorzhdan/always-addressable branch from e71b87c to 93be49e Compare July 22, 2025 12:47
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan force-pushed the egorzhdan/always-addressable branch from 93be49e to 5700d8e Compare July 22, 2025 16:06
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan force-pushed the egorzhdan/always-addressable branch from 5700d8e to 3a48b2b Compare July 24, 2025 14:43
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan force-pushed the egorzhdan/always-addressable branch from 3a48b2b to 57a876d Compare July 24, 2025 14:55
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

ClangImporter was importing C++ decls inconsistently when the experimental AddressableParameters feature is enabled vs disabled. This caused deserialization issues if a dependency module was build without AddressableParameters, but a client module enables them.

rdar://155319311

Co-authored-by: Gabor Horvath <[email protected]>
@egorzhdan egorzhdan force-pushed the egorzhdan/always-addressable branch from 57a876d to cd58e65 Compare July 24, 2025 17:51
@egorzhdan
Copy link
Contributor Author

@swift-ci please test

@egorzhdan
Copy link
Contributor Author

@swift-ci please build toolchain Ubuntu 24.04

@egorzhdan
Copy link
Contributor Author

@swift-ci please build toolchain Amazon Linux

@egorzhdan
Copy link
Contributor Author

@swift-ci please build toolchain Amazon Linux 2

@egorzhdan egorzhdan merged commit 46ffc2a into swiftlang:main Jul 25, 2025
6 of 7 checks passed
Xazax-hun pushed a commit to Xazax-hun/swift that referenced this pull request Aug 18, 2025
After swiftlang#83289 and swiftlang#82879 landed we should no longer get deserialization
failures and this feature is no longer behind a flag. This patch also
changes how we query if a function's return value depends on self.
Previously, we queried the lifetime dependencies from the Swift
declaration. Unfortunately, this is problematic as we might have not
finished fully importing the types in the function signature just yet
and the compiler might end up populating the conformance tables
prematurely. To work this around, I store functions with self-dependent
return values where lifetimes are computed in the importer for later
use.

The PR also adds a test to make sure the addressable dependency feature
will not result in deserialization errors.

rdar://155319311&154213694&112690482&128293252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ interop Feature: Interoperability with C++

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants