Re: [swift-dev] [SourceKit] NSRange, Swift.String, and NSString

2017-03-24 Thread Jean-Pierre Simard via swift-dev
I ended up writing some convenience APIs to perform these conversions along with many other useful SourceKit<->Cocoa conversions like line+column, UTF-8, UTF-16 and String.Index in SourceKitten. It's MIT-licensed so feel free to grab the String extensions from the project yourself:

Re: [swift-dev] [SourceKit] NSRange, Swift.String, and NSString

2017-03-24 Thread Ben Langmuir via swift-dev
> On Mar 24, 2017, at 10:59 AM, Tyler Stromberg via swift-dev > wrote: > > I'm currently working on integrating SourceKit with a macOS application. > AppKit APIs (e.g. NSAttributedString, NSLayoutManager, etc) deal in terms of > NSRange (UTF-16 code units?). SourceKit,

[swift-dev] [SourceKit] NSRange, Swift.String, and NSString

2017-03-24 Thread Tyler Stromberg via swift-dev
I'm currently working on integrating SourceKit with a macOS application. AppKit APIs (e.g. NSAttributedString, NSLayoutManager, etc) deal in terms of NSRange (UTF-16 code units?). SourceKit, however, deals in terms of integer offsets and lengths (UTF-8 code units?). Is there a more efficient

Re: [swift-dev] [Swift CI] Build Failure: 0. OSS - Swift Incremental RA - OS X (master) #9017

2017-03-24 Thread Xi Ge via swift-dev
This seems to be fixed in the next build. I’ve integrated the radar. Xi > On Mar 23, 2017, at 8:46 PM, Slava Pestov wrote: > > I thought this was my changes but then it cleared up on the next build. > > Xi, I filed rdar://31234811 with some information. Since > you’re the

Re: [swift-dev] [Swift CI] Build Still Failing: 0. OSS - Swift Incremental RA - OS X (swift 4.0) #27

2017-03-24 Thread Alex L via swift-dev
My bad, I forgot a cherry-pick. Should be fixed now. On 24 March 2017 at 10:29, wrote: > New issue found! > [FAILURE] oss-swift-4.0-incremental-RA-osx [#27] > Build URL: https://ci.swift.org/job/oss-swift-4.0-incremental-RA-osx/27/ > Project: oss-swift-4.0-incremental-RA-osx