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

Start implementing semver #18

Merged
merged 2 commits into from
Aug 26, 2023
Merged

Start implementing semver #18

merged 2 commits into from
Aug 26, 2023

Conversation

mara-schulke
Copy link
Contributor

@mara-schulke mara-schulke commented Aug 24, 2023

Changes

Use the semver crate's types Version and VersionReq instead of strings

Implications

Existing version requirements in manifests will result in errors as the default operator is Caret and only Exact is supported as of right now.

Example:

[dependencies]
pkg = { version = "1.0.0", repository = "foo" }

Will have to be changed to:

[dependencies]
pkg = { version = "=1.0.0", repository = "foo" }

The proper evalutation / resolution of requirements will be implemented by the registry (see #12)

@mara-schulke mara-schulke marked this pull request as draft August 24, 2023 21:45
@mara-schulke mara-schulke marked this pull request as ready for review August 26, 2023 08:00
@mara-schulke mara-schulke self-assigned this Aug 26, 2023
ensure!(
version.op == semver::Op::Exact && version.minor.is_some() && version.patch.is_some(),
"artifactory only support pinned dependencies"
);
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be nicer to move this validation where the version requirement is added. But I guess this will change soon so it's not a big deal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, the requirements are valid in the manifest they just can't be used with the artifactory registry impl

@mara-schulke mara-schulke merged commit 4179bd5 into main Aug 26, 2023
5 checks passed
@mara-schulke mara-schulke deleted the mara/semver branch August 26, 2023 08:50
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