Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
When python target compatibility is not set, use interpreter constraints. #6284
...fails in an odd half-configured fashion (where the interpreter is bounded in some way, but not the dep resolution).
Before this patch, in a repository with:
...individual targets were able to claim to be compatible with
After this patch, the default compatibility for a repository is specified via the constraints, and so rather than being completely unconstrained, a target with no compatibility argument would pick up the default. In the case above, that would cause a failure.
There are a few potential fixes for consumers:
referenced this pull request
Jul 31, 2018
There is one failing integration test to act as a reminder that this represents a major behavior change.
Currently, in a repository with:
...individual targets are able to claim to be compatible with
After this patch, the default compatibility for a repository would be specified via the constraints, and so rather than being completely unconstrained, a target with no compatibility argument would pick up the default. In the case above, that would cause a failure.
How do we feel about this? There are a few potential deployment strategies for a mixed repository:
This sounds worth the break for the consistency.
To talk a little about Foursquare's use case, we right now only have Python 2, but are migrating next few weeks. Our ideal is to make Python 3 be the default, and within BUILD files you would have to explicitly specify it's Py2 only or Py2 + Py3, which sounds like strategy 3.
I'm confused on one scenario. If your pants.ini only specifies Py3, but your BUILD specifies Py2, which interpreter will be used?
cc @mateor if I got anything wrong.
@Eric-Arellano : The effect of this change is that
Aug 1, 2018
1 check passed
This is also a change I would like to see spread to `platforms` which I believe also respects the ini over the target constraint, on 1.4.0…
On Wed, Aug 1, 2018, 5:50 PM Stu Hood ***@***.***> wrote: Merged #6284 <#6284>. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#6284 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABqcAbtP7zvXvnysBRi5pq4jR3I546zuks5uMiKKgaJpZM4VpVvg> .