-
Notifications
You must be signed in to change notification settings - Fork 235
Support Linux #268
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 Linux #268
Conversation
|
The hack I mentioned in my previous comment will no longer be necessary once Carthage/Commandant#80 is included in a release of Commandant. |
|
Commandant 0.11.2 is out and I've updated this, so the only thing need to run this is |
de18b33 to
d35e7b5
Compare
to avoid pyramid of dooooom
since it's just used for debugging purposes. Foundation on Linux doesn't support this option anyway, so removing it now will avoid duplicate codepaths when Linux support is added later.
in preparation for actually compiling on Linux
since Objective-C associated objects aren't available
|
This is ready for review @norio-nomura. Lots of changes in here, a few of which I'm hoping we can improve. |
|
Can we add a reference of |
| _ = withUnsafeMutablePointer(to: &array) { arrayPtr in | ||
| sourcekitd_variant_array_apply_f(sourcekitObject, { index, value, context in | ||
| if let value = fromSourceKit(value), let context = context { | ||
| let localArray = context.bindMemory(to: [SourceKitRepresentable].self, capacity: 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for late notice.
I guess that this can be assumingMemoryBound(to:) instead of bindMemory(to:capacity:), because context is already initialized before calling withUnsafeMutablePointer(to:).
Targets and depends on #267.
Doesn't build cleanly at the moment due to Commandant pulling in Quick and Nimble when building on Linux, causing conflicts, but the following flow works to build the first time, then
swift buildworks afterwards as long asPackages/and.build/aren't messed with: