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

Consider excludes while walking Tests #152

Merged
merged 2 commits into from
Mar 8, 2016

Conversation

aciidgh
Copy link
Contributor

@aciidgh aciidgh commented Feb 27, 2016

Consider exclude directories for test modules.

Fixes this bug: https://twitter.com/kylefuller/status/703000791620132864

@czechboy0
Copy link
Member

Very much needed, thanks for this!

@cjwirth
Copy link

cjwirth commented Feb 27, 2016

This is definitely something we need!

In the meantime, is there some kind of workaround?

@cjwirth
Copy link

cjwirth commented Feb 27, 2016

What I ended up doing is just forking all the repos that were failing (recurseively... 😞) and removed the Tests directory, and changing all the Package.swift files to point to my fork. Hopefully there's an easier way?

@aciidgh
Copy link
Contributor Author

aciidgh commented Feb 27, 2016

@cjwirth You can build and install swiftpm yourself with this patch in the meanwhile, that'd be easier I think. It'll be a while before this is accepted, merged and a snapshot is released

@czechboy0
Copy link
Member

@cjwirth Actually there is a hacky way to do this, you'll probably want to hide this in a script/Makefile

  1. Run swift build once, which will successfully pull the dependencies, but eventually fail bc of the above error
  2. Recursively delete/rename all folders called Tests in Packages
  3. Run swift build again, this time the modified Packages contents will allow for a clean compilation of all the dependencies.

This feels slightly better than having to fork all dependencies recursively.

@cjwirth
Copy link

cjwirth commented Feb 27, 2016

You can build and install swiftpm yourself with this patch in the meanwhile,

This is probably the more correct way to do it, but unless want to try my hand at some development myself, I'd rather just use the snapshots .

  1. Run swift build once, which will successfully pull the dependencies, but eventually fail bc of the above error
  2. Recursively delete/rename all folders called Tests in Packages
  3. Run swift build again, this time the modified Packages contents will allow for a clean compilation of all the dependencies.

Aah, this makes a lot of sense. This is exactly the kind of hacky workaround I was looking for, thanks!

@mxcl
Copy link
Contributor

mxcl commented Feb 27, 2016

Using a newer swift build is pretty easy: You can build SwiftPM with swift build and put it first in the path.

@aciidgh
Copy link
Contributor Author

aciidgh commented Mar 7, 2016

Rebased and solved conflicts due to #180

@kostiakoval
Copy link
Contributor

LGTM 👌

@mxcl
Copy link
Contributor

mxcl commented Mar 7, 2016

@swift-ci Please test

@aciidgh
Copy link
Contributor Author

aciidgh commented Mar 8, 2016

Can I merge this? 😬

vadimeisenbergibm added a commit to IBM-Swift-Sunset/GRMustache.swift that referenced this pull request Mar 8, 2016
…o another directory

moved to NonSwiftPackageManagerTests
temporary measure until swiftlang/swift-package-manager#152 is accepted
then the moved tests will be moved back to Tests, and will be excluded by "exclude" directive
 in Package.swift
vadimeisenbergibm added a commit to IBM-Swift-Sunset/GRMustache.swift that referenced this pull request Mar 8, 2016
…eSpec

changed to NonSwiftPackageManagerTests/vendor/groue/GRMustacheSpec
temporary measure until swiftlang/swift-package-manager#152 is accepted
@mxcl
Copy link
Contributor

mxcl commented Mar 8, 2016

@aciidb0mb3r hit it 👊🏻

aciidgh added a commit that referenced this pull request Mar 8, 2016
Consider excludes while walking Tests
@aciidgh aciidgh merged commit 2d70e5a into swiftlang:master Mar 8, 2016
@aciidgh aciidgh deleted the testModules_excludes branch March 8, 2016 22:50
aciidgh pushed a commit to aciidgh/swift-package-manager that referenced this pull request Jan 11, 2019
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.

5 participants