-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Address GUID type definition errors #85196
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
Conversation
|
@grynspan can i get your thoughts about this. I ran into this issue of missing here is my repro:
|
|
I did not see an issue with duplicate definitions of What toolchain version are you testing with? There hasn't been a Windows toolchain in a while and the most recent one (Oct 2) has a broken WinSDK.modulemap. |
|
@compnerd Thoughts? |
I don't think that we have a spelling for this currently. I wonder if we can add a disfavored overload annotation on the native definition via APINotes.
The builds from https://github.com/thebrowsercompany/swift-build tend to be newer and have more features than the ones from swift.org.
I would be okay with dropping the equatable conformance until we enhance the C++ interop machinery in the compiler. However, |
|
We may want to revert the change to add conformances for the moment if it's causing problems, but I'd like to see what the C++ interop folks think before we do that. |
|
I believe we can cut the knot here by renaming the new @_implements(Equatable, ==(_:_:))
public static func __equals(lhs: Self, rhs: Self) -> Bool { ... } |
|
@grynspan any thoughts about why the alias is needed. without the alias, the generared name has this results in errors about undefined type |
|
|
|
Co-authored-by: Jonathan Grynspan <[email protected]>
|
@mhegazy I think we can proceed with the change to |
|
@swift-ci test |
|
@grynspan i am happy to remove the type alias. do you have any pointers on figuring out why the generated interface file has refrences to the undfined type |
|
I am not able to reproduce the issue you're seeing, so I honestly don't have an answer for you. A new main-branch toolchain for Windows was just pushed to swift.org. Are you able to try it out and see if the issue reproduces there? |
|
@swift-ci test |
|
@swift-ci please test Windows platform |
|
I encountered a similar |
|
What isn't clear right now is why your toolchain can't find that type. It would help if you could share a repro case including a sample package. |
Right, that's what I think is the issue. A repro needs a new toolchain build and a source file |
|
In case you mean you want me to send you a toolchain build, I confirmed that this BCNY build https://github.com/thebrowsercompany/swift-build/releases/tag/20251113.2 reproduces it, if you are okay with a BCNY build. I don't think there are swift.org builds yet. |
|
@compnerd Are you able to investigate? The most recent official Swift toolchain release has this change in place but doesn't show the problem. |
|
I think that the issue is unrelated: This might be an explicit modules issue? |
In #84792 we have added implementation to
EquatableandHashablethere are two issues with this.GUIDwould be emitted in theswiftinterfacefile as_GUIDDef._GUIDsince it is an external type. but the type name in the imported header file isGUIDand not_GUID-cxx-interoperability-mode=default, there are duplicate definition errors for==since the c++ header file defines the same operator.Proposed changes:
typealias _GUID = GUIDto address the naming mismatch in the generated interface file