Linux support - #121
Conversation
Codecov Report
@@ Coverage Diff @@## main #121 +/- ##
==========================================
- Coverage 87.43% 87.38% -0.05%
==========================================
Files 263 264 +1 Lines 6627 6634 +7 ==========================================
+ Hits 5794 5797 +3 - Misses 833 837 +4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Update 2022/08/19merge main branch. ❯ docker run -it -w /project -v `pwd`:/project --platform linux/x86_64 swift swift build
Building for debugging...
Build complete! (13.84s)❯ docker run -it -w /project -v `pwd`:/project --platform linux/x86_64 swift swift test
Building for debugging...
/project/Tests/TwitterAPIKitTests/APIv1/Geo/GetGeoReverseGeocodeRequestV1Tests.swift:12:9: error: cannot find 'XCTContext'in scope
XCTContext.runActivity(named: "ft") { _ in
^~~~~~~~~~
/project/Tests/TwitterAPIKitTests/APIv1/Geo/GetGeoReverseGeocodeRequestV1Tests.swift:35:9: error: cannot find 'XCTContext'in scope
XCTContext.runActivity(named: "meter") { _ in
...
error: fatalError |
Mcrich23
commented
Aug 30, 2022
Please add this!!! |
Mcrich23
commented
Aug 30, 2022
@mironal Sourcery (one of your checks) wasn't able to run, because it wasn't running on macOS, thus failing. It seems that although it can theoretically run on GitHub, it prevents itself from doing so. |
Mcrich23
commented
Aug 30, 2022
Additionally, I am running it on my vapor server in docker and it's working flawlessly |
mironal
commented
Aug 30, 2022
@Mcrich23 Thanks for your comment. Sorry & Unfortunately this branch is not yet complete and will not be merged into the main branch. If you are using Swift PM, you can specify this branch to use in your project. When we update the main branch, this branch will continue to follow. |
@mironal Ok, tysm. May I ask what is yet to be added? |
mironal
commented
Aug 30, 2022
@Mcrich23 We would like to merge it after successful testing in a Linux environment. Currently, TwitterAPIKit tests cannot be compiled due to limitations of XCTest. We are wondering whether we should make major modifications to the tests or wait for an XCTest update. However, we do not feel the need to rush, as we can use this branch directly if we want to use it on Linux. Do you have a reason to rush the merge to the main branch? |
Mcrich23
commented
Aug 30, 2022
@mironal No, I just didn't realize at first that main didn't support linux and I am sure others will have the same issue. Maybe consider putting a note about it in the readme? |
mironal
commented
Aug 31, 2022
@Mcrich23 Thank you. I updated the README! |
Mcrich23
commented
Aug 31, 2022
@mironal cool! |
Mcrich23
commented
Aug 31, 2022
@mironal btw, it links to the pr request and not the branch itself |
mironal
commented
Nov 4, 2022
Updated: 2022/11/04❯ docker run -it -w /project -v `pwd`:/project --platform linux/x86_64 swift swift build
Building for debugging...
[740/740] Compiling TwitterAPIKit TwitterRateLimit.swift
Build complete! (221.43s) |

We have confirmed that this branch is buildable, but due to limitations of XCTest and Swift, we have not been able to run tests on it.
#120