-
Notifications
You must be signed in to change notification settings - Fork 861
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
Improve versioning #1255
Comments
I very much like where you're going with this. Thank you for considering it! At what point would you tag the git repository? From a packaging standpoint, it would be great if you could simply tag when you think the major/minor numbers should change. That makes it quite simple to create a reproducible version string like you describe above for any commit with:
|
This looks pretty good. There's a semi-continuous-delivery model at play with respect to the Vulkan SDK. We don't deploy every commit but we try hard to minimize surprises when it comes time to deploy an SDK. That said, we'd like a way to enumerate each commit in the versioning scheme; even if each commit isn't deployed. This would let us integrate glslang into the Vulkan SDK at an arbitrary cadence. If the patch level correctly reflected the number of commits, then I think that would work for us. |
Your definitions for the major.minor.patch lines up well with "Semantic Versioning" https://semver.org/ As for the mechanics (not sure if you were asking about this aspect): For SPIRV-Tools, I opted to use a script to generate an include file at build time (and it's not checked into the source tree.) That generated version string can be queried via an API call. Details: a script reads the Note: When I incorporate Glslang and Shaderc into the Android NDK, the integration flow uses merge nodes, so the same content in this GitHub repo would end up with a different commit count (and git hash). Not sure if there's anything we can do to fix that. I've had feedback with SPIRV-Tools and Shaderc that for shared libraries, people want a SONAME that uses semantic versioning. I haven't implemented that. |
Another question is how to treat the dependency on SPIRV-Tools transforms for HLSL legalization. Sometimes bugfixes or enhancements arrive via that channel. |
Three more data points about semantic versioning itself.
Overall, I think semantic versioning is probably a net win, but ¯_(ツ)_/¯ |
FYI, I was earlier using this for a commit number:
But, with a client-side hook, which is too fragile, with multiple machines and committers. |
Since the SPIRV-Tools getting used changes infrequently compared to commits, it makes sense to bump the minor number for each update. |
Still missing is automation and final decisions on mechanisms in general.
FYI, I'm moving to having the semantic versioning in place, but separating that aspect (basically, policy) from final decisions on automation and other mechanisms in general. Current mechanism can be considered a placeholder, but want the basic versioning in place. |
There was a request to have glslang versioned with a
major.minor.patchlevel
triple. Since this is primarily associated with glslang as a SPIR-V generator, that's essentially what the triple will version, but will also reflect the validator and both GLSL and HLSL inputs to making SPIR-V.(Something similar was being done by a client-side hook, which stopped working and is fragile because it depends on the client machine.)
So, planning to look at the existing issues around versioning/tagging, as well as industry standard practice, and have some discussion here. Should look something like the following:
In
major.minor.patchlevel
:patchlevel
should go up in value with each bug fix, possibly being the number of commits that have been made to the repositoryminor
would go up with added functionality (or fixes that a big enough to be considered adding functionality)major
would likely be the current SPIR-V generator version, which is currently bumped for potentially backward incompatible code generation changes (but maybe is not sufficient to capture backward incompatible changes in how the front-end interprets shader source)Current behavior of
-v
is to print this, which already includes the number of commits (defunct, currently at2000
, see https://github.com/KhronosGroup/glslang/blob/master/make-revision) as a patch level, and theSPIR-V Generator Number
proposed as the major number:Command-line options should change to:
--version
as a synonym for-v
, with the first line of output containing themajor.minor.patchlevel
triple-dumpfullversion
print just the baremajor.minor.patchlevel
triple-dumpversion
synonym for-dumpfullversion
Any input?
The text was updated successfully, but these errors were encountered: