Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pants isn't printing information about dependency cycles anymore #5739

Closed
youngderekm opened this issue Apr 23, 2018 · 1 comment · Fixed by #8422
Closed

pants isn't printing information about dependency cycles anymore #5739

youngderekm opened this issue Apr 23, 2018 · 1 comment · Fixed by #8422
Labels

Comments

@youngderekm
Copy link

Using 1.7.0.dev1. When there is a dependency cycle in BUILD files, ./pants compile doesn't print which targets are part of that cycle, only the following:

Exception caught: (<class 'pants.build_graph.address_lookup_error.AddressLookupError'>)

Exception message: Build graph construction failed: Exception No source of required dependency: Dep graph contained a cycle.

With a lot of BUILD files this makes it hard to figure out which targets need to be fixed.

We used to use 1.5.0 which would print out the set of targets in the cycle.

@stuhood
Copy link
Member

stuhood commented Apr 24, 2018

Ah, sorry about this... it ended up hidden behind the --print-exception-stacktrace flag... which is not desirable here of course.

@stuhood stuhood assigned stuhood and unassigned stuhood Jan 3, 2019
stuhood added a commit that referenced this issue Oct 29, 2019
#8422)

### Problem

See #5739: currently, rendering a cycle in the graph requires enabling `--print-exception-stacktrace`. But `--print-exception-stacktrace` is annoying for end users.

### Solution

Use the cyclic path that @illicitonion added in #7642 to render an error directly. And in a separate commit, remove `EntryKey`, which was only used for "recording" cycles in the `Graph`... from an era where we actually looked at the complete dump of the runtime graph, I think?

### Result

`--print-exception-stacktrace` is no longer necessary to see the "path" involved in a cycle. Fixes #5739.
wisechengyi pushed a commit that referenced this issue Nov 1, 2019
#8422)

### Problem

See #5739: currently, rendering a cycle in the graph requires enabling `--print-exception-stacktrace`. But `--print-exception-stacktrace` is annoying for end users.

### Solution

Use the cyclic path that @illicitonion added in #7642 to render an error directly. And in a separate commit, remove `EntryKey`, which was only used for "recording" cycles in the `Graph`... from an era where we actually looked at the complete dump of the runtime graph, I think?

### Result

`--print-exception-stacktrace` is no longer necessary to see the "path" involved in a cycle. Fixes #5739.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants