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

Not compatible with Ecto 3.9 #153

Open
drewble opened this issue Feb 16, 2023 · 1 comment
Open

Not compatible with Ecto 3.9 #153

drewble opened this issue Feb 16, 2023 · 1 comment

Comments

@drewble
Copy link

drewble commented Feb 16, 2023

ecto_adapters_dynamodb 3.3.3 specifies a dependency on ecto_sql ~> 3.6 but I could not get it to work with ecto_sql 3.9.2 and ecto 3.9.4.

On ecto.migrate it would fail with this error

** (Protocol.UndefinedError) protocol Jason.Encoder not implemented for {:schema_migration, true} of type Tuple, Jason.Encoder protocol must always be explicitly implemented. This protocol is implemented for the following type(s): Airbrake.Payload, Any, Atom, BitString, Date, DateTime, Decimal, Ecto.Association.NotLoaded, Ecto.Schema.Metadata, Float, Integer, Jason.Fragment, Jason.OrderedObject, List, Map, NaiveDateTime, Time
    (jason 1.4.0) lib/jason.ex:164: Jason.encode!/2
    (ex_aws 2.4.1) lib/ex_aws/request.ex:17: ExAws.Request.request/6
    (ex_aws 2.4.1) lib/ex_aws/operation/json.ex:50: ExAws.Operation.ExAws.Operation.JSON.perform/2
    (ex_aws 2.4.1) lib/ex_aws.ex:85: ExAws.request!/2
    (ecto_adapters_dynamodb 3.3.3) lib/ecto_adapters_dynamodb/query.ex:803: Ecto.Adapters.DynamoDB.Query.fetch_recursive/6
    (ecto_adapters_dynamodb 3.3.3) lib/ecto_adapters_dynamodb.ex:268: Ecto.Adapters.DynamoDB.execute/5
    (ecto 3.9.4) lib/ecto/repo/queryable.ex:229: Ecto.Repo.Queryable.execute/4
    (ecto 3.9.4) lib/ecto/repo/queryable.ex:19: Ecto.Repo.Queryable.all/3

Downgrading to ecto_sql 3.8.3 and ecto 3.8.4 resolved this issue. ecto_adapters_dynamodb should either resolve this issue with ecto_sql 3.9.4 or specify a dependency ecto_sql >= 3.6.0 and < 3.9.0.

@drewble drewble changed the title Migrate fails on encoding error Not compatible with Ecto 3.9 Feb 16, 2023
@bernardd
Copy link
Member

Thanks @drewble, and sorry for the delay getting back to you. I was kind of passingly aware of this issue, but hadn't really dug into it to check exactly what version limitations need to be imposed. I'll add those when I got a chance.

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

No branches or pull requests

2 participants