-
Notifications
You must be signed in to change notification settings - Fork 191
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
[Feature Request] npm-like version managment #99
Comments
Hey thanks for your feedback! I agree that more advanced version management like npm would be awesome! However, being not having a package database means there is no way for CPM to be aware of package versions outside of the ones defined in the current project. This would however be required to provide more advanced versioning features like minimum required version. |
How about if you took the MacOS brew utility as an example, and keep the package information in a github repo. That way you maintain links to the git repos used by CPM. I also think that CPM as a package manager is pretty cool, and set-up a link for it from the cppreference open source libraries page: https://en.cppreference.com/w/cpp/links/libs |
Yeah, I was also thinking about something like this, though a git repo as a database has many issues itself, as it eventually becomes very inefficient. Another issue is there are many edge cases we have to think about. For example, how to handle mixing external and registered dependencies, how to deal with dependencies that define different databases etc. Also, implementing that kind of logic in CMake will be a pain. For me the current implementation covers all my use cases so I probably won't be looking into this for a while. You're very welcome to make suggestions or contributions toward this though! 😉
That's really cool! Thanks for featuring CPM over there! :) |
Is this a suggestion for a stand alone package manager? Like vcpkg? I don't think that's what CPM is or necessarily should be. If not, what would the syntax look like for CPMAddPackage("gh:fmtlib/fmt#7.1.3") |
So the way I understand the request would be for CPM to scrape all could scrape the source repository for all available versions and then decide on the highest one compatible with all version ranges specified in the project. The your example, this would allow users to specify something like Implementing this would be quite the undertaking though as without a central database of projects, finding an optimal configuration is non-trivial. Also we would need to implement version lock files first for reproducibility and safety from supply-chain-attacks. |
Hmm, I think there are ways to query GitHub for available releases using GitHub's CLI tool ( |
Hello, firstly thanks for the awesome package manager you made. I had a great time using this in some of my projects.
But I think a more advanced versioning feature like npm is essential for a package manager.
I think having this would be a great improvement for CPM. Would you like to have a look into it?
Thanks a lot in advance!
The text was updated successfully, but these errors were encountered: