Hi, I've been working on a scala project on IntelliJ for a while. Recently, it started showing me import errors. The thing is, when I call something I haven't imported yet, Intellij will suggest me the import (it's usually correct), but if I pick it (Alt+Enter), the added import will be considered an error.

Also, scrolling to the top of the file is sometimes erratic: I scroll, but Intellij keeps scrolling back down of a few lines.

I tried going up with the cursor, but same thing: if i try going down one line, the cursor will be put back on the line above.

This is a recent issue, but this is getting really annoying and painful to work with.

I would send a video if I could.

Has anyone noticed the same thing ? Is there something wrong on my side ?

I have IntelliJ Ultimate 2018.1, and I work on Ubuntu.

Note: the code still compiles, and works, so I don't understand why I'm seeing these errors. I'm afraid I'm missing some other errors because of this, which could cause other issues I'm facing at runtime.

I don't know whether this is applicable to Scala projects (I don't use them myself): in Java, if you have modules with inter-dependencies, you might have to tell one of the 'base' modules to export a dependency so that dependent modules can see it as well. Hope that helps.

Thank you both. I have tried Andrey's suggestions but to no avail. I would attach videos/logs, but this is work code, and I'm not sure I can post videos/iamges/log of it here. It's getting worse, as now, I can't comment/delete an import statement without intellij re-adding the line I just deleted automatically. This is getting in the way of my work, and I'm paying to use IntelliJ.

What could be causing this ? Could I have done something (bad file namings, etc) that could cause such a weird behaviour ?

It was getting difficult to work with, now this is just becoming impossible (my code won't compile with the import statement I'm desperately trying to delete).

Hi Andrey, Yes, I did have this ticked. I went and disabled it. I removed the line, just to see if I could. I got the correct import bubble suggestion from IntelliJ, and hit Alt+Enter. Now, I tried to compile, but despite IntelliJ suggesting me this import (import com.stratio.receiver.RabbitMQUtils, it's also in my list of external libraries) and not showing me an error, the compilation fails, telling me it can't find this library (sbt assemly command).

Also, this isn't a class I had been working on. It just started giving me an import hard time, and now sbt compile fails.

I should mention, I'm coding locally, pushing the code to a remote maching, and sbt assembing there. This has been working for a really long time, I'm not modifying the code on the remote machine, just pulling and sbt assembling there. Both local/remote machines have the same sbt/scala versions.

I'm just trying to understand why IntelliJ suddenly started erroring everywhere. I've been using IntelliJ for a while, and it just started erroring recently, so I'm guessing I've done something wrong. I just have no idea what to look for, any suggestion is welcome.

If the project can be built from command line by SBT - it should help to completely re-import it selecting the main build.sbt file and to overwrite existing project configuration files in import project dialog. Also try disable 3rd plugins if you have installed any (besides Scala plugin).

I'm putting a small portion of the logs here, where I saw a couple of errors, in a file where, despite being at the right level and not having issues before, I now have import errors (cannot resolve symbol). I tried rebuilding the package, unsuccessfully. I'm seeing this (some errors, indexing issues and python is mentionned): Note: the code compiles.