Not resolved symbols when files are not a part of module

Issue #1421 resolved
Roman Prytkov created an issue

Hi Scott,
I started to use new version of IC and found, that it can not resolve symbols if they are in files that are not in current module (see screenshot). I was surprised, re-created OST - the same problem. I retrieved the missing file from org and problem was gone. But, when I removed this file from module, problem appeared again. But OST is updated from org, not from local files and it should not depend on the presence of symbol in local files.

Comments (11)

  1. Scott Wells repo owner

    Hi, Roman. OST generation can be affected by whether you have files locally. If you have an Apex class in the local project, no stub will be generated in the OST; if you don't have it locally--and it's an accessible symbol (at least protected in the same namespace, else global), a stub will be generated in the OST. Either way, though, I wouldn't expect a symbol to be unresolvable. After you remove the file from the local project did you update your OST?

  2. Roman Prytkov reporter

    Hi Scott,
    The update of OST did not help. I tried to install the previous version of IC - the same problem with unresolved symbols. Update of OST also did not help again. I will try to de-install IC plugin and install it again.

  3. Roman Prytkov reporter

    Re-installation of the latest version did not help. The workaround for me now is to retrieve locally the class files where symbols defined. But it was not necessary before - locally unresolved symbols were taken from OST.

  4. Scott Wells repo owner

    Roman, do you mind enabling debug logging for OST generation:

    then please remove one of those classes locally and regenerate your OST. Once that's done please email the resulting idea.log* files (Help>Show Log in Explorer/Finder/Files) to me and let me know the name of the specific class. I want to see why it's not ending up in the OST.

  5. Scott Wells repo owner

    I just responded. It appears that you have an incompatible JetBrains plugin installed that's causing the issue. Please disable or uninstall JetForcer if you'd like to use IC. Let me know if that doesn't resolve the issue for you.

  6. Scott Wells repo owner

    Hopefully the feedback I've provided will help address the issue. If not feel free to reopen with new logs.

  7. Scott Wells repo owner

    I replied directly, but it looks like you need to rebuild your caches/indices completely using File>Invalidate Caches / Restart. Please let me know whether that helps resolve the issue or not.

  8. Roman Prytkov reporter

    Final resolution after our discussion in mails:

    You showed me, that IDEA could not enumerate its own storage - it showed it corrupted. I remembered from my experience that IDEA had a problem with folder names containing spaces - compare directory did not work with it. And exactly in this project, I have path containing spaces:

    "<some path>\ALL SRC".
    I changed "ALL SRC" to "ALL_SRC" and re-opened project.
    Indexing and OST generation passed OK. Running of tests also was fixed.
    The source file, excluded from the module was found in another folder in the whole project folder and symbol was resolved.

    The problem resolved. DO NOT USE SPACES IN YOUR PROJECT PATHS.

  9. Log in to comment