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

fast-nail-55400

08/26/2021, 4:11 PM
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

hundreds-father-404

08/26/2021, 4:12 PM
It's a cycle with the rules, rather than the "dependencies" field
w

witty-crayon-22786

08/26/2021, 4:13 PM
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

fast-nail-55400

08/26/2021, 4:28 PM
@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

witty-crayon-22786

08/26/2021, 4:29 PM
yep
f

fast-nail-55400

08/26/2021, 4:30 PM
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

witty-crayon-22786

08/26/2021, 4:31 PM
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

fast-nail-55400

08/26/2021, 4:32 PM
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

witty-crayon-22786

08/26/2021, 4:33 PM
are you currently emitting file Addresses from inference? or are they being introduced somewhere else?
f

fast-nail-55400

08/26/2021, 4:35 PM
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

witty-crayon-22786

08/26/2021, 11:10 PM