lightbend-labs / dbuild

Multi-project build tool, based on sbt.
https://lightbend-labs.github.io/dbuild
Other
83 stars 14 forks source link

degrade to warning missing excluded projects #216

Closed andreaTP closed 5 years ago

andreaTP commented 5 years ago

The rationale behind this is that any evolution to a library that involves "more modularization" will fail and will require extra effort to be maintained.

In my experience often happen that a library get splitted in several modules while growing. Currently Dbuild does not support this kind of pattern in a back-compatible manner, having this error degraded to a simple warning will facilitate this use-case and has AFAICS no huge drawbacks.

cc. @eed3si9n @cunei #211

cunei commented 5 years ago

The counterpoint to making this a warning is that a misspelt subproject name would cause compilation to blissfully proceed, skipping the intended subproject, rather than aborting. Because of that reason, I don't think this should be unconditionally turned into a simple warning. I'd rather add a "strict" flag, which defaults to true, or even better address it together with #211, solving two problems at once.

cunei commented 5 years ago

Incidentally, you looked at the wrong file; you wanted this line: https://github.com/lightbend/dbuild/blob/1f7aededaa2a090c880192406a6b3e8164d3e487/plugin/src/main/scala/com/typesafe/dbuild/plugin/DBuildRunner.scala#L79

andreaTP commented 5 years ago

a misspelt subproject name would cause compilation to blissfully proceed

I understand, of course that is a minor drawback IMHO, since we are not causing true negative or false positive we simply end up having "slightly misconfigured" configuration.

andreaTP commented 5 years ago

Targeted also the other occurrence you correctly mention @cunei ! Thanks! :smile:

cunei commented 5 years ago

Closed in favor of https://github.com/lightbend/dbuild/pull/217

andreaTP commented 5 years ago

:+1: