tab completion in swift repl segfaults?

I just downloaded xcode 7, then did the following:


1. xcrun swift (succesfully starts the swift repl)

2. Simply typed the following:

let x = 1


and then I typed

x.<tab>


(i.e. i typed an x, a period, and then tab, to get completions). Immediately, I get:

Available completions:

advancedBy(n: Distance) -> Int

advancedBy(n: Self.Distance, limit: Self) -> Self

bigEndian: Int

byteSwapped: Int

description: String

distanceTo(other: Int) -> Distance

hashValue: Int

littleEndian: Int

predecessor() -> Int

stride(through: Self, by: Self.Stride) -> StrideThrough<Self>

stride(to: Self, by: Self.Stride) -> StrideTo<Self>

successor() -> Int

toIntMax() -> IntMax

value: Int64

Segmentation fault: 11


Same thing with every kind of completion I've tried. Is this a known issue? any workarounds? seems like tab completion would be awesome for noodling around in a swift repl, just like in Python... if it worked!

tab completion in swift repl segfaults?

Just FYI, it doesn’t crash on my machine (Xcode 7.0 on 10.10.5).

$ xcrun swift
Welcome to Apple Swift version 2.0 (700.0.59 700.0.72). Type :help for assistance.
  1> let x = 1
x: Int = 1
  2> x.                <<< hit Tab here
Available completions:
    advancedBy(n: Distance) -> Int
    advancedBy(n: Self.Distance, limit: Self) -> Self
    bigEndian: Int
    byteSwapped: Int
    description: String
    distanceTo(other: Int) -> Distance
    hashValue: Int
    littleEndian: Int
    predecessor() -> Int
    stride(through: Self, by: Self.Stride) -> StrideThrough<Self>
    stride(to: Self, by: Self.Stride) -> StrideTo<Self>
    successor() -> Int
    toIntMax() -> IntMax
    value: Int64
  2> x.value
$R0: Builtin.Int64 = 1

I’m not sure why it’s crashing on your machine but I think it’s bugworthy.

Please post your bug number, just for the record.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
tab completion in swift repl segfaults?
 
 
Q