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

Cycles involving file addresses not always permitted #10471

Closed
stuhood opened this issue Jul 27, 2020 · 0 comments · Fixed by #10475
Closed

Cycles involving file addresses not always permitted #10471

stuhood opened this issue Jul 27, 2020 · 0 comments · Fixed by #10475
Assignees
Labels
Projects
Milestone

Comments

@stuhood
Copy link
Sponsor Member

stuhood commented Jul 27, 2020

A case like:

pants.engine.internals.graph.CycleException: Dependency graph contained a cycle:
-> src/python/example/migrations:migrations
   src/python/example/__init__.py
-> src/python/example/migrations:migrations

...can currently fail. And this can be triggered by #10441.

A workaround is to split the __init__.py file out into its own target, but this shouldn't be necessary.

@stuhood stuhood added the bug label Jul 27, 2020
@stuhood stuhood added this to the 2.0.0.alpha0 milestone Jul 27, 2020
@stuhood stuhood added this to To do in Pants 2.0 via automation Jul 27, 2020
@stuhood stuhood self-assigned this Jul 27, 2020
stuhood added a commit to stuhood/pants that referenced this issue Jul 27, 2020
# Rust tests will be skipped. Delete if not intended.
[ci skip-rust-tests]
Pants 2.0 automation moved this from To do to Done Jul 28, 2020
stuhood added a commit that referenced this issue Jul 28, 2020
### Problem

We'd like to allow cycles via file addresses, but not all cases are considered: see #10471.

### Solution

Don't report a cycle if there is a file address anywhere in the cyclic portion.

### Result

Fixes #10471. Performance is unchanged.

[ci skip-rust-tests]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Pants 2.0
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant