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

0.25.0 makes path case sensitive - breaks with malloc error #2091

Closed
2 tasks done
yvettecook opened this issue Mar 8, 2018 · 3 comments
Closed
2 tasks done

0.25.0 makes path case sensitive - breaks with malloc error #2091

yvettecook opened this issue Mar 8, 2018 · 3 comments
Labels
bug Unexpected and reproducible misbehavior.

Comments

@yvettecook
Copy link

New Issue Checklist

Bug Report

We are running swiftlint in a build phase for embedded xcodeproj's inside our workspace. On updating, one of these began crashing on build with the error below.

Previous: swiftlint lint --reporter xcode --config ../../.swiftlint.yml --path ./SwiftKito --strict
Correct: swiftlint lint --reporter xcode --config ../../.swiftlint.yml --path ./Swiftkito --strict

The update to 0.25.0 appears to have made the path case sensitive (which is not unfair), but the error is very hard to trace back to the root cause.

Logging here in case anyone encounters the same issue

Complete output when running SwiftLint, including the stack trace and command used
...
Linting 'ArgumentCaptorProtocol.swift' (5/7)
Linting 'ArgumentCaptor.swift' (6/7)
Linting 'Collection+Utils.swift' (7/7)
Done linting! Found 0 violations, 0 serious in 7 files.
swiftlint(6835,0x70000c69b000) malloc: *** error for object 0x70000c6980a0: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug
/Users/name/Library/Developer/Xcode/DerivedData/ProjectName-awvnzhwbbthardbzjyikmvtecngq/Build/Intermediates.noindex/Swiftkito.build/Debug-iphonesimulator/Swiftkito.build/Script-86F58CA61EF8F5AD00FB5292.sh: line 4:  6835 Abort trap: 6           swiftlint lint --reporter xcode --config ../../.swiftlint.yml --path ./SwiftKito --strict
Command /bin/sh failed with exit code 134

Environment

  • SwiftLint version (run swiftlint version to be sure)?: 0.25.0

  • Installation method used (Homebrew, CocoaPods, building from source, etc)?: Homebrew

  • Paste your configuration file: Not relevant

  • Are you using nested configurations?
    If so, paste their relative paths and respective contents.

  • Which Xcode version are you using (check xcode-select -p)? Xcode 9.2

@SDGGiesbrecht
Copy link
Contributor

Having seen this, I thought it might be good to test the opposite system type too. It works fine right now, but anyone attempting to fix this needs to be mindful of both.

My file system is case‐sensitive. (Casing is a many‐to‐many operation, so the very idea of a case‐insensitive file system is a disaster... Sadly it is too late to undo history.)

Having set up a project like this...

mkdir "Capitalized Folder"
cd "Capitalized Folder"
swift package init
cd ..

(The following results were the same when tested with both 0.24.2 and 0.25.0.)

When I run it with the proper casing, everything works as expected:

swiftlint lint --path "./Capitalized Folder"
[...]
Done linting! Found 8 violations, 2 serious in 4 files.

When I case it wrong, SwiftLint correctly fails to locate the folder:

swiftlint lint --path "./capitalized folder"
Linting Swift files at path ./capitalized folder
No lintable files found at path './capitalized folder'

@marcelofabri marcelofabri added the bug Unexpected and reproducible misbehavior. label Mar 9, 2018
@marcelofabri
Copy link
Collaborator

From the changelog, this is probably the PR that is causing this: #2047

@marcelofabri
Copy link
Collaborator

I'm closing this as a duplicate of #2032.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior.
Projects
None yet
Development

No branches or pull requests

3 participants