Skip to content

Xcode-beta (15.0) C++ interop option generates erroneous 'let' property initialization code #66523

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

Closed
Tracked by #65808
ByunghoonKim opened this issue Jun 10, 2023 · 7 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. c++ interop Feature: Interoperability with C++ triage needed This issue needs more specific labels

Comments

@ByunghoonKim
Copy link

Description

Steps to reproduce

  1. Install Xcode 15.0 beta (15A5160n). Create a new macOS app project. Placeholder code compiles well.
  2. set Xcode > Settings > Command Line Tools: Xcode-beta 15.0 (15A5160n)
  3. choose Project > Build Settings > Swift Compiler - Language > C++/Objective-C++, and build
  4. Build fails

Expected behavior
Compile & Run

Screenshot 2023-06-10 at 9 57 53

Environment

  • Swift compiler version info
swift-driver version: 1.82.2 Apple Swift version 5.9 (swiftlang-5.9.0.114.6 clang-1500.0.27.1)
Target: arm64-apple-macosx13.0
  • Xcode version info
Xcode 15.0
Build version 15A5160n
  • Deployment target:
macOS 13.4
@ByunghoonKim ByunghoonKim added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Jun 10, 2023
@LucianoPAlmeida LucianoPAlmeida added the c++ interop Feature: Interoperability with C++ label Jun 12, 2023
@hyp
Copy link
Contributor

hyp commented Jun 13, 2023

@egorzhdan are you looking into this one?

@egorzhdan
Copy link
Contributor

I cannot reproduce this with a newly created macOS App project.
@ByunghoonKim could you please elaborate on how you are creating the project in Xcode?

@ByunghoonKim
Copy link
Author

I have done nothing special other than what I described in the original post.

I am working on a 2021 MacBook Pro (M1 Pro) with Ventura 13.4. To be sure, I have deleted both Xcode 14 and Xcode 15 beta, re-installed Xcode 15 beta, and rebooted my laptop twice just now.
This is what happens. (sorry for the movie quality. had to make it under 10MB)

Screen.Recording.2023-06-21.at.10.49.30_540p.mp4

@ByunghoonKim
Copy link
Author

Hi,
I am here to report that the issue I described above has disappeared with Xcode 15 beta 3. The erroneous code generation has, however, continued to be problematic with beta 2.

Because I see no pull request regarding this issue, I do not know if the underlying problem, if any, is actively resolved, or it was mere a symptom of something else that has been patched with beta 3. In any case, since my problem is gone, I'd like to ask if it would be helpful for your workflow if I closed this issue.

Thank you for the update, anyway. :)

@egorzhdan
Copy link
Contributor

Thanks @ByunghoonKim for the update! Glad to know this is no longer an issue for you.

Unfortunately the underlying issue is not yet fixed, we're tracking it as rdar://110431818 internally.

@ByunghoonKim
Copy link
Author

If that is the case, I will leave it open for now. Thanks again for the effort, @egorzhdan.

@hyp
Copy link
Contributor

hyp commented Jul 11, 2023

I will close this issue since it does not reproduce with Beta 3 anymore. If this reoccurs we can reopen it.

@hyp hyp closed this as completed Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. c++ interop Feature: Interoperability with C++ triage needed This issue needs more specific labels
Projects
None yet
Development

No branches or pull requests

4 participants