-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Segmentation fault on trailing_comma with Swift 2.3 #921
Comments
@csjones how can we reproduce this? Can you share a repro case? |
Can you please also confirm that this issue is still present on |
Offending line:
|
Just to add we're seeing exactly the same problem - builds succeed from the command line but fail with code 139 within xcode. Disabling the trailing_comma rule solves this for us too. In case it helps, we run swiftlint as a build phase using the following command:
Here's the output.
|
Again, I'd appreciate steps to reproduce or a confirmation that this issue also exists on |
I've installed the master version and the problem exists there too. Rough steps to reproduce:
There may be more to this but I didn't set up the project I'm working with so can't be certain. Note we've tried specifying |
I couldn't reproduce this on |
Sorry I'd have to create that from scratch but this may help: The problem occurs on line 73/74 of TrailingCommaRule.swift:
Specifically it seems to be in String+SourceKitten.swift within the I've determined that this will only occur if the source file contains an extended ASCII character - we have |
Could you please try again with SwiftLint 0.14, which was just released? |
0.14 crashes with the same error. Have you tried adding a |
Adding |
Hmm, we have a mystery. I'll try to find some time to debug |
@davemorrissey @csjones I've opened #1032 which is an attempt to fix the issue. Could you try that? |
Yes I think that does fix it. However I think there may be a deeper problem. In xcode we're now seeing over a thousand false positives for Unused Closure Parameter, and many more for Closure Parameter Position, none of which appear when swiftlint is run from the command line. I haven't got much closer to figuring out why this is, but then I'm not really an iOS developer so the intricacies of string encoding are beyond me. |
Is it possible you have more than one Xcode version installed? Or multiple Swift toolchains? I had Xcode 7.3.1 |
BTW, I run SwiftLint 0.14 against all projects listed in #1025 and all trigged |
I removed an old Xcode beta with no luck. Our builds in CircleCI were also affected and I assume that's a clean environment. I had no false positives building and testing the swiftlint project. This suggests it's something in our project config, but I have no idea where to look. |
@davemorrissey What's your Xcode and Swift version? Maybe that can help us. |
I have xcode 8.2.1 but I'm not sure what CircleCI uses. Our project is swift 2.3. |
Same problem with CircleCI and |
I was able to reproduce the issue using Xcode 7.3.x and the snippet @csjones shared. I'll try to investigate later. |
I don't think #1032 is the proper fix for this issue. Here's what I get with Swift 3:
And Swift 2.3:
For some reason it includes an |
I've taken another look at this and it seems to happen only when using interpolation inside the dictionary. I was able to reduce to this: foo(["a": "\(error)" ]) I think I'm OK with merging #1032 and having false negatives on these cases. Swift 2.3 will not survive long anyways. |
@marcelofabri is it possible to push out a new release version with these swift 2.3 fixes? |
Currently exiting with code 139 on lint.
The text was updated successfully, but these errors were encountered: