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

Add support for providing version ranges to pkg-config #60

Closed
sdroege opened this issue Feb 4, 2022 · 6 comments · Fixed by #82
Closed

Add support for providing version ranges to pkg-config #60

sdroege opened this issue Feb 4, 2022 · 6 comments · Fixed by #82

Comments

@sdroege
Copy link

sdroege commented Feb 4, 2022

This needs calling https://docs.rs/pkg-config/latest/pkg_config/struct.Config.html#method.range_version and some syntax for specifying this in Cargo.toml.

@gdesmott
Copy link
Owner

gdesmott commented Feb 4, 2022

Which syntax should we use for this? The cargo or pkg-config one?

@sdroege
Copy link
Author

sdroege commented Feb 4, 2022

Maybe something that you can parse directly into a range, so maybe just the Rust syntax? 0.1.0..=0.9.0 (for >=0.1.0, <= 0.9.0), 0.1.0..0.9.0 (for >= 0.1.0, << 0.9.0)

@gdesmott
Copy link
Owner

gdesmott commented Feb 4, 2022

Wouldn't it make more sense to use the cargo syntax has it's in the same file? https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html
And there may already have parsing code for those.

@sdroege
Copy link
Author

sdroege commented Feb 4, 2022

Sure if you want to parse those to exact / at least / range

@sdroege
Copy link
Author

sdroege commented Feb 4, 2022

You could use https://docs.rs/semver/latest/semver/ and then convert the result of that to one of the cases pkg-config understands. Converting the VersionReq vec of comparators seems like a bit of work though.

@sdroege
Copy link
Author

sdroege commented Oct 27, 2023

I'm working on this now

sdroege added a commit to sdroege/system-deps that referenced this issue Oct 27, 2023
This now supports expressions in the form

  * "1.2" or ">= 1.2" for at least version 1.2
  * ">= 1.2, < 2.0" for at least version 1.2 and less than version 2.0

Fixes gdesmott#60
sdroege added a commit to sdroege/system-deps that referenced this issue Oct 30, 2023
This now supports expressions in the form

  * "1.2" or ">= 1.2" for at least version 1.2
  * ">= 1.2, < 2.0" for at least version 1.2 and less than version 2.0

Fixes gdesmott#60
sdroege added a commit to sdroege/system-deps that referenced this issue Oct 30, 2023
This now supports expressions in the form

  * "1.2" or ">= 1.2" for at least version 1.2
  * ">= 1.2, < 2.0" for at least version 1.2 and less than version 2.0

Fixes gdesmott#60
sdroege added a commit to sdroege/system-deps that referenced this issue Oct 30, 2023
This now supports expressions in the form

  * "1.2" or ">= 1.2" for at least version 1.2
  * ">= 1.2, < 2.0" for at least version 1.2 and less than version 2.0

Fixes gdesmott#60
sdroege added a commit to sdroege/system-deps that referenced this issue Oct 31, 2023
This now supports expressions in the form

  * "1.2" or ">= 1.2" for at least version 1.2
  * ">= 1.2, < 2.0" for at least version 1.2 and less than version 2.0

Fixes gdesmott#60
sdroege added a commit to sdroege/system-deps that referenced this issue Oct 31, 2023
This now supports expressions in the form

  * "1.2" or ">= 1.2" for at least version 1.2
  * ">= 1.2, < 2.0" for at least version 1.2 and less than version 2.0

Fixes gdesmott#60
gdesmott pushed a commit that referenced this issue Oct 31, 2023
This now supports expressions in the form

  * "1.2" or ">= 1.2" for at least version 1.2
  * ">= 1.2, < 2.0" for at least version 1.2 and less than version 2.0

Fixes #60
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 a pull request may close this issue.

2 participants