Skip to content

Commit

Permalink
Cleanup v1 changed code. (#5572)
Browse files Browse the repository at this point in the history
This marks off some TODO's around non-deprecation-bound 1.5.0 removals and seals the v2 engine variant components into pants.scm from pants.engine.
  • Loading branch information
kwlzn authored Mar 7, 2018
1 parent eddc698 commit 22ca060
Show file tree
Hide file tree
Showing 10 changed files with 135 additions and 299 deletions.
3 changes: 2 additions & 1 deletion src/python/pants/bin/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ python_library(
'src/python/pants/build_graph',
'src/python/pants/core_tasks',
'src/python/pants/engine/legacy:address_mapper',
'src/python/pants/engine/legacy:change_calculator',
'src/python/pants/engine/legacy:graph',
'src/python/pants/engine/legacy:parser',
'src/python/pants/engine/legacy:source_mapper',
'src/python/pants/engine:build_files',
'src/python/pants/engine:fs',
'src/python/pants/engine:legacy_engine',
Expand All @@ -35,6 +35,7 @@ python_library(
'src/python/pants/option',
'src/python/pants/reporting',
'src/python/pants/pantsd:pants_daemon',
'src/python/pants/scm:change_calculator',
'src/python/pants/scm/subsystems:changed',
'src/python/pants/subsystem',
'src/python/pants/task',
Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/bin/engine_initializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from pants.engine.fs import create_fs_rules
from pants.engine.isolated_process import create_process_rules
from pants.engine.legacy.address_mapper import LegacyAddressMapper
from pants.engine.legacy.change_calculator import EngineChangeCalculator
from pants.engine.legacy.graph import HydratedTargets, LegacyBuildGraph, create_legacy_graph_tasks
from pants.engine.legacy.parser import LegacyPythonCallbacksParser
from pants.engine.legacy.structs import (GoTargetAdaptor, JavaLibraryAdaptor, JunitTestsAdaptor,
Expand All @@ -27,6 +26,7 @@
from pants.engine.scheduler import LocalScheduler
from pants.init.options_initializer import OptionsInitializer
from pants.option.options_bootstrapper import OptionsBootstrapper
from pants.scm.change_calculator import EngineChangeCalculator


logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/bin/goal_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def subsystems(cls):
Reporting,
Reproducer,
RunTracker,
Changed.Factory,
Changed,
BinaryUtil.Factory,
Subprocess.Factory
}
Expand Down
2 changes: 2 additions & 0 deletions src/python/pants/build_graph/source_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def target_addresses_for_source(self, source):
raise NotImplementedError


# TODO: Kill this in favor of `EngineSourceMapper` once pants/backend/graph_info/tasks/list_owners.py
# (which consumes LazySourceMapper) is ported to the v2 engine.
class SpecSourceMapper(SourceMapper):
"""
Uses sources specs to identify an owner target of a source.
Expand Down
10 changes: 0 additions & 10 deletions src/python/pants/engine/legacy/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,3 @@ python_library(
'3rdparty/python:six'
]
)

python_library(
name='change_calculator',
sources=['change_calculator.py'],
dependencies=[
'src/python/pants/engine/legacy:source_mapper',
'src/python/pants/goal:workspace',
'src/python/pants/scm:change_calculator',
]
)
133 changes: 0 additions & 133 deletions src/python/pants/engine/legacy/change_calculator.py

This file was deleted.

1 change: 0 additions & 1 deletion src/python/pants/init/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ python_library(
'src/python/pants/build_graph',
'src/python/pants/core_tasks',
'src/python/pants/engine:native',
'src/python/pants/engine/legacy:change_calculator',
'src/python/pants/goal',
'src/python/pants/goal:run_tracker',
'src/python/pants/logging',
Expand Down
2 changes: 0 additions & 2 deletions src/python/pants/init/target_roots.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def create(cls, options, build_root=None, change_calculator=None):
:param string build_root: The build root.
:param ChangeCalculator change_calculator: A `ChangeCalculator` for calculating changes.
"""

# Determine the literal target roots.
spec_roots = cls.parse_specs(options.target_specs, build_root)

Expand All @@ -53,7 +52,6 @@ def create(cls, options, build_root=None, change_calculator=None):
changed_options = options.for_scope('changed')
changed_request = ChangedRequest.from_options(changed_options)


logger.debug('spec_roots are: %s', spec_roots)
logger.debug('changed_request is: %s', changed_request)

Expand Down
Loading

0 comments on commit 22ca060

Please sign in to comment.