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

Remove exact version constraint from libc #16955

Merged
merged 1 commit into from
Dec 9, 2022
Merged

Conversation

cd-work
Copy link
Contributor

@cd-work cd-work commented Dec 5, 2022

As a system dependency, libc can only be used with a single version in the dependency graph. As such, restricting it to a single fixed version will prevent dependents from specifying a higher version and make deno impossible to use should they require it.


I've run into this issue when building with a dependent that has a version constraint of 0.2.135. I could have just bumped the libc version to the latest available version, but since I didn't see any reason in the git history for why this was explicitly locked down to a single version I assume it was just a mistake.

As a system dependency, libc can only be used with a single version in
the dependency graph. As such, restricting it to a single fixed version
will prevent dependents from specifying a higher version and make deno
impossible to use should they require it.
@cd-work
Copy link
Contributor Author

cd-work commented Dec 5, 2022

CI failure is unrelated to the patch as far as I can tell.

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM. We pin all versions in the cli to reduce the chance of being bitten by cargo publish patch version breakage, but now that this has moved to the workspace that doesn't make as much sense. We might want to pin this versions in the CLI crate only in the future if it becomes a problem again.

@dsherret dsherret merged commit 9daf6e1 into denoland:main Dec 9, 2022
@cd-work cd-work deleted the bumpc branch December 9, 2022 15:49
@cd-work
Copy link
Contributor Author

cd-work commented Dec 9, 2022

I feel like a lockfile should mostly help with that if that's a common issue. That said, there's pretty much no scenario where I would recommend pinning system libs because while in this case the issue was for consumers of deno, it could easily happen the other way around. All it takes is one dependency that pulls libc to define a higher version than what deno defines.

I also think that with libc the chances of patch versions breaking stuff are rather low. So that should probably help out too.

That said, since I'm personally not using cli directly it doesn't really matter to me, just my 2 cents.

@dsherret
Copy link
Member

dsherret commented Dec 9, 2022

I feel like a lockfile should mostly help with that if that's a common issue.

cargo publish ignores the lockfile. It's bit us so many times because crates will publish breaking changes in patch releases very often.

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.

2 participants