stevedlawrence commented on a change in pull request #48: Added noEmptyDefault
warning ID so we can suppress for NACHA.
URL: https://github.com/apache/incubator-daffodil/pull/48#discussion_r171105457
##########
File path: project/Dependencies.scala
##########
@@ -18,7 +18,15 @@
import sbt._
object Dependencies {
- lazy val common = core ++ infoset ++ test
+
+ // Note cli added to commmon on purpose.
+ // Due to some obscure bug, updateClassifers was not pulling the
+ // dependencies for the daffodil-cli module into lib_managed properly.
+ // (It found the source jars and javadoc jars, but not the regular code jar
for
+ // Scallop aka org.rogach.)
+ // So compilation would fail for daffodil-cli from missing org.rogach
library.
+ // Added to here forces these dependencies to be resolved.
+ lazy val common = core ++ infoset ++ test ++ cli
Review comment:
So I'm pretty sure this is a bug with SBT. The steps I've found to reliably
reproduce this:
```bash
git clean -xdf
sbt daffodil-cli/compile # compiles all sources, including daffodil-cli
sbt clean # cleans everything except daffodil-cli subproject (since we don't
aggregate it)
sbt updateClassifiers daffodil-cli/updateClassifiers # update classifiers,
note this does not download cli dependencies (sbt bug?)
sbt daffodil-cli/compile # fails due to missing cli dependencies
```
I suspect the issue here is that ``sbt clean`` empties the lib_managed
directory. But daffodil-cli thinks the lib_managed directory is up to date
since daffodil-cli was never cleaned. Since daffodil-cli thinks lib_managed is
correct, it doesn't pull the dependencies in lib_managed, resulting in a
failure of missing dependencies. I've confirmed this issue exists with sbt
1.1.1, so an sbt update won't help. This feels like a bug in sbt, but a
workaround is to just run ``sbt daffodil-cli/clean`` after running ``sbt
clean``. This removes the daffodil-cli state that thinks lib_managed is correct
and causes it to pull dependencies. I've confirmed that the above works if I
insert that command.
If the ``sbt daffodil-cli/clean`` solution seems reasonable and works for
you, I'd prefer to revert this change and not have the CLI be a dependency of
everything (for example, there's no reason to pull in CLI stuff when using the
JAPI). Or alternatively, just never use sbt clean and instead use ``git clean
-xdf`` and just be careful to make sure all untracked files that are needed are
committed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services