-
Notifications
You must be signed in to change notification settings - Fork 352
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
Discussion about breaking changes and versioning #1022
Comments
Thanks for starting this discussion, @ix-dcourtois, and I think it's very worthwhile. To align terminology for this thread, I'll point out the documentation on the MaterialX versioning system, so that we have a common language for describing the MaterialX versioning capabilities as they stand today: |
Ah yes my mistake, I thought the 3 digits were the usual |
A patch identifier was considered before so maybe something like this could work (?):
So next patch would be
I still am leaning towards having build / patch number be considered of the document upgrade logic for data files as it would remove headaches (and disgruntled integration teams :)) of not knowing if the data format has changed or not. As for tagging in the repo, I've heard that folks want to create specific branches for releases, |
@bernardkwok That's an interesting idea, though I was imagining the reverse of your proposal, where a |
@jstone-lucasfilm My thoughts exactly! |
@jstone-lucasfilm, @ix-dcourtois I didn't read carefully enough that your looking for the lowest level for pushing out "non-breaking" changes. Perhaps I'm thinking more of file-format bumps where everything breaking must have a version bump, so I would still put forth the suggestion that we formally add "patch" as part the document as required. I'm wondering if it's good to explicitly lay out what is considered "breaking", how long old behaviour needs to stick around, Examples:
Perhaps I'm overthinking this, but in practice breaking and non-breaking changes can inter-mix so pushing breaking changes Please let me know if I'm too noisy on this the details of this :) |
It's like trying to get one number or dotted stream of numbers to do the job of SemVar for API, and simultaneously SemVar for what can be reified in a material graph. The thing about SemVar and any dotted number scheme is there's an implication of strict ordering, such that a.b.c >= d.e.f iff a >= d & b >= e & c >= f. It's not clear to me reading this thread that there is a strict ordering possible when api and data model compatibility are not also strictly ordered. In other words, data model could increment many times without incrementing api, and vice versa. I think the only thing that makes sense is something like 1.38.6_d1.38.6 where d tags the data model (so one doesn't forget which is which every time you look at a version or are responsible for getting a release published ;) ) and then over time the two numbers increment independently. The suggestion of 1.38.6_d1.38.6 comes from the idea of establishing an epoch, the zero-day when both API and data number were both thought to correspond one to one. If any one has a better analysis of the mathiness of it all that doesn't require six numbers, I absolutely stand to be schooled :) Postscript - the argument against is that all of the linux tooling around being smart about versions doesn't work with this scheme, but I'd argue that since matx isn't following semvar anyway, that was never an argument in the first place. Post Postscript - it also begs an argument about SO numbering, presumably SO numbering increments by one, every time either API or Data model advances. I don't know if matx already has an SOVERSION policy in place. |
@meshula I think it's reasonable to assume a strict ordering, where the specification version would never increase without clearing the build and patch versions to zero. So when we ultimately release a 1.39 specification for MaterialX (e.g. containing proposed improvements to the connection syntax between nodes), I would expect the next released codebase to be While we have historically provided deprecated wrapper methods to inform clients about changes required in their code (and we're interested in improving this deprecated functionality system as suggested by @kwokcb above), I wouldn't expect a client application upgrade to this |
That makes sense to me. From the conversation so far I was starting to struggle to identify if that, or some similar mechanism, was the case or not. |
Thanks for starting this discussion, @ix-dcourtois, and we've clarified the rules for changes allowed in version upgrades in #1664. |
Hi,
I'd like to open a discussion about a little friction when updating MaterialX library: breaking changes :)
This is a bit touchy because I know that from a library's maintainers' point of view, it's very tempting to evolve the API to keep it as clean as possible, at the risk of breaking things for user code. But on the other hand, every time I update MaterialX in our build system, I have to spend a fair bit of time to fix things. Sometimes it was quite simple, some other times a lot trickier. And most of the time at places where I didn't expect it :)
Anyway, MaterialX being quite new, I understand that the API is not stable enough yet, and trying to make it evolve while trying to keep it backward compatible could quickly become a maintenance nightmare for you. But I feel there must be a sort of middle ground that would allow us to update without too many headaches, and you to make changes without dritying things too much, thus this discussion.
For breaking changes in the C++ API, a solution could be to flag things as deprecated while keeping them, and add the new things in parallel. And once in a while, cleanup the deprecated APIs. Ideally, the cleanup (e.g. breaking change) would happen on minor version update (e.g. from
1.38.5
to1.39.0
for instance) This way, patch version update could still introduce new functionality, but it would guarantee that it wouldn't break user code: we would be able to update a lot easier, get new functionality and fixes without problem, and we would have time to convert the deprecated APIs that we're using before updating to a new minor version.The second kind of breaking changes are ones related to data: for instance between the 1.38.3 and the 1.38.5, the directory structure of
libraries/genosl
changed, and the osl headersmx_funcs.h
moved around. This broke compilation of generated OSL code because the include paths were no longer set correctly, so we had to patch our compilation options to account for that. Those kind of changes are a bit more difficult to handle I think because there is no clean deprecation mechanism for those... Maybe at least defer those changes to a minor version update? That way patch version update would guarantee that we could update without problem?Sorry for the length :)
Any thoughts, ideas?
Regards,
Damien.
The text was updated successfully, but these errors were encountered: