-
Notifications
You must be signed in to change notification settings - Fork 263
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
Project version number in CMake/pkg-config is still 1.5.5 even though headers seem newer #334
Comments
I don't think the SPIR-V version should come from CMake files. Maybe the CMake version should migrate to be the version of the build? Is it normal for the build system to decide the version of the content of what it is building? |
The important thing from my point of view is that if I build and install this project, and run One way to achieve that result would be to change the version number passed to CMake build's Another way to achieve that result (if CMake allows for it, I've lost track of which build systems do and don't allow dynamically-computed version numbers) would be to make the CMake build system parse whatever other location you consider to be the single source of truth, and use that to define its idea of the project version number, instead of it being a hard-coded string in A third way to achieve that result would be to make the CMake build system parse whatever you consider to be the single source of truth, use that to define some other CMake variable that is not CMake's idea of the "project version", and substitute that variable into
I'm not sure I understand. What else would be responsible for knowing what is the version number of the overall project that is being built, if not the project's build system? |
If there are two version numbers that are meant to be aligned, and there's a technical reason why there can't be a single source of truth, the next best thing would be to have an automated test that asserts that the two ideas of the version number match up, so that versions where they don't match up correctly don't get released. |
Maybe this version number should be removed, or more likely more clearly saying it's the version of something else, and more clearly be in its own number space, independent of the SPIR-V content. (If there's supposed to be an exact match, I think it should go away, so that fragility doesn't exist, e.g., if you need to know the SPIR-V version, look in the SPIR-V content. However, I can see the need for a version number that changes at the frequency of what the build system is building, not exactly matching the SPIR-V version.) Perhaps we should really be using the tags to know what's going on. |
It looks like this is implementable, and https://github.com/KhronosGroup/Vulkan-Headers/blob/main/CMakeLists.txt sets its CMake-level version number from the version number in
This project is called SPIRV-Headers, so I would have expected that it's a set of header files describing SPIR-V, and its build-system-visible version number represents the version of the SPIR-V headers that it contains and installs. Is that not true? (I was asked to package a project that depends on these headers but I have no particular knowledge of SPIR-V, so perhaps I'm missing something important.) If you're writing a build system for a dependent project and you want to say (pseudocode)
or
then the build system metadata (the |
Probably not exactly true in the way you want, and maybe that's why I wish this number hadn't been introduced. But, if it is introduced, those who want it should probably maintain it to actually have the semantic meaning they are looking for in it. I can see that if we define SPIR-V header versioning to be what this particular form of packaging wants, and push it upstream into the core project, that it might appear to work for those who want this form of packaging. And maybe we should just do that to make this discussion stop. I'd hesitate for a few reasons:
Maybe that's mostly too philosophical, but I do specifically worry that what is being done with other mechanisms (commit numbers, tags, maybe other git/github mechanisms) is being expected to be done by the version number, and that there actually is a human-level semantic mismatch around the word "version" between different parties. Maybe we need to make the big change here, to conform to a specific view of packaging, it's just that wasn't the original intent. Original intent was there could be multiple parties making SDKs, many packagers doing things differently for many different kinds of environments, and the core projects would simply say exactly what they were (not necessarily condensable into a single number), while the packagers and SDK makers would take that raw information from all the components to make coherent packages. |
That's basically what LunarG does. Our package version is derived from the version of the Vulkan header we choose to target. During an SDK release cycle, there is a large effort by many people to identify release candidates (identified either by their commit ID or branch name depending on the repository). As part of the release cycle we also tag the repositories with an SDK version. Other members of the community can use these tags for their release in their own packaging schemes if they see fit. That said, I have a few questions.
|
Thanks @jeremy-lunarg. I think the tags are a vital point, and if we haven't already said so, I recommend looking for the most recent tag to get the right contents to package. We discussed internally, and are not opposed to having some number that increments each time there is a change, to make it easier for downstream consumers to package, provided it's a robust (non-manual) process. If downstream only grabs tagged content, we'd only have to increment once per tag. Alternatively, we could increment once per commit, or once per change that's relevant downstream (i.e., every token reservation). Anyone have ideas or input on how to accomplish this, technically? Especially, accomplish it automatically? Just something that keeps bumping a version number for each change? Thanks! |
The headers
<spirv/unified1/spirv.h>
identifies itself asSPV_VERSION 0x10600
andSPV_REVISION 1
, which seems to mean human-facing version number 1.6.1 (or at least that's how the Debian packaging labels it), but theCMakeLists.txt
still hasand therefore the pkg-config metadata generated from
cmake/SPIRV-Headers.pc.in
also identifies this project as version 1.5.5.This makes it more difficult for a dependent project to check that it is going to be compiled against a sufficiently new set of SPIRV headers.
The text was updated successfully, but these errors were encountered: