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

Fix Ecto 3.0 warnings #103

Merged
merged 3 commits into from
Nov 18, 2018
Merged

Fix Ecto 3.0 warnings #103

merged 3 commits into from
Nov 18, 2018

Conversation

dbernheisel
Copy link
Contributor

@dbernheisel dbernheisel commented Nov 8, 2018

Fixes #102. Related #98 #99 #101. Same work is done in #101 and #99, except this PR doesn't bump the ecto requirement or use the formatter.

I didn't find it necessary to update the project's Ecto requirement. This should continue to work fine with Ecto 2.x, as well as silence the errors emitted with Ecto 3.x. I've tested this locally.

Sidenotes:

  • Also suppressed logs when running tests. I'd be happy to assert the log output if that's the intention. Otherwise it was only polluting the stdout when running tests.

@@ -18,7 +18,7 @@ defmodule Arc.Ecto.Schema do
end

# Cast supports both atom and string keys, ensure we're matching on both.
allowed = Enum.map(allowed, fn key ->
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this reassigned the keys passed in from cast_attachment() which are atoms.

@williamweckl
Copy link

I opened an issue at arc repository about the error logs.
stavro/arc#268

Do you think this PR will solve it too?

By the way, thanks for the amazing job!

@dbernheisel
Copy link
Contributor Author

@williamweckl if you mean that while running your app tests, it throws {:error, :invalid_file} into stdout, then no, this PR does not fix that. This only fixes arc_ecto's tests when running mix test for this library.

@nkezhaya
Copy link

Any chance this gets merged soon? Has the project been abandoned?

@stavro stavro merged commit 98d5b6c into stavro:master Nov 18, 2018
@dbernheisel dbernheisel mentioned this pull request Nov 30, 2018
novaugust pushed a commit to GetThru/arc_ecto that referenced this pull request Apr 1, 2019
Fix Ecto 3.0 warnings
 Conflicts:
	mix.exs
	test/schema_test.exs
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.

4 participants