Incremental compilation does not work if modified code is imported from a module that exported said code from elsewhere

I am not sure if this should have gone to the user group or not, but since this seems to be a bug of sorts…

I am having these incremental compilation issues (very frequently) that force me to manually delete my bloop folder in order for bloop/sbt to compile.

Development is really hindered at this point. I am not sure how to proceed forward to improve this situation, and I am already many months in this Scala code base, quite the investment.

I have opened a ticket, which could not be reproduced, and also posted a video describing and showing the problem.

Any advice would be appreciated. Thank you!

Pedro

I see you mentioned in the issue you should be able to share a git repo reproducing the issue, that should really help get to the bottom of this. Meanwhile, I would recommend dropping the use of export on objects and replace it by extra import at use-sites instead. While it’s tempting to use export like this, it has some known issues which are still being worked on: Fix #17201: do no call ensureCompleted for import symbol by dos65 · Pull Request #17304 · lampepfl/dotty · GitHub

1 Like