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

Make python-setup resolve_all_constraints a bool. #11985

Merged

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Apr 29, 2021

The subset resolve feature now allows resolve_all_constraints to be a
simple on/off choice indicating whether the constraints file serves as
a lock file role or not. Map the existing enum to a bool and deprecate
the enum values.

[ci skip-rust]
[ci skip-build-wheels]

The subset resolve feature now allows resolve_all_constraints to be a
simple on/off choice indicating whether the constraints file serves as
a lock file role or not. Map the existing enum to a bool and deprecate
the enum values.

[ci skip-rust]
[ci skip-build-wheels]
@jsirois
Copy link
Member Author

jsirois commented Apr 29, 2021

Take this as a bit of a straw man. The resulting option provides the least user disruption - no deprecating an existing option and adding a new one with a name compromise, just deprecating enum values in favor of bool values. The treatment applied to option parsing to support this is ad-hoc in that it only works for bools. We're really not handling type functions well or uniformly and that should probably be addressed wholistically, but this is a straw man / experiment.

Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Thank you for figuring this out!

src/python/pants/python/python_setup.py Outdated Show resolved Hide resolved
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
# 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]
@jsirois jsirois force-pushed the resolve_all_constraints/deprecate_modes branch from fa56a80 to 7c946da Compare April 29, 2021 22:30
# 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]
@jsirois
Copy link
Member Author

jsirois commented Apr 29, 2021

Using your words. As is usual, I'm not a fan since they lie a bit and you really need a book for this stuff. Yes, fewer resolves, but they could be honking big and slow down most resolves if your constraints change frequently due to 1 big - say ML app, but most apps are small and use ~no 3rdparty.

@jsirois jsirois merged commit e68e2da into pantsbuild:main Apr 29, 2021
@jsirois jsirois deleted the resolve_all_constraints/deprecate_modes branch April 29, 2021 23:29
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