-
Notifications
You must be signed in to change notification settings - Fork 207
Description
Given Project B depends on Project A. If my client sends compile requests in order, e.g.
- Compile A
- Wait for compile response
- Compile B
The compilation will fail [incorrectly] in a way that clearly shows something wrong with the classpath from A. The two failure modes I've seen are:
- Null pointer exception in scalac looking at the classpath directories
- Simple compile error that shows something is missing (e.g.
foois not a member ofBarwhereBarcomes fromAandfoois definitely avalon the class)
Now this doesn't happen for most things, but does happen consistently in a very large codebase with lots of build units.
A similar issue I'm seeing that happens much more frequently is if we issue the compile requests out-of-order. I can't be sure it's the same issue but the errors manifest in similar ways so I assume this is just a quicker way to hit the same problem:
- Compile B
- Compile A
If I just compile B, it compiles both no problem, but sometimes (reproducibly in my code base but not on every pair of dependent projects) following up quickly with the request to compile A will cause the B compilation to fail with an error suggesting that A is missing from the classpath (or at least is partially missing).
Other potentially relevant information:
- I use incrementing TaskIds for each request with no parent ids (I don't yet understand what the child-parent relationship is for)
- I use different OriginIds for each request
I'm trying to debug to get more information and reproduce on a smaller, open-source code base. Will report back with anything I figure out.
Note that for each of these if I reissue the Compile B request after the initial failure, it will compile successfully. I think there's something going on with Bloop moving or deleting the classes of A while B is compiling.