-
Notifications
You must be signed in to change notification settings - Fork 57
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
0.5.x doesn't compile anymore #117
Comments
Might be safer to always do a major version increment for a new release, and do something like |
My PR removed Op::DecorateStringGOOGLE in favor of OpDecorateString because they are defined in an enum and have identical values. |
So, I'm pretty sure, we should technically be yanking the version of spirv_headers as we just broke semver, however that puts us in a tight spot around the fact that the API version matches the crate version. This can't be true any more, so I think we need to come up with a better versioning scheme for spirv_headers. I can easily see cases where we want to update the crate of an older SPIR-V version to add new features, so the best path probably needs to involve a way of letting us update an arbitrary API version, possibly all at once as the feature changes are likely to be shared between API versions. I'm tempted to suggest feature gating any modifications to the API but that could become unruly very quickly, another option I can see is releasing different crates for different API versions but that has discoverability downsides. Does anyone have any thoughts/suggestions? @gfx-rs/translators |
The other alternative is to not try to make it work with semver to begin with since upstream can't guarantee it either and recommend strict versioning for this crate instead. |
Unfortunately, that's not an option, Cargo and anyone using the library will assume semver, that's not a contract we can break. |
@Skepfyr we need to yank the breaking version until a solution is in place... |
Thanks for the report @MaikKlein and sorry for the delay! It's a common pattern in SPIR-V to promote a certain symbol into core by dropping the suffix and we should maintain both symbols in the spirv_headers and map to the same value. I've been doing that for other symbols like Regarding the version, I still prefer to stay with the current version correspondance because of the simplicity and also we are already on this route. As said in the previous section it should not be a problem to update from 1.3 to 1.4 to 1.5 or whatsoever given just pulling in more symbols. It's unfortunate that we break the correspondance for 1.4.1. But AFAICT, APIs specify major and minor versions when picking which SPIR-V to support. (Vulkan 1.0 supports SPIR-V 1.0, Vulkan 1.1 supports 1.3, etc.) And I expect spirv_headers users to do the same generally. The revision number (the patch number in semver's term) does not matter that much. I'm fine to detach the patch number from SPIR-V spec and use it for patches of the crate (which should really happen very rare). And make the expectatation straight by put it in the doc of spirv_headers. How does this sound? :) Besides, is someboday willing to work on a fix to use associated constants to provide the missing symbols? :) |
Yanked 1.4.1 for now. |
I had a look around and I couldn't find the SPIR-V versioning scheme, if someone could find this it would be really helpful. It is very possible they aren't following semver, which could bite us badly if a change comes that breaks that promise. I agree that the current scheme is the simplest, although the unified spec may hint that we should be approaching this differently. However, my main issue with the current approach is that we can't make changes to the old specs, they are essentially set in stone and adding new bits of information to them, eg operand number/types is impossible. |
I'm working on fixing this bug by generating associated constants for the duplicated op symbols now. |
There was a breaking change in spirv_headers 1.3 to 1.4 where
DecorateStringGOOGLE
got renamed.Temporary workaround is to fix the cargo.lock file to point to
1.3.4
instead.The text was updated successfully, but these errors were encountered: