When collaborating with other developers using a git workflow, .anvil_editor.yaml is becoming painful. It accounts for more merge conflicts than the rest of any code base combined. The diffs are also painful to decipher with multiple uuid entries per line.
What exactly does this file do? Can we always ignore changes? Can we just add it to . gitignore?
If not, can we at least have it in a diff friendly layout?
Ta!
2 Likes
I work (mostly) solo, so it is not a problem for me.
I haven’t tried, so I just don’t know.
Very likely anything I can think think of, you already tried.
And yet, who knows why, here I am…
I’m going to guess that, given that the file starts with a dot and contains the word “editor” and it’s related to what the user does rather than what the app does, I’m going to guess that it’s useless and can be .gitignored.
Well, I lied, I just tried.
I cloned an app, deleted the file and pushed. Everything was working just fine.
After testing the app and the editor on a few forms and modules, I pulled and found out that a new file with new unique ids had been generated.
I tried also adding it to .gitignore, but it keeps showing up anyway.
So deleting it and adding it to .gitignore will not help.
And creating a git hook that deletes it every time will not help either, because it will be created again.
Maybe it manages some caching?
And since it’s user specific, it’s interacting with the browser storage?
2 Likes
Here we go again. The merge conflict from hell.
Even if they were a single line per form, I’d stand some chance.
The good news is that this file can (always!) be ignored at merge time. I’ll see if we can do that “single line per form” thing, though…
Edit: We did the single-line-per-form thing, and it shipped in 2023, so if you’re reading this now your merges should be much simpler. If you’re still experiencing nightmare merges, we’re looking for examples.
4 Likes
Excellent! Thank you - on both counts.