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 python tools to specify a noop predicate and use it for conan #7498

Conversation

Projects
None yet
3 participants
@cosmicexplorer
Copy link
Contributor

commented Apr 4, 2019

Problem

Resolves #7497. Conan will occasionally time out bootstrapping its pex in travis, and will regardless add an unnecessary wait time in upstream and downstream CI when most of the time it's not needed.

Solution

  • Add an overrideable will_be_invoked() method to PythonToolPrepBase which will avoid bootstrapping its pex tool if it returns False.
  • Override this method in ConanPrep to only bootstrap the conan pex if there are ExternalNativeLibrary targets in play (i.e. if there are any conan packages to resolve).

Result

We avoid an expensive bootstrap phase until it's needed.

@jsirois

jsirois approved these changes Apr 4, 2019

Copy link
Member

left a comment

Thanks Danny.

Show resolved Hide resolved src/python/pants/backend/native/tasks/conan_prep.py Outdated

@cosmicexplorer cosmicexplorer merged commit e6bb074 into pantsbuild:master Apr 4, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.