Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Linux support #121

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Linux support #121

wants to merge 9 commits into from

Conversation

mironal
Copy link
Owner

@mironal mironal commented Apr 11, 2022

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

@codecov-commenter
Copy link

codecov-commenter commented Apr 11, 2022

Codecov Report

Merging #121 (63533d7) into main (7bbdd82) will decrease coverage by 0.04%.
The diff coverage is 80.00%.

@@            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     
Impacted Files Coverage Δ
Sources/TwitterAPIKit/Extensions/Data.swift 97.56% <ø> (-0.91%) ⬇️
Sources/TwitterAPIKit/TwitterAPIKit.swift 100.00% <ø> (ø)
Sources/TwitterAPIKit/TwitterAPIResponse.swift 86.32% <0.00%> (-3.06%) ⬇️
Sources/TwitterAPIKit/Extensions/HMAC.swift 100.00% <100.00%> (ø)
Sources/TwitterAPIKit/OAuthHelper.swift 96.07% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mironal
Copy link
Owner Author

mironal commented Aug 19, 2022

Update 2022/08/19

merge 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
Copy link

Please add this!!!

Copy link

@Mcrich23 Mcrich23 left a comment

Choose a reason for hiding this comment

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

It looks like it will work

@Mcrich23
Copy link

@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
Copy link

Additionally, I am running it on my vapor server in docker and it's working flawlessly

@mironal
Copy link
Owner Author

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.

@Mcrich23
Copy link

Mcrich23 commented Aug 30, 2022

@mironal Ok, tysm. May I ask what is yet to be added?

@mironal
Copy link
Owner Author

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
Copy link

@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
Copy link
Owner Author

mironal commented Aug 31, 2022

@Mcrich23 Thank you. I updated the README!

image

@Mcrich23
Copy link

@mironal cool!

@Mcrich23
Copy link

@mironal btw, it links to the pr request and not the branch itself

@mironal
Copy link
Owner Author

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)

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

Successfully merging this pull request may close these issues.

None yet

3 participants