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

Support building with Swift 4.1 #2038

Merged
merged 12 commits into from Apr 8, 2018

Conversation

Projects
None yet
6 participants
@norio-nomura
Collaborator

norio-nomura commented Feb 5, 2018

@norio-nomura

This comment has been minimized.

Collaborator

norio-nomura commented Feb 5, 2018

sourcekit crashes with Swift 4.1 on Linux

$ docker run --privileged -it -v `pwd`:`pwd` -w `pwd` --rm norionomura/swift:swift-4.1-branch
root@6c4214ffb3f5:/Users/norio/github/SwiftLint# SOURCEKIT_LOGGING=3 swift test --filter testFunctionParameterCount
Compile CYaml src/api.c
Compile CYaml src/emitter.c
Compile CYaml src/parser.c
Compile CYaml src/reader.c
Compile CYaml src/scanner.c
Compile CYaml src/writer.c
Compile Swift Module 'SWXMLHash' (2 sources)
Compile Swift Module 'SwiftyTextTable' (1 sources)
Compile Swift Module 'Result' (2 sources)
Compile Swift Module 'Yams' (16 sources)
Compile Swift Module 'Commandant' (9 sources)
Compile Swift Module 'SourceKittenFramework' (35 sources)
Compile Swift Module 'SwiftLintFramework' (221 sources)
Compile Swift Module 'SwiftLintFrameworkTests' (44 sources)
Compile Swift Module 'swiftlint' (11 sources)
Linking ./.build/x86_64-unknown-linux/debug/swiftlint
Compile Swift Module 'SwiftLintPackageTests' (1 sources)
Linking ./.build/x86_64-unknown-linux/debug/SwiftLintPackageTests.xctest
Test Suite 'Selected tests' started at 2018-02-05 05:49:37.732
Test Suite 'RulesTests' started at 2018-02-05 05:49:37.732
Test Case 'RulesTests.testFunctionParameterCount' started at 2018-02-05 05:49:37.733
sourcekit: [2:sourcekitd_initialize: 0.0000] initializing

sourcekit: [2:handleRequest-before: 0.1053] {
  key.request: source.request.editor.open,
  key.name: "-2178448306979356082",
  key.sourcetext: "/* 👨‍👩‍👧‍👦👨‍👩‍👧‍👦👨‍👩‍👧‍👦 */\n`init`(a: Int, b: Int, c: Int, d: Int, e: Int, f: Int) {}"
}
SwiftLintPackageTests.xctest: /home/buildnode/jenkins/workspace/oss-swift-4.1-package-linux-ubuntu-16_04/swift/include/swift/Parse/Token.h:127: void swift::Token::setEscapedIdentifier(bool): Assertion `(!value || Kind == tok::identifier) && "only identifiers can be escaped identifiers"' failed.
Exited with signal code 6
@norio-nomura

This comment has been minimized.

Collaborator

norio-nomura commented Feb 5, 2018

filed SR-6926

@SwiftLintBot

This comment has been minimized.

SwiftLintBot commented Feb 5, 2018

12 Messages
📖 Linting Aerial with this PR took 0.36s vs 0.41s on master (12% faster)
📖 Linting Alamofire with this PR took 2.93s vs 3.2s on master (8% faster)
📖 Linting Firefox with this PR took 10.63s vs 12.68s on master (16% faster)
📖 Linting Kickstarter with this PR took 15.41s vs 19.98s on master (22% faster)
📖 Linting Moya with this PR took 1.68s vs 1.93s on master (12% faster)
📖 Linting Nimble with this PR took 1.41s vs 1.86s on master (24% faster)
📖 Linting Quick with this PR took 0.47s vs 0.58s on master (18% faster)
📖 Linting Realm with this PR took 2.96s vs 3.43s on master (13% faster)
📖 Linting SourceKitten with this PR took 0.93s vs 1.23s on master (24% faster)
📖 Linting Sourcery with this PR took 4.17s vs 4.94s on master (15% faster)
📖 Linting Swift with this PR took 18.16s vs 15.07s on master (20% slower)
📖 Linting WordPress with this PR took 13.45s vs 16.04s on master (16% faster)

Generated by 🚫 Danger

@norio-nomura

This comment has been minimized.

Collaborator

norio-nomura commented Feb 14, 2018

SR-6926 has been fixed.

@codecov-io

This comment has been minimized.

codecov-io commented Feb 14, 2018

Codecov Report

Merging #2038 into master will decrease coverage by 0.03%.
The diff coverage is 91.91%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2038      +/-   ##
==========================================
- Coverage   89.68%   89.64%   -0.04%     
==========================================
  Files         256      258       +2     
  Lines       14906    14925      +19     
  Branches      972      973       +1     
==========================================
+ Hits        13368    13380      +12     
- Misses       1521     1528       +7     
  Partials       17       17
Impacted Files Coverage Δ
...ource/SwiftLintFramework/Models/SwiftVersion.swift 100% <ø> (ø) ⬆️
...iftlint/Extensions/Configuration+CommandLine.swift 0% <0%> (ø) ⬆️
Source/swiftlint/Extensions/shim.swift 0% <0%> (ø)
Source/swiftlint/Commands/RulesCommand.swift 0% <0%> (ø) ⬆️
Source/SwiftLintFramework/Rules/MarkRule.swift 100% <100%> (ø) ⬆️
...ce/SwiftLintFramework/Reporters/HTMLReporter.swift 95.13% <100%> (ø) ⬆️
...iftLintFramework/Rules/ShorthandOperatorRule.swift 87.5% <100%> (ø) ⬆️
...urce/SwiftLintFramework/Rules/LargeTupleRule.swift 96.42% <100%> (ø) ⬆️
...SwiftLintFramework/Rules/ForceUnwrappingRule.swift 98.03% <100%> (ø) ⬆️
...SwiftLintFramework/Rules/SingleTestClassRule.swift 92% <100%> (ø) ⬆️
... and 69 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0bb6083...d988ae4. Read the comment docs.

@norio-nomura

This comment has been minimized.

Collaborator

norio-nomura commented Mar 8, 2018

Updated by merging from master instead of rebasing, since some PR depends on this PR's branch.

@realm realm deleted a comment from norio-nomura Mar 22, 2018

@norio-nomura

This comment has been minimized.

Collaborator

norio-nomura commented Apr 3, 2018

  • New release of SourceKitten will be required for passing cocoapods job.
  • osscheck is failing with unknown error.
@norio-nomura

This comment has been minimized.

Collaborator

norio-nomura commented Apr 5, 2018

Squashed some commits and rebased.

@marcelofabri marcelofabri referenced this pull request Apr 5, 2018

Closed

Can't compile under Linux #2147

2 of 2 tasks complete

@felix91gr felix91gr referenced this pull request Apr 6, 2018

Merged

Update README.md #2

norio-nomura added some commits Mar 8, 2018

Update dependencies
- Update SourceKitten from 0.19.1 to 0.20.0
- Update SWXMLHash from 4.3.6 to 4.6.0
- Update Yams from 0.5.0 to 0.7.0
Silence compiler warnings
> warning: initializer 'init(configuration:)' nearly matches defaulted requirement 'init(configuration:)' of protocol 'Rule'
> note: candidate has non-matching type '(configuration: SeverityLevelsConfiguration)'
> note: move 'init(configuration:)' to an extension to silence this warning
> SwiftLintFramework.Rule:5:12: note: requirement 'init(configuration:)' declared here
>    public init(configuration: Any) throws
[CircleCI] Use Xcode 9.3
- Change tsan's Xcode Xcode 9.2 to 9.3
- Change osscheck's Xcode from 9.2 to 9.3
- Add swiftpm_4.1 job using Xcode 9.3
- Rename cocoapods to cocoapods_swift_4
- Add cocoapods_swift_4.1 job using Xcode 9.3
@norio-nomura

This comment has been minimized.

Collaborator

norio-nomura commented Apr 8, 2018

Updated

@norio-nomura norio-nomura changed the title from [WIP] Support building with Swift 4.1 to Support building with Swift 4.1 Apr 8, 2018

Update changelog entries
[skip ci]
@norio-nomura

This comment has been minimized.

Collaborator

norio-nomura commented Apr 8, 2018

Ready for review.

@marcelofabri

💯

@jpsim

jpsim approved these changes Apr 8, 2018

Excellent work!

@jpsim jpsim merged commit cf59e0c into master Apr 8, 2018

@norio-nomura norio-nomura deleted the nn-swift-4.1 branch Apr 8, 2018

@norio-nomura

This comment has been minimized.

Collaborator

norio-nomura commented Apr 8, 2018

Thanks!

@felix91gr

This comment has been minimized.

felix91gr commented Apr 12, 2018

Just so you know, now master passes all tests under my Linux (downstream of Ubuntu 16.04 LTS). Good job everyone, and thanks for supporting Linux :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment