Often when compiling my project it'll fail with an intellij virtual filesystem error. It's either one of the 2 following errors:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':common:generateIosMainDatabaseInterface'.
> Duplicate registration for EP: com.intellij.virtualFileSystem: original plugin null, new plugin null
or
* What went wrong:
Execution failed for task ':common:generateIosMainDatabaseInterface'.
> @NotNull method com/intellij/openapi/vfs/VirtualFileManager.getInstance must not return null
Unfortunately retrying often doesn't even work, the task completes sucessfully but the build/sqldelight folder is empty and the rest of the project won't compile. The only way to get it working again is to make a change to one of the .sq files - I'm assuming there's some sort of caching problem going on.
I can't reproduce it reliably but it does seem to happen more often after making a change to one of the gradle files, syncing with Android Studio, and then running a build from the command line.
Any idea of what could be causing this?
you can solve this by using the --no-parallel flag or using a snapshot version of sqldelight
(if you use a snapshot version that would be immensely helpful, theres no reliable way to repro so just getting more people who've experience the issue to try it out before releasing would be awesome)
Thanks, snapshots seem to be working great so far! I'll let you know if it comes up again.
We've been occasionally seeing the latter failure on version 1.2.0:
[2019-09-27T19:52:26.144Z] * What went wrong:
[2019-09-27T19:52:26.144Z] Execution failed for task ':pending-actions:generateInternalReleaseMainDatabaseInterface'.
[2019-09-27T19:52:26.144Z] > @NotNull method com/intellij/openapi/vfs/VirtualFileManager.getInstance must not return null
(We are using org.gradle.parallel=true.)
Yea I've been seeing it too locally, looks like this isn't fixed yet
theres a gradle api coming down the pike for the idea of a shared resource, I think I'll try using that for this
Still an issue on sqldelight 1.3.0
There is a similar issue about with the same error message on Kotlin tracker but looks that it fixed (at least on level of Idea plugin)
https://youtrack.jetbrains.com/issue/KT-23694
Should it be reported to JetBrains? Or there is some ideas how it can be fixed in sqldelight?
alright, another round of attempted fixes in 1.4.4, normally i say i feel pretty good about it and it doesnt work so this time i feel terrible about it, no chance of it working
Most helpful comment
Yea I've been seeing it too locally, looks like this isn't fixed yet
theres a gradle api coming down the pike for the idea of a shared resource, I think I'll try using that for this