PY-34622 Remove inadvertent caching of SDK roots in VFS listener of changes under them

GitOrigin-RevId: e88ef5d6f5e12fb94ecc39ce3cf35b1f4fb4403b
This commit is contained in:
Mikhail Golubev
2019-07-12 16:04:32 +03:00
committed by intellij-monorepo-bot
parent 9bc6627789
commit 074a5b0e8a
@@ -521,11 +521,11 @@ public class PyPackageUtil {
*/
public static void runOnChangeUnderInterpreterPaths(@NotNull Sdk sdk, @NotNull Runnable runnable) {
final Application app = ApplicationManager.getApplication();
final VirtualFile[] roots = sdk.getRootProvider().getFiles(OrderRootType.CLASSES);
VirtualFileManager.getInstance().addAsyncFileListener(new AsyncFileListener() {
@Nullable
@Override
public ChangeApplier prepareChange(@NotNull List<? extends VFileEvent> events) {
final VirtualFile[] roots = sdk.getRootProvider().getFiles(OrderRootType.CLASSES);
allEvents:
for (VFileEvent event : events) {
// In case of create event getFile() returns null as the file hasn't been created yet