Skip to content
Permalink
Browse files

[jvm-compile] fix typo: s/direcotry/directory/ (pantsbuild#7265)

Fix a typo in `jvm_compile.py`
  • Loading branch information...
baroquebobcat committed Feb 20, 2019
1 parent 761849e commit ea33c364507ee7cb9dafb9babe336d984f342df1
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/python/pants/backend/jvm/tasks/jvm_compile/jvm_compile.py
@@ -401,7 +401,7 @@ def do_compile(self, invalidation_check, compile_contexts, classpath_product):
valid_targets = [vt.target for vt in invalidation_check.all_vts if vt.valid]

if self.execution_strategy == self.HERMETIC:
self._set_direcotry_digests_for_valid_target_classpath_directories(valid_targets, compile_contexts)
self._set_directory_digests_for_valid_target_classpath_directories(valid_targets, compile_contexts)

for valid_target in valid_targets:
cc = self.select_runtime_context(compile_contexts[valid_target])
@@ -451,20 +451,20 @@ def _record_compile_classpath(self, classpath, target, outdir):
with open(path, 'w') as f:
f.write(text)

def _set_direcotry_digests_for_valid_target_classpath_directories(self, valid_targets, compile_contexts):
def _set_directory_digests_for_valid_target_classpath_directories(self, valid_targets, compile_contexts):
snapshots = self.context._scheduler.capture_snapshots(
tuple(PathGlobsAndRoot(PathGlobs(
[self._get_relative_classes_dir_from_target(target, compile_contexts)]
), get_buildroot()) for target in valid_targets))
[self._set_direcotry_digest_for_compile_context(
[self._set_directory_digest_for_compile_context(
snapshot.directory_digest, target, compile_contexts)
for target, snapshot in list(zip(valid_targets, snapshots))]

def _get_relative_classes_dir_from_target(self, target, compile_contexts):
cc = self.select_runtime_context(compile_contexts[target])
return fast_relpath(cc.classes_dir.path, get_buildroot()) + '/**'

def _set_direcotry_digest_for_compile_context(self, directory_digest, target, compile_contexts):
def _set_directory_digest_for_compile_context(self, directory_digest, target, compile_contexts):
cc = self.select_runtime_context(compile_contexts[target])
new_classpath_entry = ClasspathEntry(cc.classes_dir.path, directory_digest)
cc.classes_dir = new_classpath_entry

0 comments on commit ea33c36

Please sign in to comment.
You can’t perform that action at this time.