bitwalker / timex_ecto

An adapter for using Timex DateTimes with Ecto
MIT License
162 stars 68 forks source link

Incompatible with Ecto 3.5.5 #85

Open kmacdough opened 3 years ago

kmacdough commented 3 years ago

Adding dependency {timex_ecto: "~> 3.0.0"} creates a dependency conflict:

Failed to use "ecto" (version 3.5.5) because
  ecto_sql (version 3.5.3) requires ~> 3.5.0
  phoenix_ecto (version 4.2.1) requires ~> 3.0
  timex_ecto (versions 3.2.1 to 3.4.0) requires ~> 2.2
  mix.lock specifies 3.5.5

Attempting to bypass this conflict with {ecto: "~> 3.5.5", override: true} generates the following error:

== Compilation error in file lib/types/date.ex ==
** (CompileError) lib/types/date.ex:58: Ecto.Date.__struct__/0 is undefined, cannot expand struct Ecto.Date. 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    
    lib/types/date.ex:58: (module)
could not compile dependency :timex_ecto, "mix compile" failed. You can recompile this dependency with "mix deps.compile timex_ecto", update it with "mix deps.update timex_ecto" or clean it with "mix deps.clean timex_ecto"
kmacdough commented 3 years ago

I take it back, I overlooked the "NOTE" in the README.md

deps snippet in both the timex & timex_ecto README (and therefore the hex docs) are outdated. Updating these would help avoid similar confusions about the current version.

kmacdough commented 3 years ago

Re-opening this after having to go on a longer discovery journey. The a path answer is contained in https://github.com/bitwalker/timex_ecto/issues/80, but there is no reference included in the README. @bitwalker mentions not having time for a guide (which is fair) but at least a link from the README to the closed issue would send people on the right track.

angeleah commented 3 years ago

I think just adding "timex_ecto is no longer need in Ecto 3." in the README would save people newer to Elixir / Ecto a lot of time.