Invalid association, not an ecto schema
I'm getting a strange compile error that I can't replicate locally, only in GitHub Actions, I'm on the latest version of everything, ash deps, elixir and erlang.
I'm not sure what would be different in GitHub Actions to cause this, any ideas where to look?
15 Replies
My guess would be that it’s an elixir version thing
What version are you on in CI vs locally?
Both 1.15.2, I noticed it is also happening in docker builds
🤔🤔🤔what about OTP version?
26.0.2, also same on both
Strange
Still can’t reproduce it locally? What if you blow away your build directory locally and recompile?
yep still not happening locally, but even then the error doesn't make any sense, what would trigger that
It would be some kind of compilation order/dependency issue
(not a mix dependency but module compilation dependency)
The ecto schema we build under the hood doesn't think the other resources we add as associations are also ecto schemas for some reason
in case you want to play with it this project is open source https://github.com/michaelst/spendable, seems to be happening consistently in the tests in CI
actually whatever changes I have made in my uuid migration got rid of it...
I'm having the exact same problem and I can't figure out a solution for it. @michaelst can you elaborate more on what you changed?
The error actually came back, I think it is the order like Zach was mentioning
I should have fixed it on latest
ash
I'm not in the latest version, I will try updating it and see if that works
Yep, updating to the latest version fixed it, thanks @Zach Daniel ! @michaelst probably doing the same will fix it for you as-well
Thanks!
Fix or related to https://github.com/ash-project/ash/issues/557?
GitHub
Resources defined within other resources issue Ecto warnings · Issu...
When creating a subresource using an extension, the compiler issues the following warning: warning: invalid association
post
in schema App.Post.Comment: associated module App.Post is not an Ecto ...good call, thats fixed now