move the publish-extras-task doc to its own page. mention repo in register.py

Review Request #1090 — Created Sept. 30, 2014 and submitted

lahosken
pants
602
3f5102d...
pants-reviews
areitz

moved some info around in hopes folks can find it more easily
mention repo-in-register.py

before:
setup_repo had some info about setting up publishing, but the publish page didn't link to it.
setup_repo didn't mention something new and important: setting up a repo in a plugin/register.py
publish page had a section about setting up an extras-with-publish task

after:
link to setup_repo's publish section from the publish page
mention repo-in-register.py in setup_repo
mv 'extras-with-publish task' to its own page, linked from setup_repo



  • 1
  • 0
  • 6
  • 0
  • 7
Description From Last Updated
This needs to match <url name block in pants-support/ivy/ivysettings.xml. Do we mention this xml file anywhere in the docs? AR areitz
LA
AR
  1. 
      
  2. src/python/pants/docs/publish.rst (Diff revision 1)
     
     
     
     

    This is the same text as on lines 43 - 45. Why is it repeated?

    1. No good reason. I'm hoping that some lovely person will say one of...

      (a) this blurb belongs at the top, remove the bottom one.
      (b) this blurb belongs at the bottom, remove the top one.
      (c) the bottom one should be different, it should...
      (d) whatevs.

    2. I'd vote for removing the top-most one (line 43)

  3. 
      
AR
  1. I think I have this working in a branch in the birdcage, so if you want to see this all wired up, ping me and I'll show you where the code is.

  2. src/python/pants/docs/publish.rst (Diff revision 1)
     
     

    This needs to match <url name block in pants-support/ivy/ivysettings.xml. Do we mention this xml file anywhere in the docs?

  3. src/python/pants/docs/publish.rst (Diff revision 1)
     
     

    If this is actually in a file called BUILD at the root, the address would be //:netrc

  4. src/python/pants/docs/setup_repo.rst (Diff revision 1)
     
     
     
     

    Now that I've actually gotten this to work... I have notes!

    • The name of the Repository object must match the name of the hash in pants.ini ("resolver" in the example above)
    • The string that is registered as an object in register.py BuildFileAliases.create is registered as a global symbol, available in all build files. Thus, in the "provides" in a BUILD file, this token should be used unquoted, as if it were a python variable (because it is)
    • There should only be one register.py in your pants plugin. If you have multiple plugins, they all have to register in one file.
  5. src/python/pants/docs/setup_repo.rst (Diff revision 1)
     
     
     

    Maybe this is where you can emphasize that it's a python object, not a string.

    Also, if you get an error saying that the symbol isn't found, then there is something wrong with your plugin -- it hasn't properly registered in BuildFileAliases.create()

  6. 
      
LA
LA
AR
  1. 
      
  2. src/python/pants/docs/setup_repo.rst (Diff revision 3)
     
     

    nit: path should be in monospace font?

  3. src/python/pants/docs/setup_repo.rst (Diff revision 3)
     
     

    s/rep/repo

  4. src/python/pants/docs/setup_repo.rst (Diff revision 3)
     
     

    maybe: "...didn't register with pants successfully. Make sure you are bootstrapping pants in a way that it will load your register.py.

  5. src/python/pants/docs/setup_repo.rst (Diff revision 3)
     
     

    I don't know where this file comes from -- do we supply w/ OS pants?

    1. do we supply w/ OS pants?

      Nope. We should doc it someday https://github.com/pantsbuild/pants/issues/632

  6. src/python/pants/docs/setup_repo.rst (Diff revision 3)
     
     

    nit: close '>' bracket

  7. 
      
LA
AR
  1. Ship It!

  2. 
      
LA
Review request changed

Status: Closed (submitted)

Loading...