Just upgrading to 2.13. This one is puzzling: ```G...
# plugins
b
Just upgrading to 2.13. This one is puzzling:
Copy code
Get(PythonExecutable, InterpreterConstraints, request.interpreter_constraints),
TypeError: Invalid Get. Because you are using the shorthand form Get(OutputType, InputType(constructor args)), the second argument should be a constructor call, rather than a type, but given <class 'pants.backend.python.util_rules.interpreter_constraints.InterpreterConstraints'>.
But the code uses the 3-arg:
Copy code
Get(PythonExecutable, InterpreterConstraints, request.interpreter_constraints),
1
Commenting it out "works" in that nothing else chokes. 🤔
h
hmmm
Iirc, the code for
Get
moved to Rust
b
src/python/pants/engine/internals/scheduler.py
hmm yeah
native_engine.tasks_add_get
h
I wonder what
type(InterpreterConstraints)
is?
b
The error says:
Copy code
<class 'pants.backend.python.util_rules.interpreter_constraints.InterpreterConstraints'>
might be a bug somewhere in
src/python/pants/engine/internals/rule_visitor.py
👍 1
h
Maybe it would be helpful to bisect by release, e.g. rc0 vs a1
b
Ahhhhhhhhh, I think this has to do with the fact that the value is
None
https://github.com/pantsbuild/pants/blob/fb55bbc50429cc75725f7b86f8cb122f1a010ad8/src/rust/engine/src/externs/mod.rs#L309 Since the
input_arg1
I'm guessing is coerced to Rust's
None
, we fall through and the engine thinks we used the 2-args ahorthand