https://pantsbuild.org/ logo
#development
Title
# development
f

fast-nail-55400

09/08/2021, 3:49 PM
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

fast-nail-55400

09/08/2021, 3:53 PM
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

witty-crayon-22786

09/08/2021, 4:16 PM
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

fast-nail-55400

09/08/2021, 4:18 PM
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

witty-crayon-22786

09/08/2021, 4:19 PM
it doesn’t look like there is an implementation of debug testing for junit
👍 1
f

fast-nail-55400

09/08/2021, 4:20 PM
so it would need to be added (even as a no-op?) ?
w

witty-crayon-22786

09/08/2021, 4:20 PM
…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

fast-nail-55400

09/08/2021, 4:21 PM
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

witty-crayon-22786

09/08/2021, 4:22 PM
very known.
f

fast-nail-55400

09/08/2021, 4:22 PM
👍
w

witty-crayon-22786

09/08/2021, 4:23 PM
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

fast-nail-55400

09/08/2021, 4:29 PM
okay adding a rule that produces
TestDebugRequest
for
JavaTestFieldSet
did it
👍 1
(although I just have it raise)