What's Changed
Ruby 4.0 Compatibility
- Upgraded
magnusfrom 0.7 to 0.8 andrb-sysfor Ruby 4.0 support - Migrated from deprecated Magnus APIs (
magnus::exception::*,Symbol::new,into_iter) to new Ruby-handle-based APIs (ruby.exception_*,ruby.to_symbol, index-based array iteration)
Major Dependency Upgrades
- Upgraded Lance from 0.31 to 3.0
- Upgraded Arrow from 55 to 57
- These upgrades fix a CI recursion limit error and align with the latest Lance ecosystem
New Features
Dataset.open_or_create: Safely open an existing dataset or create a new one, with intelligent handling of existing files, non-dataset directories, and anoverwritemode- Dynamic schema introspection:
Dataset#schemanow reads and returns the actual schema from the Lance dataset instead of a hardcoded placeholder, including vector column dimension info - Arrow DataType to Ruby mapping: New
datatype_to_ruby_stringhelper provides clean Ruby-friendly type names for all supported Arrow types - Improved
#countmethod: Now properly delegates toEnumerable#countwhen a block is given, while using the efficientcount_rowsfor the no-argument case
Bug Fixes & Safety
- Added array bounds checking in
convert_batch_to_rubyto prevent potential segfaults - Added vector dimension validation to detect data corruption early
open_or_createsafely fails when a non-dataset directory exists at the given path- Fixed
create_vector_indexandcreate_text_indexreturn type handling (.map(|_| ()))
Infrastructure
- Added CI workflow with GitHub Actions
- Added automated release workflow for gem publishing
- Added Dependabot configuration for GitHub Actions and Rust dependencies
- Moved repository from
cpetersen/lancelottoscientist-labs/lancelot - Removed
Gemfile.lockfrom version control - Bumped
actions/checkoutfrom 3 to 6 andactions/cachefrom 3 to 5
Test Suite
- Added comprehensive dataset specs (499+ lines) covering CRUD operations, schema handling, vector search, text search, filtering, and edge cases
- Updated specs for Ruby 4.0 compatibility
Pull Requests
- Bump actions/checkout from 5 to 6 by @dependabot in #10
- Bump actions/cache from 4 to 5 by @dependabot in #11
- Upgrade magnus and rb-sys for Ruby 4.0 compatibility by @cpetersen in #13
- Add release workflow for automated gem publishing by @cpetersen in #12
Full Changelog: 0.3.0...0.3.5