xattr.h lacks module definition

Originator:zwaldowski
Number:rdar://18440444 Date Originated:24 Sep 2014
Status:Closed Resolved:true
Product:Developer Tools Product Version:Xcode 6.1 DP2 (6A1030), OS X 10.10 Beta 3 (14A361p)
Classification:Enhancement Reproducible:Sometimes
 
Summary:
Every header in /usr/include and /System/Library/Frameworks should have a parent module available to include. The extended attributes addition to the C standard library does not.

Steps to Reproduce:
1. Enable modules for an Xcode project.
2. Active "-Wauto-import" to migrate to @import modules.
3. Migrate "#import <sys/attr.h>" to "@import Darwin.sys.attr;"
4. Be unable to "@import Darwin.sys.xattr;"

Alternatively:

1. Have the desire to use extended attributes from Swift.
2. Be sad.

Expected Results:
Expected Results:
Obj-C: "@import Darwin.sys.xattr;" works as you would assume.
Swift: "import Darwin.sys.xattr" works as you would assume.

Actual Results:
Obj-C: "#import <sys/xattr.h>" must be used instead.
Swift: Cannot import the xattr functions without Objective-C bridging.


Version:
Xcode 6.1 DP2 (6A1030), OS X 10.10 Beta 3 (14A361p)

Notes:
In Objective-C, workarounds involve using the #import and being sad that not all the @imports line up. In Swift, there is no workaround other than the Objective-C bridging header.

Configuration:


Attachments:

Comments

Resolution

The issue still occurs against iOS 9.0.1 as there has been no Xcode release to match the OS update.

However, upon testing this has been resolved in Xcode 7.1b2. This issue has been verified as resolved and can be closed.

By zwaldowski at Sept. 24, 2015, 5:26 p.m. (reply...)

Message from Apple Developer Bug Reporting

Hello Donald,

This is a follow-up regarding regarding Bug ID# 18440444.

Please verify this issue with iOS 9.0.1 GM (Build: 13A404) and update your bug report at http://bugreport.apple.com/ with the results.

iOS 9.0.1 GM (Build: 13A404) https://developer.apple.com/ios/download/ Posted Date: Sept 23rd, 2015

By zwaldowski at Sept. 24, 2015, 5:26 p.m. (reply...)

This issue still occurs in Xcode Version 7.0 beta 2.

By zwaldowski at June 23, 2015, 8:52 p.m. (reply...)

This issue still occurs in Xcode Version 6.3 (6D520o).

By zwaldowski at Feb. 10, 2015, 2:49 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!