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-8906] Can't print() a DispatchQoS instance on Linux (any longer) #647

Closed
glessard opened this issue Oct 3, 2018 · 6 comments
Closed

Comments

@glessard
Copy link

glessard commented Oct 3, 2018

Previous ID SR-8906
Radar None
Original Reporter @glessard
Type Bug
Status Resolved
Resolution Done
Environment

This is the release version of Swift 4.2 on Linux, built for Ubuntu 16.04

Additional Detail from JIRA
Votes 0
Component/s libdispatch
Labels Bug, 4.2Regression, Runtime
Assignee None
Priority Medium

md5: e6cf197c118b1ca75c909d7a76dabb3a

relates to:

  • SR-8847 DispatchTimeInterval String representation regression Swift 4.2/Ubuntu 18.04

Issue Description:

The following program:

import Dispatch
print(String(describing: DispatchQoS.utility))
print(String(describing: DispatchQoS.utility.qosClass))

results in the following output with Swift 4.2 on Linux:

SWIFT RUNTIME BUG: unable to find field metadata for type 'Dispatch.DispatchQoS'

SWIFT RUNTIME BUG: unable to find field metadata for type 'Dispatch.DispatchQoS'

DispatchQoS(unknown: (), unknown: ())

SWIFT RUNTIME BUG: unable to find field metadata for type 'Dispatch.DispatchQoS.QoSClass'

SWIFT RUNTIME BUG: unable to find field metadata for type 'Dispatch.DispatchQoS.QoSClass'

SWIFT RUNTIME BUG: unable to find field metadata for type 'Dispatch.DispatchQoS.QoSClass'

unknown()

The "SWIFT RUNTIME BUG" lines are output to the error stream.

On both Swift 4.0.3 and 4.1.3, the output is the expected:

DispatchQoS(qosClass: Dispatch.DispatchQoS.QoSClass.utility, relativePriority: 0)

utility

@belkadan
Copy link

belkadan commented Oct 4, 2018

@DougGregor, @jckarter, did we change anything here that would mess Dispatch up?

@jckarter
Copy link
Member

jckarter commented Oct 4, 2018

I don't think so. Is there any peculiar about how corelibs-dispatch is built? We've had some issues in the past with the corelibs foundation and dispatch build systems still linking with BFD ld instead of gold or lld, which might corrupt Swift metadata in a way it can't be found at runtime.

@jckarter
Copy link
Member

jckarter commented Oct 4, 2018

It might be worth checking whether `swift-reflection-dump` correctly outputs anything for these types in the library binary.

@glessard
Copy link
Author

glessard commented Mar 5, 2019

This is still an issue in 4.2.3, but it is fixed as of the 5.0 snapshot from Feb. 28.

@glessard
Copy link
Author

glessard commented Mar 6, 2019

If anyone happens to know where/when this was fixed, it would be nice to nominate that fix for 4.2.4...

@glessard
Copy link
Author

This was fixed in the Swift 5.0 release.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants