Closed stukalin closed 3 years ago
com.emberjs.index.EmberNameIndex:
AFAIU it depends on directory structure/contents by checking containing directory of currently indexed file to contain package.json
file (com.emberjs.utils.VirtualFileExtensionsKt#getParentEmberModule
) and then using data from it (com.emberjs.resolver.EmberName.Companion#from(com.intellij.openapi.vfs.VirtualFile, com.intellij.openapi.vfs.VirtualFile)
)
this violates contract as described here https://plugins.jetbrains.com/docs/intellij/file-based-indexes.html#implementing-a-file-based-index:
The data returned by DataIndexer.map() must depend only on input data passed to the method, and must not depend on any external files. Otherwise, your index will not be correctly updated when the external data changes, and you will have stale data in your index.
I assume that's the reason all tests force explicit re-index, otherwise indexed test data will be stale or not present
[TBC]
@YannCebron any suggestions on how else to implement this? it had been working quite well this way until now 😅
@Turbo87 I've pinged colleagues about it, will update ASAP
Issue has been resolved on Ember plugin side, I think this issue can be closed.
I want to upgrade the platform of the Ember.js plugin to 2021.2 but when I do that some of the tests start to fail. Namely the ones which which use the
FileBasedIndex.getAllKeys()
method.I use the v1.1.4 of the gradle-intellij-plugin.
Here's my log for a failing test
and the corresponding standard error
And this is what I have as std output if I simply change the platform version back to 2021.1
Just wondering if you guys can spot anything unusual. My understanding is that this
UnindexedFilesUpdater
works a bit differently because it gives different output.