-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Official mechanism to backfill/pin older library versions [was: multiple versions] #25
Comments
This is indeed a very nice feature but the actual state of the project doesn't really allow something like that. |
Preferred libraries are the most up-to-date, stable libraries though? |
Yes. By "dev version" they mean "built from the sources" version. |
This can be partially solved by adding a major version number to the package name. Here is a relevant example #26 |
Is there a way to mark two ports as being mutually exclusive? |
As of right now, I don't think so. But should be relatively easy to add it. |
Supporting a major version number is only one step away from supporting a "real" version number.
would become
And the CMake file responsible for finding the library required would also have to be able to look for a precise version. (Maybe defaulting to the most recent one if no specific version is asked.) |
The criteria for defining whether it's appropriate to split package names on major version is "Can I include and link multiple major versions of this library at the same time?" If the answer is yes, then the package should certainly be split on major version (eigen3, libpng16, etc). However, if the answer is no (i.e. if you would need to mark the libraries as mutually exclusive), then they should be the same package. If you (locally, for a specific project) need to change the library version, you can replace the portfile. If it's an older version in the repository, you can |
That is true for, as you stated, a local specific project. |
The issue is what happens when you have two projects which claim to require boost 1.55 and boost 1.60. Do you install both? What if they're libraries and you want to link both of them into the same process? Now you have multiple copies of boost in your process; I hope you aren't passing boost objects over any boundaries or relying on any global state to be shared. Instead, the approach vcpkg takes is that you specify the versions you want for your system. Every library you build will build against the same set of libraries, guaranteeing compatibility with each other. If you really like boost 1.55, you can certainly set that as your boost version by pinning the |
This is a great example. How can I get Boost 1.55? I can't find it in the project history... The point is, I understand the reasons behind not adding a direct support for library versioning, but then it means that it supports only library versions since vcpkg creation, because no one bothered to add older versions and now it's too late (assuming you will not accept a series of PRs to e.g. change Boost version to 1.53, then to 1.55, then 1.58 and then back to 1.61, assuming those are the "major" versions people use). |
I understand what you mean but we could just change the meaning
By the way, I only think about CMake-based projects while thinking about solutions. I never really create projects based solely on Visual Studio. Maybe the problem is more easily spotted when you are used to Visual Studio-based projects. |
Just to make it clear, we have two topics here:
The second one can be resolved by having pinned |
Yes, we definitely need a way to backfill older ports and make them discoverable. Perhaps an alternate branch/tree in the git repository that can be automatically searched, either via |
I believe this would be a problem even without using vcpkg, though I understand the desire to make vcpkg as robust as possible. I admit that I have only a cursory understanding of vcpkg's internal mechanisms. Right now it seems like vcpkg just puts all headers from all installed packages into one dir, all LIB files into one dir, etc. If it hasn't already, this is almost definitely going to create collisions in the future. I'm not sure how hard it would be to implement (assuming it's even possible), but I can imagine a system where there is one port that is "packagename" and potentially multiple other ports that are "packagename-version". If someone just includes the headers for "packagename, they will get the most current version (vcpkg would redirect to the subdir that has the most current version; see below). Alternatively, if they need a specific version (that is available through vcpkg), they would add a preprocessor define to their project properties that would be something like VCPKG_packagename_version which in turn would result in vcpkg setting the appropriate environment variables so that the requested version would be where the includes, libs, dlls, etc., would be drawn from. This, if possible, would both eliminate the potential problems that could result from the current shared directories design while also making side-by-side library versions available and usable by separate projects. As described, it wouldn't address any attempts to link the same libraries or libraries with the same exports. But to me that's a separate issue and one that people trying to do that without vcpkg would also face. Just an idea. Maybe it's workable. If not, maybe it will help spark something that is. |
Any new thoughts on this? The Another potential issue would be propagating fixes to |
I think PR #11758 can resolve this requirement |
Hi @YehezkelShB |
@JonLiu1993 Sounds promising! Thanks. |
@vicroms I think we can close this issue, if link this issue with some documentation to show how to doing this. |
Hi All, Installing an old or specific version in vcpkg is supported now, see versioning for details, please file a new issue if you encounter a problem. |
this allows people to use, for example, IN_LIST
The following PRs are included: * hopefully fix crash in constraints (microsoft#60) * [vcpkg] allow --version to check the version (microsoft#50) * Remove baseline warning (microsoft#27) * [git] always pass autocrlf=false (microsoft#58) * ignore QtCreator CMake project files (microsoft#54) * ignore .DS_store files (microsoft#53) * [vcpkg] x-add-version now also checks if the manifest file is properly formatted (microsoft#43) * hopefully fix ci issue microsoft#16773 (microsoft#34) * Add docs to set VCPKG_ROOT to run tests (microsoft#45) * [vcpkg] x-add-version improve speed by calling get_builtin_baseline only once (microsoft#44) * add clang-format version to format-cxxcode (microsoft#41) * [vcpkg] Introduce experimental workaround X_VCPKG_NUGET_ID_PREFIX (microsoft#40) * [supports] Add `native` identifier expression and x-check-support command (microsoft#29) * [metrics] Split reporting of installs into name:triplet (microsoft#39) * [vcpkg] Improve error when accessing missing feature (microsoft#38) * [vcpkg] Allow shallow git registries (microsoft#37) * Disable git autocrlf when archiving tree (microsoft#36) * Use only named packages from extra registries (microsoft#35) * [registries] add metrics (microsoft#30) * Add vcpkg policy cmake helper port support (microsoft#17) * [osx] add support for rosetta (microsoft#23) * don't build tls12-download unless it's needed (microsoft#33) * Add new telemetry points for versioning (microsoft#21) * add cmake_minimum_required to vcpkg_tags (microsoft#25) * [x-add-versions] Perform atomic replacement of versioning files (microsoft#28) * [tools] support gsutil (microsoft#19) * add CUDA 11.1 and 11.2 to KEEP_ENV_VARS defaults (microsoft#26) * Add finite timeout on CURL metrics endpoint. (microsoft#22) * fix UB in make_error_code(utf8_errc) (microsoft#18)
update to hidapi 0.11.0
Preliminary changes to add tracing/logging
Add the ability to include an XML from another one
Sometimes there is a reason to use a specific older version of a library. Usually, it happens due to API changes the project can't absorb right now or 3rd-party libraries that aren't compatible with the newer version (yet).
Seems like a good idea to allow installation of an older version and maybe even having a few versions installed side-by-side.
The text was updated successfully, but these errors were encountered: