Beispiel #1
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *config_files.rules(),
            *jvm_tool.rules(),
            *dep_inference_rules(),
            *java_target_rules(),
            *java_util_rules(),
            *javac_rules(),
            *junit_rules(),
            *source_files.rules(),
            *util_rules(),
            QueryRule(Addresses, [DependenciesRequest]),
            QueryRule(ExplicitlyProvidedDependencies, [DependenciesRequest]),
            QueryRule(InferredDependencies, [InferJavaSourceDependencies]),
            QueryRule(JavaInferredDependencies,
                      [JavaInferredDependenciesAndExportsRequest]),
            QueryRule(Targets, [UnparsedAddressInputs]),
        ],
        target_types=[
            JavaSourcesGeneratorTarget, JunitTestsGeneratorTarget,
            JvmArtifactTarget
        ],
    )
    rule_runner.set_options(args=[], env_inherit=PYTHON_BOOTSTRAP_ENV)
    return rule_runner
Beispiel #2
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        preserve_tmpdirs=True,
        rules=[
            *config_files.rules(),
            *classpath.rules(),
            *coursier_fetch_rules(),
            *coursier_setup_rules(),
            *external_tool_rules(),
            *source_files.rules(),
            *javac_rules(),
            *junit_rules(),
            *util_rules(),
            *java_util_rules(),
            *target_types_rules(),
            QueryRule(CoarsenedTargets, (Addresses, )),
            QueryRule(TestResult, (JavaTestFieldSet, )),
        ],
        target_types=[
            JvmDependencyLockfile,
            JvmArtifact,
            JavaSourcesGeneratorTarget,
            JunitTestsGeneratorTarget,
        ],
    )
    rule_runner.set_options(
        # Makes JUnit output predictable and parseable across versions (#12933):
        args=[
            "--junit-args=['--disable-ansi-colors','--details=flat','--details-theme=ascii']",
            NAMED_RESOLVE_OPTIONS,
            DEFAULT_RESOLVE_OPTION,
        ],
        env_inherit=PYTHON_BOOTSTRAP_ENV,
    )
    return rule_runner
Beispiel #3
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *config_files.rules(),
            *jvm_tool.rules(),
            *dep_inference_rules(),
            *java_target_rules(),
            *java_util_rules(),
            *javac_rules(),
            *source_files.rules(),
            *system_binaries.rules(),
            *util_rules(),
            QueryRule(Addresses, [DependenciesRequest]),
            QueryRule(ThirdPartySymbolMapping, []),
        ],
        objects={"parametrize": Parametrize},
        target_types=[
            JavaSourceTarget,
            JavaSourcesGeneratorTarget,
            JunitTestsGeneratorTarget,
            JvmArtifactTarget,
        ],
    )
    rule_runner.set_options(args=[], env_inherit=PYTHON_BOOTSTRAP_ENV)
    return rule_runner
Beispiel #4
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *config_files.rules(),
            *coursier_fetch_rules(),
            *coursier_setup_rules(),
            *external_tool_rules(),
            *import_parser_rules(),
            *java_parser_launcher_rules(),
            *java_parser_rules(),
            *java_target_rules(),
            *java_util_rules(),
            *javac_rules(),
            *process_rules(),
            *source_files.rules(),
            *util_rules(),
            QueryRule(ParsedJavaImports, [ParseJavaImportsRequest]),
            QueryRule(Targets, [UnparsedAddressInputs]),
        ],
        target_types=[JavaSourcesGeneratorTarget],
        bootstrap_args=[
            NAMED_RESOLVE_OPTIONS,
        ],
    )
    rule_runner.set_options(args=[], env_inherit=PYTHON_BOOTSTRAP_ENV)
    return rule_runner
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *config_files.rules(),
            *classpath.rules(),
            *coursier_fetch_rules(),
            *coursier_setup_rules(),
            *jdk_rules.rules(),
            *javac_rules(),
            *util_rules(),
            *java_util_rules(),
            *target_types_rules(),
            *gjf_fmt_rules.rules(),
            *skip_field.rules(),
            QueryRule(LintResults, (GoogleJavaFormatRequest, )),
            QueryRule(FmtResult, (GoogleJavaFormatRequest, )),
            QueryRule(SourceFiles, (SourceFilesRequest, )),
        ],
        target_types=[JavaSourceTarget, JavaSourcesGeneratorTarget],
    )
    rule_runner.set_options(
        [],
        env_inherit=PYTHON_BOOTSTRAP_ENV,
    )
    return rule_runner
Beispiel #6
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *config_files.rules(),
            *coursier_fetch_rules(),
            *coursier_setup_rules(),
            *dep_inference_rules(),
            *external_tool_rules(),
            *java_target_rules(),
            *java_util_rules(),
            *javac_rules(),
            *junit_rules(),
            *source_files.rules(),
            *util_rules(),
            QueryRule(Addresses, [DependenciesRequest]),
            QueryRule(ExplicitlyProvidedDependencies, [DependenciesRequest]),
            QueryRule(InferredDependencies, [InferJavaSourceDependencies]),
            QueryRule(Targets, [UnparsedAddressInputs]),
        ],
        target_types=[
            JavaSourcesGeneratorTarget, JunitTestsGeneratorTarget, JvmArtifact
        ],
    )
    rule_runner.set_options(
        args=[NAMED_RESOLVE_OPTIONS, DEFAULT_RESOLVE_OPTION],
        env_inherit=PYTHON_BOOTSTRAP_ENV)
    return rule_runner
Beispiel #7
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *config_files.rules(),
            *jvm_tool.rules(),
            *java_dep_inference_rules(),
            *java_target_rules(),
            *java_util_rules(),
            *javac_rules(),
            *java_symbol_mapper.rules(),
            *source_files.rules(),
            *scala_parser.rules(),
            *scala_symbol_mapper.rules(),
            *scala_dep_inference_rules.rules(),
            *scala_target_types.rules(),
            *system_binaries.rules(),
            *util_rules(),
            QueryRule(Addresses, (DependenciesRequest, )),
        ],
        target_types=[
            JavaSourcesGeneratorTarget,
            JavaSourceTarget,
            ScalaSourcesGeneratorTarget,
            ScalaSourceTarget,
        ],
    )
    rule_runner.set_options(args=[], env_inherit=PYTHON_BOOTSTRAP_ENV)
    return rule_runner
Beispiel #8
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        preserve_tmpdirs=True,
        rules=[
            *kotlin_junit_rules(),
            *jvm_junit_rules(),
            *classpath.rules(),
            *config_files.rules(),
            *coursier_fetch_rules(),
            *coursier_setup_rules(),
            *external_tool_rules(),
            *java_util_rules(),
            *javac_rules(),
            *source_files.rules(),
            *target_types_rules(),
            *util_rules(),
            *non_jvm_dependencies_rules(),
            *kotlinc.rules(),
            *kotlinc_plugins.rules(),
            *kotlin_dep_inf_rules(),
            QueryRule(CoarsenedTargets, (Addresses, )),
            QueryRule(TestResult, (JunitTestFieldSet, )),
        ],
        target_types=[
            FileTarget,
            FilesGeneratorTarget,
            RelocatedFiles,
            JvmArtifactTarget,
            KotlinJunitTestsGeneratorTarget,
        ],
    )
    rule_runner.set_options(
        # Makes JUnit output predictable and parseable across versions (#12933):
        args=[
            "--junit-args=['--disable-ansi-colors','--details=flat','--details-theme=ascii']"
        ],
        env_inherit=PYTHON_BOOTSTRAP_ENV,
    )
    return rule_runner
Beispiel #9
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *config_files.rules(),
            *coursier_fetch_rules(),
            *coursier_setup_rules(),
            *dep_inference_rules(),
            *external_tool_rules(),
            *java_target_rules(),
            *java_util_rules(),
            *javac_rules(),
            *source_files.rules(),
            *util_rules(),
            QueryRule(Addresses, [DependenciesRequest]),
            QueryRule(ThirdPartyPackageToArtifactMapping, []),
        ],
        target_types=[
            JavaSourcesGeneratorTarget, JunitTestsGeneratorTarget, JvmArtifact
        ],
    )
    rule_runner.set_options(
        args=[NAMED_RESOLVE_OPTIONS, DEFAULT_RESOLVE_OPTION],
        env_inherit=PYTHON_BOOTSTRAP_ENV)
    return rule_runner