-
Notifications
You must be signed in to change notification settings - Fork 2
Add ADR on contracts versioning #173
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
Conversation
Regarding the open questions:
Just
IMO, both are fine. I would personally go with Protobuf, since the result of this call should also be strictly defined, and we already have means for that.
I don't think we need.
If going with protobuf, I would just use string, the same way Protobuf uses
If we go with sem-ver compatibility, breaking the protocol according to Protobuf's "best practices" (if these even exist) would warrant a major bump. Everything else is minor.
What would be the use case for versioning the extensions? Although I agree with the concept of extensions, I don't think we need them to be versioned. I don't really see any value in versioning them. When it comes to naming - do we need to decide that right now? Regarding the |
I believe
Sure. The humanreadability will suffer a bit but nothing one can't fix by piping the output to
Do you mean "we can just include it in the output always" by that? The I still think there's nonzero value in having this information in context of given contracts input, see my reply to the last question.
👍
👍
Okay, imagine that we introduce an extension like Is this good enough of a reason?
Maybe not, but sooner than later would be preferable; support for
Yes, that's the idea. Or, going with the extension example above, if generated contracts contain |
I think we can provide both (e.g.
This is perfect reason, but I think this an overkill. Versioning contracts.proto will be hard in itself, versioning extensions will just add to the problem. In the example you provided, we can also go a different route - multiple extensions. One for .NET's I also haven't seen that many "extension feature flags" that are versioned - most tools go with just a name . And if version is needed, it can be easily added to the feature name. Also, I don't expect the "extensions" to stay as extensions for long. It would be too complex for us to manage and won't benefit us that much.
I would say - let's go with the flow. I don't think we need fully-fledged extension naming right now, as we only plan to have two extensions, and using
I think this (runtime detection) will be mostly unused feature, but this is just a hunch. Let's go with it, provided it won't take too long to develop. To sum up - I would ditch versioning of the extensions. I don't think it will be usable because of the complexity. I would implement the runtime-feature-detection provided it won't be too complex. I also don't think we need any complex extension naming. |
For the record, here are some remarks I received from @tomaszlaskowskiLC via other channels:
|
4b0dc5c
to
12ac880
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need (not in this ADR; probably in the docs) to define or at least recommend how the client generators behave if they don't support an extension.
I don't really see how a client generator can (fully) work if they don't support e.g. DateTime
extension. The generated contracts will be wrong/unusable, at least in the places where the DateTime
is used. Should it just fail? Should it emit a warning? If they emit a warning, what should be emitted in the code? Should we even document that or should we leave it for the clients to decide?
For now I'm leaning towards "report a warning, then error out when some unrecognized type is actually encountered" but we'll see. |
No description provided.