Closed jayvdb closed 1 year ago
The real issue here is that the migration type resolution is relying on the proc macro, which sees only the AST and not the type system. So when it sees a type identifier, it sees the path segments that are in the AST, not the actual type, meaning that chrono::DateTime
and DateTime
(after use chrono::DateTime
) are not the same! The latter was getting accepted and the former is not. I'm putting out a change to make this slightly more flexible, but this type of issue is the biggest reason I want to move migration generation from proc-macro time to something triggered by the butane
cli command. I've started working on that in the branch migration_v2
(but as I mentioned on the other PR, my progress has been slow)
https://github.com/Electron100/butane/issues/19 added support for
chrono::DateTime
.It looks like
chrono::naive::NaiveDateTime
has some implementation inbutane_core/src/db
which does not yet exist forchrono::DateTime
, so I will see if I can add it.We also need to work out how to ensure the tests catch this in future.