Closed guizmaii closed 3 years ago
I may have fixed the problem with this commit: https://github.com/ghostdogpr/caliban/pull/1037/commits/64ddaeb9cf9321ba416805f0918977182f37c59d
In this commit, I change two things:
effectBlocking
.The future will tell us if these changes are enough. For now, I'm not able to reproduce the error anymore neither on my local Mac nor in my VM running Windows 7.
Should sbt recover and try to fsync
the file (and/or its parent) before failing to make it more robust, maybe?
For reference, see:
The commit in my previous message doesn't fix the issue. š
Thanks for the report! last caliban-clients / Compile / compileIncremental
might give you a stack trace, which might give us more information.
Exactly the information I needed I think @eed3si9n! Thank you so much! šāāļø
I'll give a try later when I have some time.
Bug found.
Obviously, it was my fault, not Scala nor sbt's fault:
I was effectively asking to Scala to compile a directory:
[warn] ctCalibanClient - res: Vector(/home/runner/work/poc_compile_time_caliban_client_generation/poc_compile_time_caliban_client_generation/modules/caliban-clients/src/main/scala/poc/caliban/client/generated/posts/splitted, /home/runner/work/poc_compile_time_caliban_client_generation/poc_compile_time_caliban_client_generation/modules/caliban-clients/src/main/scala/poc/caliban/client/generated/posts/CalibanClient.scala)
The fix: https://github.com/ghostdogpr/caliban/pull/1037/commits/1ca081b2964abefedb1f263b159ae1a751f9f911
Thanks for your help! š Sorry to have wasted your time. š Jules
the error message could be better, though!
steps
problem
When compiling my sbt project, I have non-deterministic error:
On Mac/Linux:
On Windows:
notes
The
modules\caliban-clients\src\main\scala\poc\caliban\client\generated\posts\splitted
directory is generated by some code that I call in the plugin I'm working on, see: https://github.com/ghostdogpr/caliban/pull/1037But the error happen after we finished generating all files and happens in a non-deterministic way š¤
It could be because the filesystem buffer is not yet written to the disk (or something like this) so when sbt tries to read the generated directory, it's not yet present on the disk, maybe. WDYT? š¤