Skip to content

Commit

Permalink
doc: dust off the Task Developer's Guide :-) rm the "pagerank" example
Browse files Browse the repository at this point in the history
Our page about how to develop a Task described "science-era" Pants.

Removed a lot of what's there; it talked about APIs that have since become new and improved.

Removed the "pagerank" example. :-( When I started on this change, I thought I was gonna update this example and maybe move it to examples/src/... so it would get exercised and not drift back into b0rken-ness . But it's kind of a weird example--it doesn't really care about products, it doesn't do "the usual" things with deps. So I find myself deleting it... but with some misgivings, because it's cool. If someone wants to do the work to modernize it and move it to examples, I'll happily code review :-)

Replaced copy-pasted code snippets with "includes" from live tasks.
Maybe this won't drift out of date so easily from now on.
(Didn't add includes for the JVM section, just a TODO. But did remove now-obsolete sample code.)

rm'd some redundant-and-obsolete info from the Internals page, replacing w/link to Task Developer's guide. (Thanks to Mateo for spotting this!) The basic concepts were OK, but the details, yikes. Internals page had info about GroupTask, which Task Developers page lacked... so move it over.

Bugs closed: 433

Reviewed at https://rbcommons.com/s/twitter/r/1074/
  • Loading branch information
larry hosken (Twitter) authored and lahosken committed Oct 20, 2014
1 parent 44a11e8 commit 63c0a02
Show file tree
Hide file tree
Showing 6 changed files with 164 additions and 319 deletions.
2 changes: 2 additions & 0 deletions src/python/pants/backend/codegen/tasks/protobuf_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ def __init__(self, *args, **kwargs):
'protoc'
)

# TODO https://github.com/pantsbuild/pants/issues/604 prep start
def prepare(self, round_manager):
super(ProtobufGen, self).prepare(round_manager)
round_manager.require_data('ivy_imports')
# TODO https://github.com/pantsbuild/pants/issues/604 prep finish

def resolve_deps(self, key, default=[]):
deps = OrderedSet()
Expand Down
1 change: 1 addition & 0 deletions src/python/pants/backend/jvm/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def build_file_aliases():
)


# TODO https://github.com/pantsbuild/pants/issues/604 register_goals
def register_goals():
ng_killall = task(name='ng-killall', action=NailgunKillall)
ng_killall.install().with_description('Kill running nailgun servers.')
Expand Down
2 changes: 2 additions & 0 deletions src/python/pants/backend/jvm/tasks/ivy_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ class IvyImports(NailgunTask):

_CONFIG_SECTION = 'ivy-imports'

# TODO https://github.com/pantsbuild/pants/issues/604 product_types start
@classmethod
def product_types(cls):
return ['ivy_imports']
# TODO https://github.com/pantsbuild/pants/issues/604 product_types finish

@property
def config_section(self):
Expand Down
Loading

0 comments on commit 63c0a02

Please sign in to comment.