Skip to content
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

[SR-7130] ObjC protocol objects are not emitted #49678

Closed
swift-ci opened this issue Mar 6, 2018 · 7 comments
Closed

[SR-7130] ObjC protocol objects are not emitted #49678

swift-ci opened this issue Mar 6, 2018 · 7 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself IRGen LLVM IR generation

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Mar 6, 2018

Previous ID SR-7130
Radar rdar://problem/38394637
Original Reporter flovilmart (JIRA User)
Type Bug
Status Resolved
Resolution Done
Environment

MacOS High Sierra 10.13.3 (17D102)

Xcode Version 9.2 (9C40b)

Swift 4.0

j2objc 2.0.5, with latest JRE (https://github.com/google/j2objc)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, IRGen
Assignee @DougGregor
Priority Medium

md5: 96e75817b9a0ee2e3ff7689a8b1ee8d7

Issue Description:

While using j2objc, the google backed java to objective-c translation library we encounter this bug when checking for protocol conformances from a swift codebase.

An objective-c codebase is not affected by the issue.

The issue is tracked here, and seems to originate with the release of Swift 3.0 google/j2objc#889

We put together a demo project https://github.com/flovilmart/TestingObjCProtocolIssue with all required dependencies for easy 'testing'.

This has also been briefly discussed on twitter (https://twitter.com/jckarter/status/971104252432039936)

At this time, I can't pinpoint nor provide more details, but it seems that in particular scenarios, the protcol objects are not properly emitted.

@belkadan
Copy link
Contributor

belkadan commented Mar 8, 2018

@swift-ci create

@swift-ci
Copy link
Collaborator Author

swift-ci commented Mar 8, 2018

Comment by Florent Vilmart (JIRA)

@belkadan if you guys have any pointers, I would very well try to understand and fix this issue!

@DougGregor
Copy link
Member

I believe that #15338 addresses this, but it needs more testing. graydon (JIRA User) did most of the investigation here; I just knew which body to dig up.

@swift-ci
Copy link
Collaborator Author

Comment by Florent Vilmart (JIRA)

@DougGregor if you can let me know when it lands in a toolchain snapshot, I'll re-run my tests to make sure the fix is ok?

@swift-ci
Copy link
Collaborator Author

Comment by Graydon Hoare (JIRA)

flovilmart (JIRA User) I have the testcase here and am currently testing it against a trunk compiler with Doug's fix. Will let you know shortly if it works here (and thus whether to bother with a snapshot yet).

@swift-ci
Copy link
Collaborator Author

Comment by Florent Vilmart (JIRA)

Awesome

@DougGregor
Copy link
Member

aaa5ce1

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
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. compiler The Swift compiler in itself IRGen LLVM IR generation
Projects
None yet
Development

No branches or pull requests

3 participants