Skip to content

Commit

Permalink
Move remaining core tasks to core_tasks.
Browse files Browse the repository at this point in the history
Still not moved: GroupTask, which we're killing, and
targets_help+builddictionary, which I want to rewrite, because
they currently use old, clunky code with waaay too many deps.

Testing Done:
CI passes: https://travis-ci.org/pantsbuild/pants/builds/94525012

Reviewed at https://rbcommons.com/s/twitter/r/3204/
  • Loading branch information
benjyw authored and Benjy committed Dec 3, 2015
1 parent 05136ad commit 22172bd
Show file tree
Hide file tree
Showing 22 changed files with 329 additions and 353 deletions.
14 changes: 0 additions & 14 deletions src/python/pants/backend/core/register.py
Expand Up @@ -12,16 +12,12 @@
from pants.backend.core.targets.doc import Page, Wiki, WikiArtifact
from pants.backend.core.targets.prep_command import PrepCommand
from pants.backend.core.targets.resources import Resources
from pants.backend.core.tasks.bash_completion import BashCompletionTask
from pants.backend.core.tasks.builddictionary import BuildBuildDictionary
from pants.backend.core.tasks.cloc import CountLinesOfCode
from pants.backend.core.tasks.confluence_publish import ConfluencePublish
from pants.backend.core.tasks.deferred_sources_mapper import DeferredSourcesMapper
from pants.backend.core.tasks.dependees import ReverseDepmap
from pants.backend.core.tasks.explain_options_task import ExplainOptionsTask
from pants.backend.core.tasks.filemap import Filemap
from pants.backend.core.tasks.filter import Filter
from pants.backend.core.tasks.list_goals import ListGoals
from pants.backend.core.tasks.list_owners import ListOwners
from pants.backend.core.tasks.listtargets import ListTargets
from pants.backend.core.tasks.markdown_to_html import MarkdownToHtml
Expand Down Expand Up @@ -80,7 +76,6 @@ def register_goals():
# with_description() removed, as their docstring will be used instead.

# Getting help.
task(name='goals', action=ListGoals).install().with_description('List all documented goals.')

task(name='targets', action=TargetsHelp).install().with_description(
'List target types and BUILD file symbols (python_tests, jar, etc).')
Expand Down Expand Up @@ -123,12 +118,3 @@ def register_goals():

task(name='list-owners', action=ListOwners).install().with_description(
'Print targets that own the specified source')

task(name='deferred-sources', action=DeferredSourcesMapper).install().with_description(
'Map unpacked sources from archives.')

task(name='bash-completion', action=BashCompletionTask).install().with_description(
'Dump bash shell script for autocompletion of pants command lines.')

task(name='options', action=ExplainOptionsTask).install().with_description(
'List what options pants has set.')
59 changes: 2 additions & 57 deletions src/python/pants/backend/core/tasks/BUILD
Expand Up @@ -42,18 +42,14 @@ python_library(
target(
name = 'all',
dependencies = [
':bash_completion',
':builddictionary',
':cloc',
':confluence_publish',
':console_task',
':deferred_sources_mapper',
':dependees',
':explain_options',
':filemap',
':filter',
':group_task',
':list_goals',
':list_owners',
':listtargets',
':markdown_to_html',
Expand All @@ -68,27 +64,6 @@ target(
]
)

python_library(
name = 'bash_completion',
sources = ['bash_completion.py'],
resource_targets = [
':bash_completion_resources',
],
dependencies = [
'src/python/pants/base:exceptions',
'src/python/pants/base:generator',
'src/python/pants/goal',
'src/python/pants/help',
'src/python/pants/option',
'src/python/pants/task',
],
)

resources(
name = 'bash_completion_resources',
sources = globs('templates/bash_completion/*.mustache'),
)

python_library(
name = 'builddictionary',
sources = ['builddictionary.py'],
Expand Down Expand Up @@ -143,16 +118,6 @@ python_library(
],
)

python_library(
name = 'deferred_sources_mapper',
sources= ['deferred_sources_mapper.py'],
dependencies = [
'src/python/pants/base:payload_field',
'src/python/pants/build_graph',
'src/python/pants/task',
],
)

python_library(
name = 'dependees',
sources = ['dependees.py'],
Expand All @@ -163,16 +128,6 @@ python_library(
],
)

python_library(
name = 'explain_options',
sources = ['explain_options_task.py'],
dependencies = [
'3rdparty/python:ansicolors',
'src/python/pants/option',
'src/python/pants/task',
],
)

python_library(
name = 'filemap',
sources = ['filemap.py'],
Expand Down Expand Up @@ -208,15 +163,6 @@ python_library(
],
)

python_library(
name = 'list_goals',
sources = ['list_goals.py'],
dependencies = [
'src/python/pants/goal',
'src/python/pants/task',
],
)

python_library(
name = 'listtargets',
sources = ['listtargets.py'],
Expand Down Expand Up @@ -301,9 +247,8 @@ python_library(
name = 'scm_publish',
sources = ['scm_publish.py'],
dependencies = [
'src/python/pants/base:exceptions',
'src/python/pants/option',
'src/python/pants/scm',
'src/python/pants/base:deprecated',
'src/python/pants/task',
],
)

Expand Down

0 comments on commit 22172bd

Please sign in to comment.