Exemplo n.º 1
0
def generate_global_scalac_plugins_lockfile_request(
    _: GlobalScalacPluginsToolLockfileSentinel,
    loaded_global_plugins: _LoadedGlobalScalacPlugins,
    scalac: Scalac,
) -> GenerateJvmLockfileFromTool:
    return GenerateJvmLockfileFromTool(
        FrozenOrderedSet(loaded_global_plugins.artifact_address_inputs),
        artifact_option_name=f"[{scalac.options_scope}].plugins_global",
        lockfile_option_name=f"[{scalac.options_scope}].plugins_global_lockfile",
        resolve_name="scalac-plugins",
        lockfile_dest=scalac.plugins_global_lockfile,
        default_lockfile_resource=scalac.default_plugins_lockfile_resource,
    )
Exemplo n.º 2
0
def generate_internal_test_tool_lockfile_request(
    _: MockInternalToolLockfileSentinel, ) -> GenerateJvmLockfileFromTool:
    return GenerateJvmLockfileFromTool(
        artifact_inputs=FrozenOrderedSet({
            "com.google.code.gson:gson:2.9.0",
        }),
        artifact_option_name="n/a",
        lockfile_option_name="n/a",
        resolve_name=MockInternalToolLockfileSentinel.resolve_name,
        read_lockfile_dest=DEFAULT_TOOL_LOCKFILE,
        write_lockfile_dest="mock-write-lockfile.lock",
        default_lockfile_resource=("pants.backend.jvm.resolve",
                                   "mock-internal-tool.lock"),
    )
Exemplo n.º 3
0
def generate_scala_parser_lockfile_request(
    _: ScalaParserToolLockfileSentinel, ) -> GenerateJvmLockfileFromTool:
    return GenerateJvmLockfileFromTool(
        artifact_inputs=FrozenOrderedSet({
            f"org.scalameta:scalameta_{_PARSER_SCALA_BINARY_VERSION}:4.4.30",
            f"io.circe:circe-generic_{_PARSER_SCALA_BINARY_VERSION}:0.14.1",
            f"org.scala-lang:scala-library:{_PARSER_SCALA_VERSION}",
        }),
        artifact_option_name="n/a",
        lockfile_option_name="n/a",
        resolve_name=ScalaParserToolLockfileSentinel.resolve_name,
        read_lockfile_dest=DEFAULT_TOOL_LOCKFILE,
        write_lockfile_dest=
        "src/python/pants/backend/scala/dependency_inference/scala_parser.lock",
        default_lockfile_resource=(
            "pants.backend.scala.dependency_inference",
            "scala_parser.lock",
        ),
    )
Exemplo n.º 4
0
def generate_java_parser_lockfile_request(
    _: JavaParserToolLockfileSentinel, ) -> GenerateJvmLockfileFromTool:
    return GenerateJvmLockfileFromTool(
        artifact_inputs=FrozenOrderedSet({
            "com.fasterxml.jackson.core:jackson-databind:2.12.4",
            "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.12.4",
            "com.github.javaparser:javaparser-symbol-solver-core:3.23.0",
        }),
        artifact_option_name="n/a",
        lockfile_option_name="n/a",
        resolve_name=JavaParserToolLockfileSentinel.resolve_name,
        read_lockfile_dest=DEFAULT_TOOL_LOCKFILE,
        write_lockfile_dest=
        "src/python/pants/backend/java/dependency_inference/java_parser.lock",
        default_lockfile_resource=(
            "pants.backend.java.dependency_inference",
            "java_parser.lock",
        ),
    )
Exemplo n.º 5
0
def generate_google_java_format_lockfile_request(
        _: GoogleJavaFormatToolLockfileSentinel,
        tool: GoogleJavaFormatSubsystem) -> GenerateJvmLockfileFromTool:
    return GenerateJvmLockfileFromTool.create(tool)
Exemplo n.º 6
0
def generate_scalatest_lockfile_request(
    _: ScalatestToolLockfileSentinel, scalatest: Scalatest
) -> GenerateJvmLockfileFromTool:
    return GenerateJvmLockfileFromTool.create(scalatest)
Exemplo n.º 7
0
def generate_avro_tools_lockfile_request(
    _: AvroToolLockfileSentinel, tool: AvroSubsystem
) -> GenerateJvmLockfileFromTool:
    return GenerateJvmLockfileFromTool.create(tool)
Exemplo n.º 8
0
def generate_scrooge_lockfile_request(
        _: ScroogeToolLockfileSentinel,
        scrooge: ScroogeSubsystem) -> GenerateJvmLockfileFromTool:
    return GenerateJvmLockfileFromTool.create(scrooge)
Exemplo n.º 9
0
async def generate_jaxws_lockfile_request(
        _: JaxWsToolsLockfileSentinel,
        jaxws: JaxWsTools) -> GenerateJvmLockfileFromTool:
    return GenerateJvmLockfileFromTool.create(jaxws)
Exemplo n.º 10
0
def generate_junit_lockfile_request(
        _: JunitToolLockfileSentinel,
        junit: JUnit) -> GenerateJvmLockfileFromTool:
    return GenerateJvmLockfileFromTool.create(junit)
Exemplo n.º 11
0
def generate_ktlint_lockfile_request(
        _: KtlintToolLockfileSentinel,
        tool: KtlintSubsystem) -> GenerateJvmLockfileFromTool:
    return GenerateJvmLockfileFromTool.create(tool)
Exemplo n.º 12
0
def generate_scalapbc_lockfile_request(
        _: ScalapbcToolLockfileSentinel,
        tool: ScalaPBSubsystem) -> GenerateJvmLockfileFromTool:
    return GenerateJvmLockfileFromTool.create(tool)
Exemplo n.º 13
0
def generate_test_tool_lockfile_request(
        _: MockJvmToolLockfileSentinel,
        tool: MockJvmTool) -> GenerateJvmLockfileFromTool:
    return GenerateJvmLockfileFromTool.create(tool)