Skip to content

Conversation

rossta
Copy link

@rossta rossta commented Dec 12, 2024

The sqlite3-ruby gem recently published an improvement to make it easier and more flexible to load extensions:

sparklemotion/sqlite3-ruby#586

Ruby modules for SQLite extensions should implement the interface:

interface _ExtensionSpecifier
  def to_path: () → String
end

A complementary change in Rails takes advantage of this interface to integrate the primary configuration file with the new sqlite3-ruby interface for extension loading:

rails/rails#53827

The gem template provided here already has a similar method:

def loadable_path

The change proposed here is to modify the gem template to provide an alias to loadable_path as to_path.

# example
SqliteVec.to_path # => returns same result as loadable_path

As a result of this change, Ruby gems published with this tool will conform to the new interface supported in sqlite3-ruby and Rails.

The sqlite3-ruby recently published an improvement to make it easier and
more flexible to load extensions:

sparklemotion/sqlite3-ruby#586

Ruby modules for SQLite extensions should implement the interface:

    interface _ExtensionSpecifier
      def to_path: () → String
    end

A complementary change in Rails takes advantage of this interface to
integrate the primary configuration file with the new sqlite3-ruby
interface for extension loading:

rails/rails#53827

The gem template provided here already has a similar method:

    def loadable_path

The change proposed here is to modify the gem template to provide an
alias to loadable_path as to_path.o

    # example
    SqliteVec.to_path # => returns same result as loadable_path

As a result of this change, Ruby gems published with this tool will
conform to the new interface supported in sqlite3-ruby and Rails.
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.

1 participant