asg017 / sqlite-vss

A SQLite extension for efficient vector search, based on Faiss!
MIT License
1.59k stars 59 forks source link

Include version file for Elixir binding #48

Closed gworkman closed 1 year ago

gworkman commented 1 year ago

Hi! love this library, I discovered it last week and had my eye on the elixir bindings PR. Was happy to see it was merged in an uploaded to hex this morning, so I tried it out.

Unfortunately, it wasn't working for my project. For the Hex release, it only uploads the contents of the ./bindings/elixir directory, and that is all that is pulled down to my local machine when I add it as a dependency. See the photo of my deps folder:

Screenshot 2023-06-06 at 10 15 11 AM

In the mix.exs file, it's trying to read the current version of the project from the top level VERSION file using the path ../../VERSION, but this file doesn't exist because Hex only includes the sub-directory.

I just quickly put together this PR - I added a VERSION file in the bindings/elixir folder, I updated the mix.exs file so it reads bindings/elixir/VERSION file, and I updated the GitHub actions so that it copies the latest VERSION file from top level to the bindings/elixir folder on release. I tested the changes in mix.exs and the bindings/elixir/VERSION file and it works perfectly. I'm not sure how to test the small change in the GitHub action, since it is for uploading to Hex.

There's probably a better way to do this, so definitely open to suggestion here :)

Let me know if I can help!

asg017 commented 1 year ago

Thank you for the quick fix @gworkman ! I'm going to merge this and create a new v0.1.1-alpha.18 release shortly.

asg017 commented 1 year ago

Hey @gworkman , just published 0.1.1-alpha.19, which includes the VERSION file, can you give it a try to see if it's fixed on your end?

gworkman commented 1 year ago

Thanks @asg017! I can confirm, it is working perfectly now :)