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

Pin dependencies to major version ranges #2557

Closed
felixwang9817 opened this issue Apr 15, 2022 · 3 comments · Fixed by #2647
Closed

Pin dependencies to major version ranges #2557

felixwang9817 opened this issue Apr 15, 2022 · 3 comments · Fixed by #2647
Assignees

Comments

@felixwang9817
Copy link
Collaborator

We have recently had a bunch of issues due to dependencies not being limited appropriately. For example, having google-cloud-bigquery>=2.28.1 led to issues when google-cloud-bigquery released breaking changes in v3.0.0: see #2537 for the issue and #2554 which included the fix. Similarly, #2484 occurred since our protobuf dependency was not limited.

I think we should limit dependencies to the next major version. For example, if we currently use version N of a package, we should also limit it to v<(N+1). This way we are not exposed to breaking changes in all our upstream dependencies, while also maintaining a reasonable amount of flexibility for users. If a version N+1 is released and users want us to support it, they can let us know and we can add support; limiting to v<(N+1) just ensures that we aren't being broken all the time.

@achals
Copy link
Member

achals commented Apr 16, 2022

I like this way of declaring dependencies as well: https://stackoverflow.com/a/50080281/1735989

@felixwang9817
Copy link
Collaborator Author

felixwang9817 commented Apr 16, 2022

I like this way of declaring dependencies as well: https://stackoverflow.com/a/50080281/1735989

Ooh this looks super neat, but it seems to only work for minor versions - e.g. if I want to specify >=8.0.0,<9.0.0, I can't do ~=8. But this will definitely work for most of our dependencies.

Edit: oops I'm wrong, the below comment is right.

@achals achals changed the title Limit dependencies Pin dependencies to major version ranges Apr 18, 2022
@judahrand
Copy link
Member

judahrand commented Apr 19, 2022

if I want to specify >=8.0.0,<9.0.0

That's the same as ~=8.0 isn't it? Which is exactly identical to >=8.0,==8.*. But I suppose that still doesn't allow something even more specific like >=8.0.1,==8.*.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants