-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Update SourceKitten, SwiftyTextTable and support swift test
#555
Conversation
On jpsim/SourceKitten#176, I wrote changelog entry in Breaking. |
1b72967
to
e69d79f
Compare
Now, this depends on jpsim/SourceKitten#178. After that will be merged to master and tagged next SourceKitten, this PR will be modified to referencing them in submodule, |
jpsim/SourceKitten#178 contains supporting |
@norio-nomura @jpsim updated SwiftyTextTable with JP's PR. Cut a new release 0.3.0. There is a small breaking change in 0.3.0, but if you apply this patch after updating, you'll be good to go: diff --git a/Source/swiftlint/Commands/RulesCommand.swift b/Source/swiftlint/Commands/RulesCommand.swift
index 4286221..da1489c 100644
--- a/Source/swiftlint/Commands/RulesCommand.swift
+++ b/Source/swiftlint/Commands/RulesCommand.swift
@@ -90,12 +90,13 @@ extension TextTable {
}
return nil
}()
- addRow(ruleID,
+ addRow([
+ ruleID,
(rule is OptInRule) ? "yes" : "no",
(rule is CorrectableRule) ? "yes" : "no",
configuredRule != nil ? "yes" : "no",
(configuredRule ?? rule).configurationDescription
- )
+ ])
}
}
} |
e69d79f
to
67bb05f
Compare
@scottrhoyt @jpsim Thanks! |
xcode-select -p
(dlsym() approach) swift test
67bb05f
to
55fce2c
Compare
SPM test failed on https://travis-ci.org/realm/SwiftLint/jobs/117049352#L762
On local machine: % swift test
<unknown>:0: error: unable to build node: '<Package.test>' (node is produced by multiple commands; e.g., '<swiftlint.exe>' and '')
error: exit(1): swift-build-tool -f /Users/norio/Documents/workspace/github/SwiftLint/.build/debug.yaml test 😞 |
At last, The durations of linting Carthage-0.15.2, /usr/local/bin/swiftlint lint --config ~/.swiftlint-test.yml 14.36s user 0.85s system 79% cpu 19.045 total swift-DEVELOPMENT-SNAPSHOT-2016-03-01-a: ../SwiftLint/.build/release/swiftlint lint --config ~/.swiftlint-test.yml 11.59s user 0.90s system 78% cpu 15.941 total |
|
||
* Failed to launch swiftlint when Xcode.app was placed at non standard path. | ||
[Norio Nomura](https://github.com/norio-nomura) | ||
[#593](https://github.com/realm/SwiftLint/issues/593) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Entries in Enhancements and Bug Fixes are essentially same. Would it be a single entry?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine to keep them separate.
I disabled |
swift test
swift test
This is fine. 👍 |
Thanks for merging! 🙏 |
I have confirmed that swiftlang/swift-package-manager#224 seems to fix this, however you must couple it with the recently completed: swiftlang/swift-package-manager#230 in order to build Swift 2 projects against the latest swift-build |
Thanks for the update @mxcl! |
@mxcl Hi, I built swiftpm(e702428) and tested as following: $ export SWIFT_EXEC=/Library/Developer/Toolchains/swift-2.2.1-SNAPSHOT-2016-03-28-a.xctoolchain/usr/bin/swiftc
$ cd ~/github/SwiftLint
$ ~/github/Apple/swiftpm/.build/debug/swift-build
Compiling Swift Module 'Result' (2 sources)
Compiling Swift Module 'SWXMLHash' (2 sources)
Compiling Swift Module 'Yaml' (6 sources)
Compiling Swift Module 'SwiftyTextTable' (1 sources)
…
<SNIP>
…
Compiling Swift Module 'swiftlint' (8 sources)
Linking .build/debug/swiftlint
~/github/Apple/swiftpm/.build/debug/swift-build 68.84s user 11.04s system 203% cpu 39.286 total
$ ~/github/Apple/swiftpm/.build/debug/swift-test
Compiling Swift Module 'SwiftyTextTableTestSuite' (1 sources)
Compiling Swift Module 'SwiftLintFrameworkTestSuite' (16 sources)
Compiling Swift Module 'SourceKittenFrameworkTestSuite' (12 sources)
Linking .build/debug/SwiftyTextTable.xctest/Contents/MacOS/SwiftyTextTable
Linking .build/debug/SourceKitten.xctest/Contents/MacOS/SourceKitten
Linking .build/debug/SwiftLint.xctest/Contents/MacOS/SwiftLint
Test Suite 'All tests' started at 2016-04-04 23:51:01.625
Test Suite 'SourceKitten.xctest' started at 2016-04-04 23:51:01.626
Test Suite 'ClangTranslationUnitTests' started at 2016-04-04 23:51:01.626
Test Case '-[SourceKittenFrameworkTestSuite.ClangTranslationUnitTests testBasicObjectiveCDocs]' started.
Test Case '-[SourceKittenFrameworkTestSuite.ClangTranslationUnitTests testBasicObjectiveCDocs]' passed (0.972 seconds).
Test Case '-[SourceKittenFrameworkTestSuite.ClangTranslationUnitTests testParsesObjectiveCHeaderFilesAndXcodebuildArguments]' started.
Test Case '-[SourceKittenFrameworkTestSuite.ClangTranslationUnitTests testParsesObjectiveCHeaderFilesAndXcodebuildArguments]' passed (0.000 seconds).
Test Case '-[SourceKittenFrameworkTestSuite.ClangTranslationUnitTests testRealmObjectiveCDocs]' started.
…
<SNIP>
…
Test Case '-[SourceKittenFrameworkTestSuite.SwiftDocsTests testSubscript]' failed (0.017 seconds).
Test Suite 'SwiftDocsTests' failed at 2016-04-04 23:52:02.019.
Executed 3 tests, with 2 failures (0 unexpected) in 0.112 (0.112) seconds
Test Suite 'SyntaxTests' started at 2016-04-04 23:52:02.019
Test Case '-[SourceKittenFrameworkTestSuite.SyntaxTests testGenerateSameSyntaxMapFileAndContents]' started.
Test Case '-[SourceKittenFrameworkTestSuite.SyntaxTests testGenerateSameSyntaxMapFileAndContents]' passed (0.017 seconds).
Test Case '-[SourceKittenFrameworkTestSuite.SyntaxTests testPrintEmptySyntax]' started.
Test Case '-[SourceKittenFrameworkTestSuite.SyntaxTests testPrintEmptySyntax]' passed (0.001 seconds).
Test Case '-[SourceKittenFrameworkTestSuite.SyntaxTests testSubscript]' started.
Test Case '-[SourceKittenFrameworkTestSuite.SyntaxTests testSubscript]' passed (0.001 seconds).
Test Case '-[SourceKittenFrameworkTestSuite.SyntaxTests testSyntaxMapPrintValidJSON]' started.
Test Case '-[SourceKittenFrameworkTestSuite.SyntaxTests testSyntaxMapPrintValidJSON]' passed (0.001 seconds).
Test Suite 'SyntaxTests' passed at 2016-04-04 23:52:02.039.
Executed 4 tests, with 0 failures (0 unexpected) in 0.019 (0.019) seconds
Test Suite 'SourceKitten.xctest' failed at 2016-04-04 23:52:02.039.
Executed 40 tests, with 7 failures (0 unexpected) in 60.409 (60.413) seconds
Test Suite 'All tests' failed at 2016-04-04 23:52:02.039.
Executed 40 tests, with 7 failures (0 unexpected) in 60.409 (60.414) seconds The build passes. But $ ~/github/Apple/swiftpm/.build/debug/swift-test SwiftLintFrameworkTestSuite
Test Suite 'Selected tests' started at 2016-04-04 23:55:38.145
Test Suite 'Selected tests' passed at 2016-04-04 23:55:38.145.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.001) seconds Is this known issue? |
@norio-nomura thanks, will fix. |
@mxcl Thanks! I filed https://bugs.swift.org/browse/SR-1159 |
Depends on jpsim/SourceKitten#176