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

Package Manager Support for SwiftLMDB #1

Merged
merged 7 commits into from
Feb 23, 2017
Merged

Conversation

eriktier
Copy link
Contributor

Hi August,

I've added support for the swift package manager to SwiftLMDB. For this I had to move the C code of lmdb into a separate package (https://github.com/SUIRON/CLMDB). The CLMDB package contains a hard copy of the lmdb source files as the package manager requires there to be an include folder in the right location. So there is room for improvement there.
All your unit tests pass both using 'swift test' as well as in Xcode.
(In case you haven't used the package manager: creating a fresh xcode project can be done with the command: 'swift package generate-xcodeproj' inside the SwiftLMDB package folder).
Anyway, I hope you will consider this pull request. I'm planning to add Cursors to my fork of SwiftLMDB as I need those in my projects.

Cheers,
Erik

There seems to still be an issue with the generation of Xcode projects.
The dependencies between lmdb and SwiftLMDB are not properly
Generated to Xcode.
Temporarily hard including the lmdb code base until I figure out how
to combine its original folder structure with the package manager
Requirements.
@agisboye agisboye merged commit cd98bfb into agisboye:master Feb 23, 2017
@agisboye
Copy link
Owner

Hi Erik,

Thanks so much for the pull request. As I initially needed only iOS/Mac support, I didn't bother with SPM, but I'm glad you did. I'm happy to merge your changes.

I noticed that your CLMDB module contains the lmdb.h file twice (in both Sources and Sources/include). Is this necessary?

@eriktier
Copy link
Contributor Author

eriktier commented Feb 23, 2017 via email

@agisboye
Copy link
Owner

I see. Maybe a symlink could be used to prevent the duplicates. Otherwise we should just keep things as-is until the SPM becomes a bit less picky.

Don't hesitate to create a pull request if you make any headway with the cursors (or other features/fixes). I had something in mind where a database could be made to conform to Sequence/Collection, so that it may be iterated like Array (and friends) from the Swift standard library.

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.

None yet

2 participants