Skip to content

Conversation

@jpsim
Copy link
Owner

@jpsim jpsim commented Oct 13, 2016

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 build works afterwards as long as Packages/ and .build/ aren't messed with:

$ swift build
$ rm -rf .build
$ # Delete lines containing 'Quick' in Commandant's Package.swift
$ sed -i.bak '/Quick/d' Packages/Commandant-0.11.1/Package.swift
$ make docker_test

@jpsim jpsim mentioned this pull request Oct 13, 2016
@jpsim
Copy link
Owner Author

jpsim commented Oct 13, 2016

The hack I mentioned in my previous comment will no longer be necessary once Carthage/Commandant#80 is included in a release of Commandant.

@jpsim
Copy link
Owner Author

jpsim commented Oct 14, 2016

Commandant 0.11.2 is out and I've updated this, so the only thing need to run this is make docker_test.

jpsim added 22 commits October 18, 2016 10:11
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
@jpsim jpsim changed the base branch from jp-spm to master October 18, 2016 17:20
@jpsim
Copy link
Owner Author

jpsim commented Oct 18, 2016

This is ready for review @norio-nomura. Lots of changes in here, a few of which I'm hoping we can improve.

@jpsim jpsim mentioned this pull request Oct 18, 2016
@norio-nomura
Copy link
Collaborator

Can we add a reference of Tests/LinuxMain.swift to Xcode Project with no Target Membership?
Looks good to me other than that. 👍

@jpsim jpsim merged commit 4e92440 into master Oct 20, 2016
@jpsim jpsim deleted the jp-linux branch October 20, 2016 02:36
_ = 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)
Copy link
Collaborator

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:).

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.

3 participants