happy-kitchen-89482
08/01/2024, 4:46 PMhappy-kitchen-89482
08/01/2024, 4:47 PMToo many sources of dependency Get(PythonExecutable, [InterpreterConstraints]) for @rule(pants.backend.python.util_rules.pex:428:_determine_pex_python_and_platforms(PexRequest) -> _BuildPexPythonSetup, gets=[Get(PythonExecutable, [InterpreterConstraints])]) <1>: [
"@rule(pants.backend.python.util_rules.pex:338:find_interpreter(InterpreterConstraints, PexSubsystem, EnvironmentTarget, UnionMembership) -> PythonExecutable, gets=[Get(ProcessResult, [PexCliProcess])]) (for (EnvironmentName, InterpreterConstraints))",
"@rule(pants.backend.python.util_rules.pex:338:find_interpreter(InterpreterConstraints, PexSubsystem, EnvironmentTarget, UnionMembership) -> PythonExecutable, gets=[Get(ProcessResult, [PexCliProcess])]) (for (EnvironmentName, InterpreterConstraints))",
"@rule(pants.backend.python.util_rules.pex:338:find_interpreter(InterpreterConstraints, PexSubsystem, EnvironmentTarget, UnionMembership) -> PythonExecutable, gets=[Get(ProcessResult, [PexCliProcess])]) (for (EnvironmentName, InterpreterConstraints))",
]happy-kitchen-89482
08/01/2024, 4:47 PMhappy-kitchen-89482
08/01/2024, 4:48 PMhappy-kitchen-89482
08/01/2024, 4:48 PMsetuptools_scm_pex = await create_venv_pex(
**implicitly({
setuptools_scm.to_pex_request(): PexRequest,
pex_env: PexEnvironment,
}),
)happy-kitchen-89482
08/01/2024, 4:49 PMhappy-kitchen-89482
08/01/2024, 4:54 PMGet seems to make this go awayhappy-kitchen-89482
08/01/2024, 4:55 PMhappy-kitchen-89482
08/01/2024, 4:57 PMGet only solves things if I get rid of the PexEnvironment argument, if I add it in using multi-param, it fails with the same error.happy-kitchen-89482
08/01/2024, 5:01 PMhappy-kitchen-89482
08/01/2024, 5:01 PMwide-midnight-78598
08/01/2024, 5:04 PMsetuptools_scm_pex = await create_venv_pex(
{
setuptools_scm.to_pex_request(): PexRequest,
pex_env: PexEnvironment,
},**implicitly()
)wide-midnight-78598
08/01/2024, 5:05 PMwide-midnight-78598
08/01/2024, 5:05 PMhappy-kitchen-89482
08/01/2024, 6:45 PMhappy-kitchen-89482
08/01/2024, 6:46 PM**implicitly was the way to do multi-param?happy-kitchen-89482
08/01/2024, 6:48 PMVenvPexRequest, and there is a rule that converts them.wide-midnight-78598
08/01/2024, 6:52 PMI thoughtThe use case of converting Get(dict) to call-by-name has always seemed strange to me, I think what you're doing is correct, but it also looks weird - as I assumed most of the dict calls could be resolved into straight parameterswas the way to do multi-param?**implicitly
wide-midnight-78598
08/01/2024, 6:53 PMwide-midnight-78598
08/01/2024, 6:54 PM**implicitly(setuptools_scm.to_pex_request()), pex_env)witty-crayon-22786
08/01/2024, 6:57 PMwitty-crayon-22786
08/01/2024, 6:57 PMPexRequest conversion requires a PexEnvironment (and doesn't already have one in scope), then you need both of those as arguments to implicitlywide-midnight-78598
08/01/2024, 7:01 PMasync def create_venv_pex(
request: VenvPexRequest, bash: BashBinary, pex_environment: PexEnvironment
) -> VenvPex:
when you to convert the request, and don't have the BashBinary?
Apparently this isn't working:
await create_venv_pex(
**implicitly({
setuptools_scm.to_pex_request(): PexRequest,
pex_env: PexEnvironment,
}),
)happy-kitchen-89482
08/01/2024, 7:04 PMPexRequest -> VenvPexRequest conversion does require a PexEnvironmenthappy-kitchen-89482
08/01/2024, 7:05 PMawait create_venv_pex(
**implicitly({
setuptools_scm.to_pex_request(): PexRequest,
pex_env: PexEnvironment,
}),
)happy-kitchen-89482
08/08/2024, 11:49 PMwide-midnight-78598
08/09/2024, 12:04 AMwide-midnight-78598
08/09/2024, 12:06 AMhappy-kitchen-89482
08/09/2024, 1:18 AMhappy-kitchen-89482
08/09/2024, 1:18 AMhappy-kitchen-89482
08/09/2024, 1:19 AMToo many sources of dependency pants.backend.python.util_rules.pex.create_venv_pex(, **implicitly(PexEnvironment, PexRequest)) -> VenvPex for @rule(pants.backend.python.util_rules.vcs_versioning:60:generate_python_from_setuptools_scm(GeneratePythonFromSetuptoolsSCMRequest, SetuptoolsSCM, ChosenLocalEnvironmentName) -> GeneratedSources, gets=[pants.vcs.git.get_git_worktree(<1>, , **implicitly(EnvironmentName)) -> MaybeGitWorktree, pants.core.util_rules.adhoc_binaries.get_python_for_scripts(, **implicitly(EnvironmentName)) -> PythonBuildStandaloneBinary, pants.backend.python.util_rules.pex_environment.find_pex_python(, **implicitly(PythonBuildStandaloneBinary)) -> PexEnvironment, Get(builtins.Digest, [CreateDigest]), pants.backend.python.util_rules.pex.create_venv_pex(, **implicitly(PexEnvironment, PexRequest)) -> VenvPex, pants.backend.python.util_rules.pex.setup_venv_pex_process(, **implicitly(PexEnvironment, VenvPexProcess)) -> Process, pants.engine.process.fallible_to_exec_result_or_raise(, **implicitly(Process, EnvironmentName)) -> ProcessResult, Get(builtins.Snapshot, [CreateDigest])]): [
"@rule(pants.backend.python.util_rules.pex:1042:create_venv_pex(VenvPexRequest, BashBinary, PexEnvironment) -> VenvPex, gets=[pants.backend.python.util_rules.pex.build_pex(<1>, , ) -> BuildPexResult, Get(builtins.Digest, [CreateDigest]), Get(builtins.Digest, [builtins.MergeDigests])]) (for (EnvironmentName, PexEnvironment, PexRequest))",
"@rule(pants.backend.python.util_rules.pex:1042:create_venv_pex(VenvPexRequest, BashBinary, PexEnvironment) -> VenvPex, gets=[pants.backend.python.util_rules.pex.build_pex(<1>, , ) -> BuildPexResult, Get(builtins.Digest, [CreateDigest]), Get(builtins.Digest, [builtins.MergeDigests])]) (for (EnvironmentName, PexEnvironment, PexRequest))",
]happy-kitchen-89482
08/09/2024, 1:20 AMhappy-kitchen-89482
08/09/2024, 1:20 AMhappy-kitchen-89482
08/09/2024, 1:20 AMhappy-kitchen-89482
08/09/2024, 1:21 AMwide-midnight-78598
08/09/2024, 1:21 AMhappy-kitchen-89482
08/09/2024, 1:22 AMwide-midnight-78598
08/09/2024, 1:22 AMhappy-kitchen-89482
08/09/2024, 1:22 AMhappy-kitchen-89482
08/09/2024, 1:23 AMwide-midnight-78598
08/09/2024, 1:24 AMYes, I reproduce this consistentlyRight, sorry, I meant like... where? Is there something I can clone or run on my machine to repro the same?
happy-kitchen-89482
08/09/2024, 1:24 AMhappy-kitchen-89482
08/09/2024, 1:35 AMhappy-kitchen-89482
08/09/2024, 1:35 AMpants in that branch to see the errorshappy-kitchen-89482
08/09/2024, 1:36 AMhappy-kitchen-89482
08/09/2024, 1:37 AMmonomorphize() there is only one relevant edge, but after it there are multiplewide-midnight-78598
08/09/2024, 1:49 AMhappy-kitchen-89482
08/10/2024, 9:26 PMwide-midnight-78598
08/11/2024, 12:25 PM