-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
Support for multiple versions of generator #1388
Comments
When you say |
I mean, that in theory people in production should never install CLI as Same with templates, in production, in pipelines they should run generation with templates not pointing like here, to latest: The problem is - can we assume people do it properly, can we "expect" them do it like this - and have it as defined assumption - so they always manually decide to use new version? the problem with this assumption is that it is not the best DX 🤔 So probably philosophy here should be to always assume people not always read docs, and we should somehow proactively protect them. From my perspective, always better to enable support for new generator version (or optimizer or anything else) and set the older one to deprecate with some period to have it enabled, and then removed 🤔 really hard to decide |
no other option really. We can educate through docs: https://www.asyncapi.com/docs/tools/generator/versioning but this is in my opinion just to make our lives easier, not users |
Sure! Currently we are collecting the template used, and also the CLI version if specified by the user, according to the documentation. I guess we could collect the template version as well if needed 🤔 cli/src/commands/generate/fromTemplate.ts Line 142 in f9a6303
So the different use cases are:
|
We can leverage also the efforts @Shurtu-gal is making to improve DX CLI, for instance if we want to force users to explicitly mention versions we can show a documentation link that shows the versions map between generator and templates. |
ok, so we look at a solution to support different version of generator in the CLI, right? |
Yes @derberg I think it's the most DX friendly option. |
are you, maintainers, will work on it or you have no capacity and rather expect contribution? |
I think @peter-rr or @AayushSaini101 will be interested in picking it up with some support. |
We can submit this as a bounty issue for Q3-2024 |
ok, but then we're talking about July. So until July nobody will be able to use new AsyncAPI Generator |
@Amzani Should we add then this issue to the current DX Working Group's cycle? |
@peter-rr done |
Scope update:
Working on the implementation now. |
So generator reach out v2 dropping support for some node versions: https://github.com/asyncapi/generator/releases/tag/v2.0.0
Normally according to #573 we should bump generator in cli and release new major of CLI. Basically generator drops support for node prior v18 and cli still supports older versions
but this is not a problem
problem is the generator functionality that we have, to prevent templates from failing with new generator version that may have breaking changes, we have such setting: https://github.com/asyncapi/java-template/blob/master/package.json#L102
so if we bump v2 generator in CLI, all the users of templates, will be blocked until templates developers will update config to support v2. Makes sense
so yeah:
Scope
The text was updated successfully, but these errors were encountered: