500e1268ceddfe67674ae2a3b741f1ea199046c0,src/python/pants/backend/python/goals/run_python_binary.py,,create_python_binary_run_request,#Any#Any#Any#,32

Before Change


        // TODO: This is overkill? We don"t need to hydrate the sources and strip snapshots,
        //  we only need the path relative to the source root.
        binary_sources = await Get(HydratedSources, HydrateSourcesRequest(field_set.sources))
        stripped_binary_sources = await Get(
            StrippedSourceFiles, SourceFiles(binary_sources.snapshot, ())
        )
        entry_point = PythonBinarySources.translate_source_file_to_entry_point(
            stripped_binary_sources.snapshot.files
        )
    if entry_point is None:
        raise InvalidFieldException(
            "You must either specify `sources` or `entry_point` for the target "
            f"{repr(field_set.address)} in order to run it, but both fields were undefined."

After Change


                f"{repr(field_set.address)}, so it must have exactly one source, but it has "
                f"{len(binary_source_paths.files)}"
            )
        entry_point_path = binary_source_paths.files[0]
        source_root = await Get(
            SourceRoot,
            SourceRootRequest,
            SourceRootRequest.for_file(entry_point_path),
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: pantsbuild/pants
Commit Name: 500e1268ceddfe67674ae2a3b741f1ea199046c0
Time: 2020-09-21
Author: benjyw@gmail.com
File Name: src/python/pants/backend/python/goals/run_python_binary.py
Class Name:
Method Name: create_python_binary_run_request


Project Name: pantsbuild/pants
Commit Name: 500e1268ceddfe67674ae2a3b741f1ea199046c0
Time: 2020-09-21
Author: benjyw@gmail.com
File Name: src/python/pants/backend/python/goals/create_python_binary.py
Class Name:
Method Name: create_python_binary


Project Name: pantsbuild/pants
Commit Name: 52c7c260e7c0a85e6b051af48b46e8fe9493b117
Time: 2020-08-04
Author: benjyw@gmail.com
File Name: src/python/pants/core/util_rules/determine_source_files.py
Class Name:
Method Name: determine_specified_source_files