Skipping a doc phase should result in transitive deps being skipped as well.

Review Request #1011 — Created Sept. 10, 2014 and submitted

stuhood
pants
0cfab13...
pants-reviews
areitz, johanoskarsson, jsirois, zundel

When --doc-javadoc-skip or --doc-scaladoc-skip are passed to a transitive publish, products generated by those goals will not be available, and should not be depended on in the Ivy javadoc configuration that JarPublish generates. Otherwise, Ivy will fail to resolve the transitive javadoc configuration during publishing.

  • Expand existing targets to test transitive publishing of java/scala
  • Simplify to-string for jar_coordinate of pushdb entries
  • Don`t request docs unless they are available for all transitive targets

new test, and manual publishing with --doc-scaladoc-skip and --doc-javadoc-skip

  • 0
  • 0
  • 0
  • 1
  • 1
Description From Last Updated
AR
  1. Ship It!

  2. 
      
ZU
  1. 
      
  2. I'm not that familiar with this part of the code, but in create_doc_jar() below it says to request docs if either java or scala docs are present (not both)

    1. In fact - the old condition is enough IIUC - doc_jar will be None unless self._java_doc(target) or self._scala_doc(target)

    2. The old condition was not enough... if either phase was skipped, the transitive internal deps of this target might not have been created. The error exhibited on mixed scala/java dep graphs like the test case covers.

      I think that technically the right way to do this would be to walk the transitive deps and see whether any of them were not providing either scala/java docs... will try to adjust to that pattern.

    3. But the flag(s) are global - transitive walks should not be needed (understood they really are - I think I understand what folks were doing / the bug report you must have got). I think the real problem is that there are 2 flags instead of one. Someone publishing just wants to say no doc - period. Fixing this arrangement though will require more work than can be bitten off in a single RB.

    4. So... you're agreeing this is the right fix then?

    5. Or should I explicitly check the flags?

    6. Checking the flags in another task would just make this tangle worse. Your fix, or a fix that raises unless there are 0 doc products or complete products - which would be forward-compatible with the real fix, are fine. It would be great to have some TODOs/comments that call the shot though.

    7. Ok, opened https://github.com/pantsbuild/pants/issues/568 about this, and linked it to Andy's issue which will give us a well defined place to optionally enable docs.

  3. nit: convert to python 3 .format() notation when you change strings using % style formatting.

  4. nit: use python 3 .format() style formatting.

  5. nit: use sphynx :param: notation (i know this is just test code)

  6. 
      
JO
  1. 
      
  2. Should we break this example out into a testproject/ one instead? Assuming these are referenced in the docs somewhere?

    1. Johan has said that he will do this move on https://rbcommons.com/s/twitter/r/994/ , which it looks like I will be beating in.

  3. 
      
ST
ST
JS
  1. I don't really agree with the issue, but I commented there.

  2. 
      
ST
Review request changed

Status: Closed (submitted)

ZU
  1. 
      
  2. nit: one newline between method defs.

  3. 
      
Loading...