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

Set minimum ecto version to 3.12 #148

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

ivanov
Copy link
Contributor

@ivanov ivanov commented Aug 23, 2024

Thank you for working on ecto_sqlite3!

The latest release starts using Ecto.Query.ByExpr which only became available in Ecto 3.12.0, so this simple PR updates the relevant dependency versions. Without this change, on Ecto 3.11, users will get run into an error like this:

==> ecto_sqlite3
Compiling 4 files (.ex)
     error: Ecto.Query.ByExpr.__struct__/0 is undefined, cannot expand struct Ecto.Query.ByExpr. Make sure the struct name is correct. If the struct name exists and is correct but it still cannot be found, you likely have cyclic module usage in your code
     │
 842 │   defp distinct(%ByExpr{expr: true}, _sources, _query), do: "DISTINCT "
     │                 ^
     │
     └─ lib/ecto/adapters/sqlite3/connection.ex:842:17: Ecto.Adapters.SQLite3.Connection.distinct/3


== Compilation error in file lib/ecto/adapters/sqlite3/connection.ex ==
** (CompileError) lib/ecto/adapters/sqlite3/connection.ex: cannot compile module Ecto.Adapters.SQLite3.Connection (errors have been logged)
    lib/ecto/adapters/sqlite3/connection.ex:842: (module)

You probably didn't come across this because ex_doc depends on earmark_parser that pulls in ecto 3.12.

@warmwaffles
Copy link
Member

Bah I knew I was forgetting something when I fixed the 3.12 issue.

@warmwaffles warmwaffles merged commit 7c8e990 into elixir-sqlite:main Aug 23, 2024
13 checks passed
@ivanov ivanov deleted the fix-ecto-dependency branch August 23, 2024 22:47
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.

2 participants