DEV Community

Rytis
Rytis

Posted on

How I Fixed IntelliJ Build Problems After MacOS Update

Backstory

Feel free to skip this section if you don't care for a short story. There's a tl;dr; at the bottom.

I came back to work after my vacation, fired up IntelliJ, punched in a few lines of code, compiled my Spring project, and... nothing changed. No errors, everything compiled and ran perfectly.

At first I thought that this was cache related, even though I was doing http requests through Postman. So I entered a few logging lines on startup and tried again just to find that they too were not shown.

I then tried to do a Build > Rebuild Project and got an error saying something along the lines of Could not get UNIX mode on /ProjectDir/build/File.class. File does not exist. It was then that I realized that there was something wrong with build folder access.

How I Solved It

Since build folder is generated automatically I simply deleted it for the offending submodule. When I tried to rebuild the project, another submodule that previously compiled now showed different errors.

I remembered that during my vacation I upgraded MacOS to the newest version and the update probably messed with the user or permissions or something along those lines.

So I just deleted build and out folders for all the submodules, rebuilt the project successfully and voila - all was good and I started seeing the changes I've made.

Moral of the story - delete generated folders after OS upgrade, just in case.

TL;DR;

After upgrading to the latest MacOS, new changes to my Java code didn't make it into compiled version. I fixed it by deleting generated build and out folders for every submodule.

Top comments (0)