Adds withIncludeSynthToNameHashing.#2540
Conversation
Provides a workaround flag `incOptions := incOptions.value.withIncludeSynthToNameHashing(true)` for name hashing not including synthetic methods. This will not be enabled by default in sbt 0.13. It can also enabled by passing `sbt.inc.include_synth=true` to JVM.
|
Fails with: Assuming this error is fixed, this looks good to me. @eed3si9n, I'm wondering if we could always include synthetic names. I haven't found a good reason to not to include them. What do you think? |
|
@gkossakowski I can flip the switch and have it on by default. I thought we are concerned that changing |
|
So maybe does it make sense to add the possibility to specify the list of names which won't be included? It would be only the half-measure, I think, but it anyway may be worth to have it for the test purposes. |
|
@mpociecha For now let's keep it simple on or off, and we can fine tune this more in sbt/zinc for 1.0, which will have synthetic methods included by default. |
|
Note that including synthetic members is not enough, you should also include synthetic classes (which are currently ignored), consider: case class A(x: Int)
// private object Aobject B {
A(0) // should stop compiling when the private object line is uncommented
} |
|
Forward port in sbt/zinc#110, with a breaking change for 1.0. |
Provides a workaround flag
for name hashing
not including synthetic methods. This will not be enabled by default in
sbt 0.13. It can also enabled by passing
sbt.inc.include_synth=trueto JVM. Ref #2537
/review @Duhemm, @gkossakowski, @dwijnand