is there a way to get more information on a depend...
# development
f
is there a way to get more information on a dependency cycle? the error message I’m getting is:
Copy code
Engine traceback:
  in select
  in pants.backend.go.build.run_go_build
  in pants.backend.go.build.build_target
Traceback (no traceback):
  <pants native internals>
Exception: Dependency graph contained a cycle:
  @rule(pants.backend.go.build.build_target) <-
  @rule(pants.backend.go.build.build_target) <-
which is not very helpful
h
It's a cycle with the rules, rather than the "dependencies" field
w
mm… can cherry pick the rust portion of https://github.com/pantsbuild/pants/pull/12539 over
it will render the
EngineAware.debug_hint
field of any params to the
@rule
f
@rule(pants.backend.go.build.build_target()) <- @rule(pants.backend.go.build.build_target()) @rule(pants.backend.go.build.build_target()) <- I assume I need to add a
debug_hint
to the relevant parameters?
w
yep
f
okay it is file targets:
Copy code
@rule(pants.backend.go.build.build_target(cmd/casload/client.go)) <-
  @rule(pants.backend.go.build.build_target(cmd/casload/main.go))
  @rule(pants.backend.go.build.build_target(cmd/casload/client.go)) <-
w
so, two options: 1. don’t have inference emit file targets unless you’d like to compile at that level 2. compile the graph of CoarsenedTargets instead
👍 1
f
my issue with CoarsenedTargets is I just want the non-file target but it gives me all of the file targets. I’d like an API that just opts me out of file targets.
I was trying to filter out targets using
not address.is_file_target
but doesn’t seem to be working for me. (I might have missed a spot.)
w
are you currently emitting file Addresses from inference? or are they being introduced somewhere else?
f
I was using
DependenciesRequest
and file targets ended up in the result (
Addresses
)
I missed a spot there filtering out file targets. I got further now that I filtered the dependency addresses to not have file targets
w