Skip to content

[Add] PlanGrid/ReactiveLists #288

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

Closed
wants to merge 4 commits into from
Closed

[Add] PlanGrid/ReactiveLists #288

wants to merge 4 commits into from

Conversation

jessesquires
Copy link
Contributor

@jessesquires jessesquires commented Nov 9, 2018

Pull Request Description

Adds ReactiveLists to the suite, which is used in the PlanGrid iOS app.

Acceptance Criteria

To be accepted into the Swift source compatibility test suite, a project must:

  • be an Xcode or swift package manager project
  • support building on either Linux or macOS
  • target Linux, macOS, or iOS/tvOS/watchOS device
  • be contained in a publicly accessible git repository
  • maintain a project branch that builds against Swift 4.0 and passes any unit tests
  • have maintainers who will commit to resolve issues in a timely manner
  • be compatible with the latest GM/Beta versions of Xcode and swiftpm
  • add value not already included in the suite
  • be licensed with one of the following permissive licenses:
    • BSD
    • MIT
    • Apache License, version 2.0
    • Eclipse Public License
    • Mozilla Public License (MPL) 1.1
    • MPL 2.0
    • CDDL
  • pass ./project_precommit_check script run

Ensure project meets all listed requirements before submitting a pull request.

Copy link
Contributor

@clackary clackary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request! Were you able to run project_precommit_check here? When I try to run it, I see it fail with errors like this:

/tmp/swift-source-compat-suite/project_cache/ReactiveLists/Sources/CollectionViewDriver.swift:105:130: error: 'elementKindSectionHeader' has been renamed to 'UICollectionElementKindSectionHeader'
        let visibleIndexPathsForHeaders = self.collectionView.indexPathsForVisibleSupplementaryElements(ofKind: UICollectionView.elementKindSectionHeader)
                                                                                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~
                                                                                                                                 UICollectionElementKindSectionHeader

This seems to be coming from commit 7811400. It passed when rolling back to 65ab055.

Also, would you mind moving this configuration to be between the entires for ReactiveCocoa and ReactiveSwift?

projects.json Outdated
{
"action": "BuildXcodeWorkspaceScheme",
"workspace": "ReactiveLists.xcworkspace",
"target": "ReactiveLists",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you're using a workspace here, we want to build a scheme instead of a target.

Suggested change
"target": "ReactiveLists",
"scheme": "ReactiveLists",

@clackary
Copy link
Contributor

Quick update: looks like this might be coming from the way we handle some xcodebuild flags. The project does indeed seem to build correctly with Swift 4.2. I'm looking into this, but we'll still want to make the two changes I suggested in the review.

@clackary
Copy link
Contributor

I've opened #292 to address this.

@jessesquires
Copy link
Contributor Author

Thanks @clackary !

I've updated the PR with the changes requests.


The output of running:

 ./project_precommit_check ReactiveLists --earliest-compatible-swift-version 4.2
** CHECK **
--- Validating ReactiveLists Swift version 4.2 compatibility ---
--- Project configured to be compatible with Swift 4.2 ---
--- Checking ReactiveLists platform compatibility with Darwin ---
--- Platform compatibility check succeeded ---
--- Locating swiftc executable ---
$ xcrun -f swiftc
--- Checking installed Swift version ---
$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc --version
--- Version check failed ---
Expected version:
Apple Swift version 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1)
Target: x86_64-apple-darwin17.7.0

Current version:
Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1)
Target: x86_64-apple-darwin18.2.0

error: please select Xcode 10.0 (contains Swift 4.2)

Looks like we need to set some Xcode project settings for Swift 4.2?

@clackary
Copy link
Contributor

clackary commented Nov 30, 2018

Ah, since you're checking something against Swift 4.2, you'd need to have Xcode 10 installed and selected. You appear to have Xcode 10.1 installed, which technically contains Swift 4.2.1. Not a huge deal. I'll start another round of testing.

Thanks for making those changes!

@jessesquires
Copy link
Contributor Author

Awesome. Thanks @clackary ! 🙌

@clackary
Copy link
Contributor

@swift-ci test

@clackary
Copy link
Contributor

clackary commented Dec 3, 2018

From the build log, it looks like it's failing when trying to run swiftlint from a script in the xcodeproj.

/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite-test-macOS/project_cache/ReactiveLists/build/Build/Intermediates.noindex/ReactiveLists.build/Release-iphoneos/ReactiveLists.build/Script-357B96DD20193EB50000443F.sh: line 2: 26488 Abort trap: 6           ${PODS_ROOT}/SwiftLint/swiftlint

I found the corresponding script in ReactiveLists sources.

This might be coming from an interaction with the sandbox. Network activity is blocked during build time. Maybe SwiftLint is trying to install during build?

@jessesquires
Copy link
Contributor Author

@clackary Hm... it shouldn't be trying to install. We install via CocoaPods and check-in Pods/...

I'll investigate.

@jessesquires
Copy link
Contributor Author

hey @clackary sorry for the delay here! Just updated this PR.

I think it's ok. But the project_precommit_check script still gives me the same error that I mentioned in the comment above. I'm using Xcode 10.1 (10B61)

@clackary
Copy link
Contributor

@swift-ci please test

@clackary
Copy link
Contributor

@jessesquires Sounds good, thanks for the update.

@clackary
Copy link
Contributor

The build log shows a few failures related to StagedChangeset...

/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite-test-macOS/project_cache/ReactiveLists/Pods/DifferenceKit/Sources/StagedChangeset.swift:46:1: error: type 'StagedChangeset<Collection>' does not conform to protocol 'Sequence'
extension StagedChangeset: RandomAccessCollection, RangeReplaceableCollection, MutableCollection {
^

@jessesquires
Copy link
Contributor Author

jessesquires commented Mar 27, 2019

@clackary Ah, that's expected for Xcode 10.2.

I just updated the library to Swift 5, so I'll update the PR for that.

@jessesquires
Copy link
Contributor Author

Or, put another way: it should build with Xcode 10.1, but breaks with Xcode 10.2 (even in 4.2 mode)

@jessesquires
Copy link
Contributor Author

Updated!

@clackary
Copy link
Contributor

@swift-ci test

2 similar comments
@clackary
Copy link
Contributor

@swift-ci test

@clackary
Copy link
Contributor

clackary commented Jul 2, 2019

@swift-ci test

@clackary
Copy link
Contributor

clackary commented Jul 3, 2019

The build results there are a few months stale, so I ran a local test against Xcode 11 beta 3, and I expect this to pass now.

@clackary
Copy link
Contributor

clackary commented Jul 3, 2019

Build failed because of an issue with SwiftLint...

    /bin/sh -c /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite-test-macOS/project_cache/ReactiveLists/build/Build/Intermediates.noindex/ReactiveLists.build/Release-iphoneos/ReactiveLists.build/Script-357B96DD20193EB50000443F.sh
/Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite-test-macOS/project_cache/ReactiveLists/build/Build/Intermediates.noindex/ReactiveLists.build/Release-iphoneos/ReactiveLists.build/Script-357B96DD20193EB50000443F.sh: line 2: 65310 Segmentation fault: 11  ${PODS_ROOT}/SwiftLint/swiftlint
Command PhaseScriptExecution failed with a nonzero exit code

** BUILD FAILED **


The following build commands failed:
	PhaseScriptExecution SwiftLint /Users/buildnode/jenkins/workspace-private/swift-PR-source-compat-suite-test-macOS/project_cache/ReactiveLists/build/Build/Intermediates.noindex/ReactiveLists.build/Release-iphoneos/ReactiveLists.build/Script-357B96DD20193EB50000443F.sh
(1 failure)

@clackary
Copy link
Contributor

clackary commented Jul 4, 2019

Oh, this is the same thing we were hitting before?

@jessesquires
Copy link
Contributor Author

cc @anayini @ronaldsmartin -- either of you interested in carrying this PR forward?

@jessesquires
Copy link
Contributor Author

going to close. i don't have time to fix.

cc @anayini @ronaldsmartin

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

Successfully merging this pull request may close these issues.

2 participants