Any advice on which rules I need to include a `reg...
# development
f
Any advice on which rules I need to include a
register
function to overcome these rule graph errors? The “missing” types are all core engine types.
No idea if that will help you, though.. 😛
f
just tried at your suggestion, didn’t help 😞
Console
is provided by the engine as part of the core set of objects; there technically is no rule that produces it. I wonder if it is not the real error.
w
sorry about this. have been making progress on the graph changes.
the actual content of the change is potentially relevant, but: have you been adding a test runner?
Copy code
No installed rules return the type TestDebugRequest to satisfy Get(TestDebugRequest, JavaTestFieldSet) for @goal_rule(pants.core.goals.test:343:run_tests(Console, TestSubsystem, InteractiveRunner, Workspace, UnionMembership, DistDir) -> Test, gets=[Get(TargetRootsToFieldSets, TargetRootsToFieldSetsRequest), Get(TestDebugRequest, JavaTestFieldSet), Get(FieldSetsWithSources, FieldSetsWithSourcesRequest), Get(EnrichedTestResult, JavaTestFieldSet), Get(PyDigest, MergeDigests), Get(OpenFiles, OpenFilesRequest)]).
    Ensure that the rule you are expecting to use is installed.
f
yes, I’m trying to register all of the Java rules including JUnit ones
The
register
function registers rules from
pants.core.goals.test
w
it doesn’t look like there is an implementation of debug testing for junit
👍 1
f
so it would need to be added (even as a no-op?) ?
w
…but it looks like there needs to be?
yea… it looks like implementing that is non-optional currently. although i could definitely imagine splitting that union to allow it to be optional.
f
relatedly, how do we improve the rule graph error message so only the actually missing item is noted?
Console
is always present so telling me that it is missing is misinforming me
w
very known.
f
👍
w
anyway, relevant lines are here: https://github.com/pantsbuild/pants/blob/3576b75b378f71196aaba9fd07925b5b2d294a7f/src/python/pants/core/goals/test.py#L361-L386 … need both
TestDebugRequest
and
TestResult
for a
TestFieldSet
currently.
could split that union to make it optional.
f
okay adding a rule that produces
TestDebugRequest
for
JavaTestFieldSet
did it
👍 1
(although I just have it raise)