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

[internal] JVM only infers dependencies on artifacts in the target's resolve(s) #13907

Merged
merged 4 commits into from
Dec 17, 2021

Conversation

Eric-Arellano
Copy link
Contributor

Closes #13621.

First-party targets like java_source will only infer dependencies on jvm_artifacts from one of their compatible_resolves / resolve field. This works around issues with ambiguous dependency inference.

Note that we do not eagerly error if you explicitly depend on a jvm_artifact not compatible with the target's resolve(s). We may want to do that in a followup.

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
Copy link
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!

Note that we do not eagerly error if you explicitly depend on a jvm_artifact not compatible with the target's resolve(s). We may want to do that in a followup.

This should happen via the work that I'll post this evening.

Comment on lines 59 to 62
args=[NAMED_RESOLVE_OPTIONS, DEFAULT_RESOLVE_OPTION], env_inherit=PYTHON_BOOTSTRAP_ENV
args=[NAMED_RESOLVE_OPTIONS, DEFAULT_RESOLVE_OPTION], env_inherit={"PATH"}
Copy link
Member

Choose a reason for hiding this comment

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

Was this related to this change? The PYTHON_BOOTSTRAP_ENV is necessary on hosts that use pyenv (in order to locate the Python 3.6 which is used to gunzip the coursier archive), so this isn't equivalent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, hm. Will revert. I assumed it was bad copy pasta from python tests

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@Eric-Arellano Eric-Arellano enabled auto-merge (squash) December 17, 2021 01:14
@Eric-Arellano Eric-Arellano merged commit 5f547b2 into pantsbuild:main Dec 17, 2021
@Eric-Arellano Eric-Arellano deleted the jvm-dep-inference branch December 17, 2021 01:26
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.

Add support for affecting the visibility of dependencies by resolve
2 participants