Ejemplo n.º 1
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *coursier_fetch_rules(),
            *jdk_rules.rules(),
            *scalac_check_rules(),
            *scalac_rules(),
            *source_files.rules(),
            *target_types_rules(),
            *testutil.rules(),
            *util_rules(),
            *scala_dep_inf_rules(),
            QueryRule(CheckResults, (ScalacCheckRequest, )),
            QueryRule(CoarsenedTargets, (Addresses, )),
            QueryRule(FallibleClasspathEntry, (CompileScalaSourceRequest, )),
            QueryRule(RenderedClasspath, (CompileScalaSourceRequest, )),
            QueryRule(ClasspathEntry, (CompileScalaSourceRequest, )),
        ],
        target_types=[
            JvmArtifactTarget, ScalaSourcesGeneratorTarget, ScalacPluginTarget
        ],
    )
    rule_runner.set_options(
        args=["--scala-version-for-resolve={'jvm-default':'2.13.8'}"],
        env_inherit=PYTHON_BOOTSTRAP_ENV,
    )
    return rule_runner
Ejemplo n.º 2
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *config_files.rules(),
            *coursier_fetch_rules(),
            *coursier_rules(),
            *coursier_setup_rules(),
            *external_tool_rules(),
            *java_dep_inf_rules(),
            *javac_rules(),
            *jdk_rules.rules(),
            *scalac_rules(),
            *source_files.rules(),
            *scala_target_types_rules(),
            *java_target_types_rules(),
            *util_rules(),
            *testutil.rules(),
            QueryRule(CoarsenedTargets, (Addresses, )),
            QueryRule(ClasspathEntry, (CompileJavaSourceRequest, )),
            QueryRule(ClasspathEntry, (CompileScalaSourceRequest, )),
            QueryRule(FallibleClasspathEntry, (CompileJavaSourceRequest, )),
            QueryRule(FallibleClasspathEntry, (CompileScalaSourceRequest, )),
        ],
        target_types=[ScalaSourcesGeneratorTarget, JavaSourcesGeneratorTarget],
    )
    rule_runner.set_options(
        args=[
            NAMED_RESOLVE_OPTIONS,
            DEFAULT_RESOLVE_OPTION,
        ],
        env_inherit=PYTHON_BOOTSTRAP_ENV,
    )
    return rule_runner
Ejemplo n.º 3
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *system_binaries.rules(),
            *config_files.rules(),
            *jvm_tool.rules(),
            *source_files.rules(),
            *javac_rules(),
            *javac_check_rules(),
            *util_rules(),
            *target_types_rules(),
            *lockfile.rules(),
            *jdk_rules.rules(),
            *java_dep_inf_rules(),
            *source_files.rules(),
            *testutil.rules(),
            QueryRule(CheckResults, (JavacCheckRequest, )),
            QueryRule(ClasspathEntry, (CompileJavaSourceRequest, )),
            QueryRule(CoarsenedTargets, (Addresses, )),
            QueryRule(FallibleClasspathEntry, (CompileJavaSourceRequest, )),
            QueryRule(RenderedClasspath, (CompileJavaSourceRequest, )),
        ],
        target_types=[JavaSourcesGeneratorTarget, JvmArtifactTarget],
    )
    rule_runner.set_options([], env_inherit=PYTHON_BOOTSTRAP_ENV)
    return rule_runner
Ejemplo n.º 4
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *archive.rules(),
            *config_files.rules(),
            *coursier_fetch_rules(),
            *coursier_setup_rules(),
            *external_tool_rules(),
            *source_files.rules(),
            *javac_rules(),
            *javac_check_rules(),
            *util_rules(),
            *target_types_rules(),
            *coursier_rules(),
            *jdk_rules.rules(),
            *java_dep_inf_rules(),
            *source_files.rules(),
            *testutil.rules(),
            QueryRule(CheckResults, (JavacCheckRequest, )),
            QueryRule(FallibleClasspathEntry, (CompileJavaSourceRequest, )),
            QueryRule(ClasspathEntry, (CompileJavaSourceRequest, )),
            QueryRule(CoarsenedTargets, (Addresses, )),
        ],
        target_types=[
            JvmDependencyLockfile, JavaSourcesGeneratorTarget, JvmArtifact
        ],
        bootstrap_args=[
            NAMED_RESOLVE_OPTIONS,
            DEFAULT_RESOLVE_OPTION,
        ],
    )
    rule_runner.set_options(
        args=[NAMED_RESOLVE_OPTIONS, DEFAULT_RESOLVE_OPTION],
        env_inherit=PYTHON_BOOTSTRAP_ENV)
    return rule_runner
Ejemplo n.º 5
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *coursier_fetch_rules(),
            *coursier_setup_rules(),
            *config_files.rules(),
            *jvm_tool.rules(),
            *system_binaries.rules(),
            *jdk_rules.rules(),
            *kotlin_check_rules(),
            *kotlinc_rules(),
            *kotlinc_plugins.rules(),
            *kotlin_dep_inf_rules(),
            *source_files.rules(),
            *target_types_rules(),
            *testutil.rules(),
            *util_rules(),
            QueryRule(CheckResults, (KotlincCheckRequest, )),
            QueryRule(CoarsenedTargets, (Addresses, )),
            QueryRule(FallibleClasspathEntry, (CompileKotlinSourceRequest, )),
            QueryRule(RenderedClasspath, (CompileKotlinSourceRequest, )),
            QueryRule(ClasspathEntry, (CompileKotlinSourceRequest, )),
        ],
        target_types=[
            JvmArtifactTarget, KotlinSourcesGeneratorTarget,
            KotlincPluginTarget
        ],
    )
    rule_runner.set_options(args=[], env_inherit=PYTHON_BOOTSTRAP_ENV)
    return rule_runner
Ejemplo n.º 6
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *core_target_types_rules(),
            *coursier_fetch_rules(),
            *lockfile.rules(),
            *resources.rules(),
            *classpath.rules(),
            *util_rules(),
            *testutil.rules(),
            QueryRule(RenderedClasspath, (Addresses, )),
        ],
        target_types=[
            ResourcesGeneratorTarget,
            ResourceTarget,
        ],
    )
    rule_runner.set_options(args=[], env_inherit=PYTHON_BOOTSTRAP_ENV)
    return rule_runner
Ejemplo n.º 7
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *config_files.rules(),
            *coursier_fetch_rules(),
            *lockfile.rules(),
            *classpath.rules(),
            *coursier_setup_rules(),
            *external_tool_rules(),
            *java_dep_inf_rules(),
            *scala_dep_inf_rules(),
            *javac_rules(),
            *jdk_rules.rules(),
            *scalac_rules(),
            *source_files.rules(),
            *scala_target_types_rules(),
            *java_target_types_rules(),
            *util_rules(),
            *testutil.rules(),
            *protobuf_rules(),
            *stripped_source_files.rules(),
            *protobuf_target_types_rules(),
            QueryRule(Classpath, (Addresses,)),
            QueryRule(RenderedClasspath, (Addresses,)),
            QueryRule(UnexpandedTargets, (Addresses,)),
            QueryRule(HydratedSources, [HydrateSourcesRequest]),
            QueryRule(GeneratedSources, [GenerateJavaFromProtobufRequest]),
        ],
        target_types=[
            JavaSourcesGeneratorTarget,
            JvmArtifactTarget,
            ProtobufSourceTarget,
            ProtobufSourcesGeneratorTarget,
            ScalaSourcesGeneratorTarget,
        ],
    )
    rule_runner.set_options(args=[], env_inherit=PYTHON_BOOTSTRAP_ENV)
    return rule_runner
Ejemplo n.º 8
0
def jvm_rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *bsp_rules(),
            *java_bsp_rules(),
            *scala_bsp_rules(),
            *config_files.rules(),
            *coursier_fetch_rules(),
            *lockfile.rules(),
            *classpath.rules(),
            *coursier_setup_rules(),
            *external_tool_rules(),
            *scala_dep_inf_rules(),
            *javac_rules(),
            *jdk_rules.rules(),
            *scalac_rules(),
            *source_files.rules(),
            *scala_target_types_rules(),
            *java_target_types_rules(),
            *util_rules(),
            *testutil.rules(),
            *stripped_source_files.rules(),
        ],
        target_types=[
            JavaSourcesGeneratorTarget,
            JvmArtifactTarget,
            ScalatestTestsGeneratorTarget,
        ],
    )
    rule_runner.set_options(
        args=[
            "--experimental-bsp-groups-config-files=bsp-groups.toml",
        ],
        env_inherit=PYTHON_BOOTSTRAP_ENV,
    )
    return rule_runner