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

Allow ignoring dependencies with ! #10385

Merged
merged 3 commits into from Jul 17, 2020

Conversation

Eric-Arellano
Copy link
Contributor

@Eric-Arellano Eric-Arellano commented Jul 16, 2020

It would be silly to do [':sibling', '!:sibling], but this is useful for when dependency inference results in a false positive.

The user may either specify a normal address or they may specify a file, which will cause us to look for the owning target and to generate a subtarget. We validate that files have exactly one owner, like what we do with explicit file deps in general.

Every ignore must actually cause a dependency to be ignored; we do not allow unmatched ignores. This reduces the risk of users thinking something is being ignored when it's really not.

[ci skip-rust-tests]

Copy link
Sponsor Member

@stuhood stuhood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

src/python/pants/engine/internals/graph.py Outdated Show resolved Hide resolved
Also, generify the code so that we stop assuming dep inference uses generated subtargets and stop assuming that dependency injection uses normal Addresess. This is how it's implemented now, but it does not need to be. For example, today we mentioned how Java may not always want to use generated subtargets. Either way, this results in simpler code with fewer special cases.

[ci skip-rust-tests]
Copy link
Sponsor Member

@stuhood stuhood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

# Rust tests will be skipped. Delete if not intended.
[ci skip-rust-tests]
@Eric-Arellano Eric-Arellano merged commit 188891c into pantsbuild:master Jul 17, 2020
@Eric-Arellano Eric-Arellano deleted the ignore-dependencies branch July 17, 2020 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants