scalapb/ScalaPB

Custom target directory breaks incremental compilation

Closed this issue · 2 comments

  1. Clone this repo: https://github.com/oscar-broman/scalapb-issue-1561
  2. Run sbt compile - that should compile just fine
  3. Run sbt compile once more - now an error should occur

Note that the only special thing about the repo is this line.

I was able to reproduce. The error I am seeing is:

test.proto:3:1: Import "scalapb/scalapb.proto" was not found or had errors.

From initial investigation, it looks like protocUnpackDependencies either doesn't extract or immediately deletes scalapb.proto. It would be great if someone can continue to investigate.

Apologies! I left a trailing comma.

However, after some investigation, it seems that the way I set the target breaks something.

This commit fixed it: oscar-broman/scalapb-issue-1561@d548a84