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",
        ),
    )