6229c419d8f1b63cac22f23f24e19ef28d89b0a3,src/python/pants/backend/graph_info/tasks/cloc.py,CountLinesOfCode,console_output,#CountLinesOfCode#Any#,34

Before Change


      list_file = os.path.join(tmpdir, "input_files_list")
      input_files = set()
      with open(list_file, "w") as list_file_out:
        for target in targets:
          for source in target.sources_relative_to_buildroot():
            input_files.add(source)
            list_file_out.write(source)
            list_file_out.write(b"\n")
      list_file_snapshot = self.context._scheduler.capture_snapshots((
        PathGlobsAndRoot(
          PathGlobs(("input_files_list",)),
          str(tmpdir),

After Change


      targets = self.context.target_roots

    input_snapshots = tuple(
      target.sources_snapshot(scheduler=self.context._scheduler) for target in targets
    )
    input_files = set(f.path for snapshot in input_snapshots for f in snapshot.files)

    // TODO: Work out a nice library-like utility for writing an argfile, as this will be common.
    with temporary_dir() as tmpdir:
      list_file = os.path.join(tmpdir, "input_files_list")
      with open(list_file, "w") as list_file_out:
        for input_file in sorted(input_files):
          list_file_out.write(input_file)
          list_file_out.write(b"\n")
      list_file_snapshot = self.context._scheduler.capture_snapshots((
        PathGlobsAndRoot(
          PathGlobs(("input_files_list",)),
          str(tmpdir),
        ),
      ))[0]

    cloc_path, cloc_snapshot = ClocBinary.global_instance().hackily_snapshot(self.context)

    directory_digest = self.context._scheduler.merge_directories(tuple(s.directory_digest for s in
      input_snapshots + (
      cloc_snapshot,
      list_file_snapshot,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: pantsbuild/pants
Commit Name: 6229c419d8f1b63cac22f23f24e19ef28d89b0a3
Time: 2018-06-27
Author: dawagner@gmail.com
File Name: src/python/pants/backend/graph_info/tasks/cloc.py
Class Name: CountLinesOfCode
Method Name: console_output


Project Name: pantsbuild/pants
Commit Name: 91f0e27b4d7e94e0e5cafe1c2a6fb37c80ab8b41
Time: 2015-08-19
Author: john.sirois@gmail.com
File Name: contrib/go/src/python/pants/contrib/go/tasks/go_workspace_task.py
Class Name: GoWorkspaceTask
Method Name: _symlink_local_src


Project Name: pantsbuild/pants
Commit Name: 806ae3cad27279fb4aa3760afe7772e2d23bce67
Time: 2017-10-24
Author: stuhood@twitter.com
File Name: src/python/pants/engine/legacy/change_calculator.py
Class Name: EngineChangeCalculator
Method Name: iter_changed_target_addresses