Skip to content

Commit

Permalink
Simplify git.py and scm.py (#10251)
Browse files Browse the repository at this point in the history
We had many unused methods. Many of them are not safe in a v2 world, such as `push()`. Further, unused code increases our tech debt.

[ci skip-rust-tests]
  • Loading branch information
Eric-Arellano committed Jul 6, 2020
1 parent e9351d8 commit 1a8eb02
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 917 deletions.
10 changes: 0 additions & 10 deletions src/python/pants/goal/BUILD
Expand Up @@ -32,7 +32,6 @@ python_library(
sources = ['context.py'],
dependencies = [
':products',
':workspace',
'src/python/pants/base:build_environment',
'src/python/pants/build_graph',
'src/python/pants/base:deprecated',
Expand Down Expand Up @@ -98,12 +97,3 @@ python_library(
'src/python/pants/util:memo',
],
)

python_library(
name = 'workspace',
sources = ['workspace.py'],
dependencies = [
'src/python/pants/base:build_environment',
'src/python/pants/scm',
],
)
3 changes: 1 addition & 2 deletions src/python/pants/goal/context.py
Expand Up @@ -18,7 +18,6 @@
)
from pants.goal.products import Products
from pants.goal.run_tracker import RunTracker
from pants.goal.workspace import ScmWorkspace
from pants.option.options import Options
from pants.process.lock import OwnerPrintingInterProcessFileLock
from pants.source.source_root import SourceRootConfig
Expand Down Expand Up @@ -77,7 +76,7 @@ def __init__(
self.requested_goals = requested_goals or []
self._console_outstream = console_outstream or sys.stdout.buffer
self._scm = scm or get_scm()
self._workspace = workspace or (ScmWorkspace(self._scm) if self._scm else None)
self._workspace = workspace
self._replace_targets(target_roots)
self._invalidation_report = invalidation_report
self._scheduler = scheduler
Expand Down
61 changes: 0 additions & 61 deletions src/python/pants/goal/workspace.py

This file was deleted.

2 changes: 0 additions & 2 deletions src/python/pants/scm/BUILD
Expand Up @@ -4,8 +4,6 @@
python_library(
dependencies = [
'src/python/pants/util:contextutil',
'src/python/pants/util:memo',
'src/python/pants/util:strutil',
],
)

Expand Down

0 comments on commit 1a8eb02

Please sign in to comment.