yapstudios / YapDatabase

YapDB is a collection/key/value store with a plugin architecture. It's built atop sqlite, for Swift & objective-c developers.
Other
3.35k stars 365 forks source link

Can't see Swift files in Yap project. #524

Closed MythicLionMan closed 4 years ago

MythicLionMan commented 4 years ago

I can't see YapDatabaseView.swift and YapDatabaseSecondaryIndex.swift in the project. Is this intentional? (Or perhaps I'm not configuring it correctly).

I'm not 100% sure how we're importing the project, we have another developer who's reconfigured our build architecture. We used to check Yap out into our own repo, but now we're using Carthage to keep it up to date. I did try checking out the Yap repo on master branch on its own and searching the project for files that end in '.swift' its own and the only files I see are YapDatabase.swift and YapDatabaseQuery.swift.

Not having access to these files hides most of the refined for Swift API. Since the base methods are now all marked with NS_REFINED_FOR_SWIFT I have to refer to them using the '' prefix from swift code. There's also at least one nullability error in the ObjC versions (in YapDatabaseSecondaryIndexTransaction.enumerateIndexedValues()) so the Swift API would be preferable.

robbiehanson commented 4 years ago

now we're using Carthage

Gotcha, that makes sense. I think this issue was resolved via one of the commits in Issue #505. Specifically via commit c0933753.

Can you check to see which version/branch/commit is being used by your project? If it's the latest tagged version (4.0), then this fix won't be included. If so, can you switch to latest commit in master, and see if the issue is resolved?

It looks like it's time to tag another version.

MythicLionMan commented 4 years ago

I just tried building using the refined APIs on YapDatabaseViewTransaction using that one and it still didn't work.

I checked the diff and that commit adds YapDatabase.swift and YapDatabaseQuery.swift (the two I already had), but not YapDatabaseView.swift and YapDatabaseSecondaryIndex.swift. I wonder if there are other missing swift files buried in the project.

robbiehanson commented 4 years ago

Can you give that new commit a try?

MythicLionMan commented 4 years ago

That one fixed it. Thanks!

MythicLionMan commented 4 years ago

New commit fixes issue.