Error "Module must be purged before deleting" after updating dependencies
Hey there, has anyone encountered an issue when upgrading the dependencies where the
mix format command prints out all these errors?
If i disable the Spark.Formatter plugin in formatter.ex they are gone though.
My ash dep was in v3.5.43 so a bit outdated, and this happens when updating all of themSolution:Jump to solution
tried again today and it is working, idk if thats the reason but had come conflicts in my elixir versions between my terminal/vscode so might have been running in 1.18 actually with the new formatter that requires 1.19 🤔
13 Replies
Im running into the same issue. But im not sure if its caused by the Spark plugin
if you comment it out does the issue still happen?
It doesn't always happen for me. With and without the plugin
the inconsistency is weird 🤔 if you try a clean build is it the same? deleting all deps/build directories
After running
mix clean it seems to consistently work without issues
But im mostly getting the errors in CI, where some things might be compiling in parallel so Im suspecting that to be the issueHmm....the spark formatter was changed to do a compile step before hand
But I have no idea why it would be doing that 🙁
Maybe my dev env has some weird configuration? Should i try to make a repro?
On Elixir
1.19.2-otp-28, I get that every time I run the formatter. If I do a mix compile --force, it clears it up.
I wonder if this could be related to the extended compilation parallelization? Mine's set to use all cores. :thinkies:Could be, yeah
I've debugged this a bit. I'm on elixir 1.18.4-otp-28. This is due to protocol consolidation. This is happening on CI here and there (because we cache deps and _build). It fails mix format on CI.
On my laptop, it doesn't fail mix format, but I can realiably trigger this by having
consolidate_protocols: true and then running:
yeah, I need to compile twice to trigger it. I'm still debugging it🤔 what on earf
Solution
tried again today and it is working, idk if thats the reason but had come conflicts in my elixir versions between my terminal/vscode so might have been running in 1.18 actually with the new formatter that requires 1.19 🤔
yeah, i updated ash and spark with the new versions and everything is working (local and CI)
thanks @Zach 🙂