-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
Put all (most) templates into the generator together for better developers' experience #1249
Comments
Anyone's comments are welcome! Let's discuss this and see what we should do about it! |
pinging maintainers that maintain different templates - for visibility @mr-nuno @connil @kaushik-rishi @AGurlhosur @dalelane @dan-r @KieranM1999 @lewis-relph @JEFFLUFC @Tenischev @CameronRushton @anandsunderraman @smoya @emilianozublena @magicmatatjahu @jonaslagoni |
The objective sounds reasonable to me - simplifying the dev environment/experience is a good goal. Have you thought about how to handle releases? Do you think they should similarly be combined, or kept separate (separate releases for each generator, although in the same repo)? |
I am slowly pulling away from the generator and offering an alternative, but it sounds like a good idea, but don't count my vote 👍 |
@dalelane That's a great question. I think a separate release with necessary tests before any release might be a good option. It means that we should allow each template maintainer to have their own release for flexibility, but we should create tests to make sure that their new releases can run perfectly with our generator functionalities. What do you think? Happy to discuss. : ) |
To be honest, I was thinking that like in case of recently merged "filters" (that are released as part of generator by default, and do not need to be released separately) we could integrate "templates" in the same way, that they are by default part of the package (no npm install in the background fetching from npm). Of course we would still support people to manage their own templates separately, even in private registries - but this would be something like an "extension" or "customization" functionality. From CLI API perspective we would have Does it make sense? We probably need some PoC first 🤔 |
Hi all, sorry, but I couldn't agree with proposed changes.
Also, I would like to discuss this:
Why not create an issue for generator repo and fix it with MR? As I may see the generator is open-source. |
Hey @Tenischev
why do you think we make components heavy coupled? parser is staying outside? and if someone wants to stay with template outside, it is also allowed
the truth is that in reality mono-repo means less code and less disk space as there is more space for reusability. We already have monorepo in generator -> it was proposed in October 2023, no objections, and things are already in motion - so far so good, no issues on performance
we are not the only ones in that field. There are multiple projects doing monorepo, or are so complex that they need 20 or more maintainers - all of that is easily handled by labels and automation through issue comment commands
we did it already, it is really not that complex, and the advantage is that people are working closer. Modelina already has approach with champions and we can do the same or do what was done in website with triagers and committers that enables us to invite people to collaborate closer on early stage, as triagers that will do initial reviews and assign issues to proper groups.
definitely, that would be lovely, but as long as this is optional, it is not perfect solution. Also people don't do it because of bad faith, but also because of some lack of knowledge. it is critical to simplify things - like a refresh on approach to speed up things first we are deprecating cli and nunjucks -> #1255 the best would be if we forget about the name "template" and rename it to something like "plugin/extension/customization", so we still allow people to do things on their own, behind firewalls or stuff like that. By default generator would have templates inside, like "generators", organized from perspective of what user wants to generate, like for example "client java" - so user do not have to research all the templates, look for their repositories, often go to not only readme but also code, to understand what they will get. For me main motivation is "community" - to get all code/docs generation fans together closer. As a side effect, with react render engine I believe that by working together in one place on all these generators, we will automatically start working on a library of react components that template/extension developers will use as dependency and also speed-up their work on templates For now, we are 1 year after v3 release, and only 3 templates support it, and we need to do something to improve the development flow/speed |
sharing a context, why issue was closed. The discussion did not continue and we jumped into the PoC work under #1269 so this discussion could be closed - and actual PoC it was better to separate |
fyi proof of concept is merged https://github.com/asyncapi/generator/tree/master/packages @dalelane atm, how I see it long term is that templates that are part of generator will most probably not be versioned at all, and included inside generator - but we will see @Tenischev the PoC showed that with turborepo that handles monorepo setup, we will be able to easily make conditional testing, and CI should not take long to run. Also with first simple example of template I already proved that there is a lot of code reusability across templates - expecially with extracting info from AsyncAPI documents - so long term it will really be better if main templates are developed inside generator and we reuse on regular basis |
According to #1212, we propose to incorporate all the templates into the generator repository. Right now, templates are separated in different repositories (HTML templates, nodejs template, e.g.)
Why separation of templates from generator is not a good idea: Separation of templates causes an issue for both maintainers and developers. Because templates are not part of the generator repository, template developers sometimes need to do workarounds to address generator issues they encounter during development since they don't have access to make changes to generator and test them locally. Workarounds could lead to unexpected bugs in the codes, therefore making our codes harder to maintain.
Why integration of templates into generator would help: Putting templates into the generator repository will allow developers to test changes locally in the generator repository, making the development easier and reducing the number of workarounds in the template codes.
Would template developers still have ownership of their codes: Yes! We would implements championships that Modelina repository uses to allow champions to have their areas of responsibility where they can merge and accept pull requests. Template developers would have their templates as their areas of responsibility so they can still merge and accept pull requests for their templates after being integrated into the generator repository.
The text was updated successfully, but these errors were encountered: