Exemple #1
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *config_files.rules(),
            *coursier_fetch_rules(),
            *coursier_setup_rules(),
            *dep_inference_rules(),
            *external_tool_rules(),
            *scala_parser.rules(),
            *symbol_mapper.rules(),
            *scala_target_rules(),
            *source_files.rules(),
            *util_rules(),
            *jdk_rules(),
            QueryRule(Addresses, [DependenciesRequest]),
            QueryRule(ExplicitlyProvidedDependencies, [DependenciesRequest]),
            QueryRule(InferredDependencies, [InferScalaSourceDependencies]),
            QueryRule(Targets, [UnparsedAddressInputs]),
        ],
        target_types=[ScalaSourcesGeneratorTarget],
    )
    rule_runner.set_options(
        args=[NAMED_RESOLVE_OPTIONS, DEFAULT_RESOLVE_OPTION], env_inherit=PYTHON_BOOTSTRAP_ENV
    )
    return rule_runner
Exemple #2
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *config_files.rules(),
            *classpath.rules(),
            *coursier_fetch_rules(),
            *coursier_setup_rules(),
            *external_tool_rules(),
            *source_files.rules(),
            *scalac_rules(),
            *util_rules(),
            *jdk_rules(),
            *target_types.rules(),
            *protobuf_target_types_rules(),
            *stripped_source_files.rules(),
            *scala_protobuf_rules(),
            *artifact_mapper.rules(),
            *distdir.rules(),
            QueryRule(HydratedSources, [HydrateSourcesRequest]),
            QueryRule(GeneratedSources, [GenerateScalaFromProtobufRequest]),
            QueryRule(DigestContents, (Digest, )),
        ],
        target_types=[
            ScalaSourceTarget,
            ScalaSourcesGeneratorTarget,
            ProtobufSourcesGeneratorTarget,
            JvmArtifactTarget,
        ],
    )
    rule_runner.set_options(
        [],
        env_inherit=PYTHON_BOOTSTRAP_ENV,
    )
    return rule_runner
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *avro_rules(),
            *avro_java_rules(),
            *config_files.rules(),
            *classpath.rules(),
            *coursier_fetch_rules(),
            *coursier_setup_rules(),
            *external_tool_rules(),
            *source_files.rules(),
            *util_rules(),
            *jdk_rules(),
            *graph.rules(),
            *jvm_compile_rules(),
            *stripped_source_files.rules(),
            QueryRule(HydratedSources, [HydrateSourcesRequest]),
            QueryRule(GeneratedSources, [GenerateJavaFromAvroRequest]),
        ],
        target_types=[
            JavaSourceTarget,
            JavaSourcesGeneratorTarget,
            AvroSourcesGeneratorTarget,
        ],
    )
    rule_runner.set_options(
        [],
        env_inherit=PYTHON_BOOTSTRAP_ENV,
    )
    return rule_runner
Exemple #4
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *thrift_rules(),
            *scrooge_rules(),
            *scrooge_java_rules(),
            *config_files.rules(),
            *classpath.rules(),
            *coursier_fetch_rules(),
            *coursier_setup_rules(),
            *external_tool_rules(),
            *source_files.rules(),
            *scalac_rules(),
            *util_rules(),
            *jdk_rules(),
            *target_types.rules(),
            *stripped_source_files.rules(),
            QueryRule(HydratedSources, [HydrateSourcesRequest]),
            QueryRule(GeneratedSources, [GenerateJavaFromThriftRequest]),
        ],
        target_types=[
            ScalaSourceTarget,
            ScalaSourcesGeneratorTarget,
            ThriftSourcesGeneratorTarget,
        ],
    )
    rule_runner.set_options(
        [],
        env_inherit=PYTHON_BOOTSTRAP_ENV,
    )
    return rule_runner
Exemple #5
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *config_files.rules(),
            *classpath.rules(),
            *coursier_fetch_rules(),
            *coursier_setup_rules(),
            *external_tool_rules(),
            *source_files.rules(),
            *scalac_rules(),
            *util_rules(),
            *jdk_rules(),
            *target_types.rules(),
            *scalafmt_rules(),
            *skip_field.rules(),
            QueryRule(FmtResult, (ScalafmtRequest, )),
            QueryRule(SourceFiles, (SourceFilesRequest, )),
            QueryRule(Snapshot, (PathGlobs, )),
            QueryRule(ScalafmtConfigFiles,
                      (GatherScalafmtConfigFilesRequest, )),
        ],
        target_types=[ScalaSourceTarget, ScalaSourcesGeneratorTarget],
    )
    rule_runner.set_options([], env_inherit=PYTHON_BOOTSTRAP_ENV)
    return rule_runner
Exemple #6
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(rules=[
        *config_files.rules(),
        *source_files.rules(),
        *coursier_setup_rules(),
        *coursier_fetch_rules(),
        *external_tool_rules(),
        *util_rules(),
        *jdk_rules(),
        *process_rules(),
        QueryRule(BashBinary, ()),
        QueryRule(JdkSetup, ()),
        QueryRule(ProcessResult, (Process, )),
    ], )
    rule_runner.set_options(args=[], env_inherit=PYTHON_BOOTSTRAP_ENV)
    return rule_runner
Exemple #7
0
def rules():
    return [
        *scala_protobuf_rules.rules(),
        *protobuf_target_types.rules(),
        *protobuf_dependency_inference.rules(),
        # Re-export rules necessary to avoid rule graph errors.
        *config_files.rules(),
        *classpath.rules(),
        *coursier_fetch_rules(),
        *coursier_setup_rules(),
        *external_tool_rules(),
        *source_files.rules(),
        *scalac_rules(),
        *util_rules(),
        *jdk_rules(),
        *scala_target_types.rules(),
        *stripped_source_files.rules(),
    ]
Exemple #8
0
def rules():
    return [
        *thrift_rules(),
        *scrooge_rules(),
        *scrooge_java_rules(),
        # Re-export rules necessary to avoid rule graph errors.
        *config_files.rules(),
        *classpath.rules(),
        *coursier_fetch_rules(),
        *coursier_setup_rules(),
        *external_tool_rules(),
        *source_files.rules(),
        *scalac_rules(),
        *util_rules(),
        *jdk_rules(),
        *scala_target_types.rules(),
        *stripped_source_files.rules(),
    ]
Exemple #9
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        rules=[
            *config_files.rules(),
            *jvm_tool.rules(),
            *dep_inference_rules(),
            *scala_parser.rules(),
            *symbol_mapper.rules(),
            *scala_target_rules(),
            *source_files.rules(),
            *util_rules(),
            *jdk_rules(),
            QueryRule(Addresses, [DependenciesRequest]),
            QueryRule(ExplicitlyProvidedDependencies, [DependenciesRequest]),
            QueryRule(InferredDependencies, [InferScalaSourceDependencies]),
            QueryRule(Targets, [UnparsedAddressInputs]),
        ],
        target_types=[ScalaSourcesGeneratorTarget],
        objects={"parametrize": Parametrize},
    )
    rule_runner.set_options(args=[], env_inherit=PYTHON_BOOTSTRAP_ENV)
    return rule_runner