Module ImportFrom alias alias alias alias alias alias alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Expr Call NameLoad Str keyword ListLoad Str Str Str keyword Str keyword NameLoad keyword Str Expr Call NameLoad Str keyword ListLoad Str Str Str keyword Str keyword NameLoad keyword Str Expr Call NameLoad Str keyword NameLoad keyword ListLoad keyword NameLoad keyword Str Expr Call NameLoad Str keyword ListLoad Str Str Str keyword Str keyword NameLoad keyword Str decorator_list NameLoad FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad NameLoad Return IfExp CompareEq NameLoad Str NameLoad NameLoad decorator_list Assign AttributeStore NameLoad attr Call NameLoad Str Assign AttributeStore NameLoad attr Call NameLoad Str Assign AttributeStore NameLoad attr Call NameLoad Str Assign AttributeStore NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call NameLoad GeneratorExp CompareEq NameLoad Str comprehension NameStore NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body If Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr body Return With Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad NameStore body For NameStore AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str attr AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad FunctionDef arguments args NameParam defaults body If Call AttributeLoad NameLoad attr NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return ListComp TupleLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore NameLoad CompareNotIn Call AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Num attr attr AttributeLoad NameLoad attr decorator_list Assign NameStore Call NameLoad NameLoad If BoolOpAnd AttributeLoad NameLoad attr BoolOpOr NameLoad NameLoad body Assign NameStore IfExp CompareEq AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr For TupleStore NameStore NameStore NameLoad body Assign NameStore Call AttributeLoad Str attr ListComp Call AttributeLoad Str attr Call NameLoad SubscriptLoad NameLoad Index Num Call NameLoad SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Expr Call NameLoad Call AttributeLoad Str attr Call AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Num attr attr Call AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Num attr attr NameLoad For TupleStore NameStore NameStore NameLoad body Expr Call NameLoad Call AttributeLoad Str attr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad If CompareEq AttributeLoad NameLoad attr Str body Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad If BoolOpAnd AttributeLoad NameLoad attr NameLoad body Assign NameStore IfExp CompareEq AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr For TupleStore NameStore NameStore NameLoad body Assign NameStore Call AttributeLoad Str attr ListComp Call AttributeLoad Str attr Call NameLoad SubscriptLoad NameLoad Index Num Call NameLoad SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Expr Call NameLoad Call AttributeLoad Str attr AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad If CompareEq AttributeLoad NameLoad attr Str body Raise Call NameLoad Str If AttributeLoad NameLoad attr body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body Return BoolOpAnd CompareNotIn NameLoad AttributeLoad NameLoad attr UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIn NameLoad NameLoad body Return NameLoad orelse If AttributeLoad NameLoad attr body Return Call NameLoad GeneratorExp CompareIn NameLoad NameLoad comprehension NameStore AttributeLoad NameLoad attr orelse Return NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Assign NameStore ListComp Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body For NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad ListLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad orelse If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad Call NameLoad NameLoad If Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad ListLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad attr TupleLoad NameLoad NameLoad orelse If CompareNotIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad attr TupleLoad NameLoad NameLoad Return TupleLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A __future__ absolute_import division generators nested_scopes print_function unicode_literals with_statement N/A os collections defaultdict twitter.common.collections OrderedSet pants.backend.jvm.tasks.jvm_dependency_analyzer JvmDependencyAnalyzer pants.base.build_environment get_buildroot pants.base.exceptions TaskError pants.java.distribution.distribution DistributionLocator JvmDependencyCheck N/A JvmDependencyAnalyzer N/A N/A Checks true dependencies of a JVM target and ensures that they are consistent with BUILD files. register_options N/A N/A cls register N/A N/A N/A N/A N/A N/A super JvmDependencyCheck cls register_options register N/A N/A register --missing-deps choices N/A off warn fatal default off fingerprint True help Check for missing dependencies in compiled code. Reports actual dependencies A -> B where there is no transitive BUILD file dependency path from A to B. If fatal, missing deps are treated as a build error. N/A N/A register --missing-direct-deps choices N/A off warn fatal default off fingerprint True help Check for missing direct dependencies in compiled code. Reports actual dependencies A -> B where there is no direct BUILD file dependency path from A to B. This is a very strict check; In practice it is common to rely on transitive, indirect dependencies, e.g., due to type inference or when the main target in a BUILD file is modified to depend on other targets in the same BUILD file, as an implementation detail. However it may still be useful to use this on occasion.  N/A N/A register --missing-deps-whitelist type list default N/A fingerprint True help Don't report these targets even if they have missing deps. N/A N/A register --unnecessary-deps choices N/A off warn fatal default off fingerprint True help Check for declared dependencies in compiled code that are not needed. This is a very strict check. For example, generated code will often legitimately have BUILD dependencies that are unused in practice. N/A classmethod __init__ N/A N/A self N/A args kwargs N/A N/A N/A N/A N/A super JvmDependencyCheck self __init__ args kwargs munge_flag N/A N/A flag N/A N/A N/A flag_value N/A N/A N/A N/A self get_options get flag None N/A N/A N/A flag_value off None flag_value N/A N/A N/A self _check_missing_deps N/A munge_flag missing_deps N/A N/A self _check_missing_direct_deps N/A munge_flag missing_direct_deps N/A N/A self _check_unnecessary_deps N/A munge_flag unnecessary_deps N/A N/A self _target_whitelist N/A N/A N/A self get_options missing_deps_whitelist N/A skip N/A N/A cls options N/A N/A N/A values N/A N/A options missing_deps N/A options missing_direct_deps N/A options unnecessary_deps N/A N/A all N/A N/A v off N/A v values N/A classmethod cache_target_dirs N/A N/A self N/A N/A N/A True N/A property execute N/A N/A self N/A N/A N/A N/A N/A self skip N/A N/A self get_options N/A N/A N/A N/A N/A self invalidated N/A N/A N/A self context targets invalidate_dependents True invalidation_check N/A N/A vt N/A invalidation_check invalid_vts N/A N/A product_deps_by_src N/A N/A N/A N/A N/A N/A self context products get_data product_deps_by_src get N/A vt target N/A N/A product_deps_by_src None N/A N/A N/A N/A self check N/A vt target product_deps_by_src N/A check N/A N/A self src_tgt actual_deps N/A N/A N/A Check for missing deps.

    See docstring for _compute_missing_deps for details.
     N/A N/A N/A self _check_missing_deps N/A self _check_missing_direct_deps N/A self _check_unnecessary_deps N/A N/A N/A missing_file_deps missing_tgt_deps missing_direct_tgt_deps N/A N/A self _compute_missing_deps src_tgt actual_deps N/A buildroot N/A get_buildroot shorten N/A N/A path N/A N/A N/A N/A N/A path startswith buildroot N/A N/A N/A N/A N/A os path relpath path buildroot N/A path N/A filter_whitelisted N/A N/A missing_deps N/A N/A N/A N/A N/A tgt_pair evidence N/A N/A tgt_pair evidence missing_deps N/A N/A N/A N/A N/A tgt_pair N/A 0 address reference N/A self _target_whitelist N/A N/A missing_tgt_deps N/A filter_whitelisted missing_tgt_deps N/A N/A N/A self _check_missing_deps N/A missing_file_deps missing_tgt_deps N/A N/A log_fn N/A N/A N/A self _check_missing_deps fatal N/A N/A N/A self context log error N/A N/A N/A self context log warn N/A N/A tgt_pair evidence missing_tgt_deps N/A N/A evidence_str N/A N/A join N/A N/A N/A     {} uses {} format N/A shorten N/A e N/A 0 N/A shorten N/A e N/A 1 N/A e evidence N/A N/A log_fn N/A N/A Missing BUILD dependency {} -> {} because:
{} format N/A N/A N/A N/A tgt_pair N/A 0 address reference N/A N/A N/A N/A tgt_pair N/A 1 address reference evidence_str N/A N/A src_tgt dep missing_file_deps N/A N/A N/A log_fn N/A N/A Missing BUILD dependency {} -> {} format N/A N/A N/A src_tgt address reference N/A shorten dep N/A N/A N/A self _check_missing_deps fatal N/A N/A N/A TaskError Missing deps. N/A missing_direct_tgt_deps N/A filter_whitelisted missing_direct_tgt_deps N/A N/A N/A self _check_missing_direct_deps missing_direct_tgt_deps N/A N/A log_fn N/A N/A N/A self _check_missing_direct_deps fatal N/A N/A N/A self context log error N/A N/A N/A self context log warn N/A N/A tgt_pair evidence missing_direct_tgt_deps N/A N/A evidence_str N/A N/A join N/A N/A N/A     {} uses {} format N/A shorten N/A e N/A 0 N/A shorten N/A e N/A 1 N/A e evidence N/A N/A log_fn N/A N/A Missing direct BUILD dependency {} -> {} because:
{} format N/A N/A tgt_pair N/A 0 address N/A N/A tgt_pair N/A 1 address evidence_str N/A N/A N/A self _check_missing_direct_deps fatal N/A N/A N/A TaskError Missing direct deps. N/A N/A self _check_unnecessary_deps N/A N/A N/A TaskError Unnecessary dep warnings not implemented yet. N/A _compute_missing_deps N/A N/A self src_tgt actual_deps N/A N/A N/A Computes deps that are used by the compiler but not specified in a BUILD file.

    These deps are bugs waiting to happen: the code may happen to compile because the dep was
    brought in some other way (e.g., by some other root target), but that is obviously fragile.

    Note that in practice we're OK with reliance on indirect deps that are only brought in
    transitively. E.g., in Scala type inference can bring in such a dep subtly. Fortunately these
    cases aren't as fragile as a completely missing dependency. It's still a good idea to have
    explicit direct deps where relevant, so we optionally warn about indirect deps, to make them
    easy to find and reason about.

    - actual_deps: a map src -> list of actual deps (source, class or jar file) as noted by the
      compiler.

    Returns a triple (missing_file_deps, missing_tgt_deps, missing_direct_tgt_deps) where:

    - missing_file_deps: a list of dep_files where src_tgt requires dep_file, and we're unable
      to map to a target (because its target isn't in the total set of targets in play,
      and we don't want to parse every BUILD file in the workspace just to find it).

    - missing_tgt_deps: a list of dep_tgt where src_tgt is missing a necessary transitive
                        dependency on dep_tgt.

    - missing_direct_tgt_deps: a list of dep_tgts where src_tgt is missing a direct dependency
                               on dep_tgt but has a transitive dep on it.

    All paths in the input and output are absolute.
     must_be_explicit_dep N/A N/A dep N/A N/A N/A N/A N/A dep N/A self bootstrap_jar_classfiles N/A N/A N/A dep startswith N/A N/A N/A DistributionLocator cached real_home N/A target_or_java_dep_in_targets N/A N/A target targets N/A N/A N/A N/A target targets N/A N/A True N/A N/A N/A target is_scala N/A N/A N/A any N/A N/A t targets N/A t N/A target java_sources N/A N/A False N/A N/A transitive_deps_by_target N/A N/A self _compute_transitive_deps_by_target N/A missing_file_deps N/A OrderedSet N/A missing_tgt_deps_map N/A defaultdict list N/A missing_direct_tgt_deps_map N/A defaultdict list N/A buildroot N/A get_buildroot N/A abs_srcs N/A N/A N/A N/A os path join buildroot src N/A src N/A N/A src_tgt sources_relative_to_buildroot N/A src abs_srcs N/A N/A actual_dep N/A filter must_be_explicit_dep N/A N/A actual_deps get src N/A N/A N/A actual_dep_tgts N/A N/A N/A self targets_by_file get actual_dep N/A N/A actual_dep_tgts None N/A N/A N/A N/A missing_file_deps add N/A src_tgt actual_dep N/A N/A N/A N/A target_or_java_dep_in_targets src_tgt actual_dep_tgts N/A N/A canonical_actual_dep_tgt N/A next N/A iter actual_dep_tgts N/A N/A N/A actual_dep_tgts isdisjoint N/A N/A transitive_deps_by_target get src_tgt N/A N/A N/A N/A N/A N/A missing_tgt_deps_map N/A N/A src_tgt canonical_actual_dep_tgt append N/A src actual_dep N/A N/A N/A canonical_actual_dep_tgt N/A src_tgt dependencies N/A N/A N/A N/A N/A missing_direct_tgt_deps_map N/A N/A src_tgt canonical_actual_dep_tgt append N/A src actual_dep N/A N/A N/A list missing_file_deps N/A N/A missing_tgt_deps_map items N/A N/A missing_direct_tgt_deps_map items N/A N/A