Spent about five hours trying to figure out why the project won't build. In one branch it built fine, worked calmly in another, added one not very big commit on top and that's it, won't build. It was building during the process, and after some next change it stopped.
And it doesn't build nicely. The Kotlin compiler just complains about code that's not related to these changes, like it doesn't see some functions and classes. IDE sees them, but the compiler lost them. Zero information about the root cause.
Out of desperation, tried all the advice from the internet, not one brought me to the goal. Went through all the changes with my eyes several times. Well, there's nothing that scary there, there isn't.
Then I just create another branch, cherry-pick the same commit into the new one, and everything builds. Nothing changed. Well, except the commit hash and branch name. The code is absolutely the same in the end.
And what was that? Some cache that I never managed to delete? Whose cache was it? Why did this cache somehow depend on the branch/commit? I don't know.
Anyway, went through the whole standard scheme. First didn't understand why the code doesn't work, now don't understand why it works. A regular day in the life of a programmer, yeah. 😰