effect-aws icon indicating copy to clipboard operation
effect-aws copied to clipboard

Generate all clients?

Open joepjoosten opened this issue 1 year ago • 5 comments

Is there a reason not to generate all clients and create a pull request with the latest version of all clients (with the proper errors per command)?

Just wondering what is holding "us" back? Is there something I'm missing here?

I could spend a day this weekend to generate them all...

joepjoosten avatar Mar 15 '24 15:03 joepjoosten

hi @joepjoosten nothing stops us, I initiated this repos to first cover what I needed, so now we have codegen solution which can be used to generate other clients. (thanks to @godu ) I'm still thinking is it correct way to do it like we do, maybe it would be a good idea to generate them during release phase, so we don't have to commit clients, and maintain only the code generator. for now it is okay to generate and commit, go ahead if you want to contribute, I'm open to it.

floydspace avatar Mar 15 '24 19:03 floydspace

Hi @floydspace @joepjoosten,

Apologies for promoting my solution, but I have something that might interest you. I also love Effect and AWS. Here’s my code generator that serves a similar purpose:

effect-ak/aws-sdk

I believe this solution can generate the necessary code you need.

kondaurovDev avatar Dec 01 '24 17:12 kondaurovDev

Hey @kondaurovDev thanks for that.

Ts-morph is in my list of packages which I want to try , thanks for good example

I'm not sure if your package specifically somehow can be used, bc I see the generated output is a bit opinionated.

So it is definitely helpful as inspiration, but not directly imo

But my ultimate goal is to generate all the packages during build time, so we don't have to commit all those code duplicates

floydspace avatar Dec 05 '24 12:12 floydspace

Hi @floydspace

But my ultimate goal is to generate all the packages during build time, so we don't have to commit all those code duplicates

What do you mean by "all the packages"? And "to commit all those code duplicates"?

I think it's not feasible to generate all of AWS sdk clients (there are ~400 sdk clients) and different project may use different sets of those sdk clients.

I'm still thinking is it correct way to do it like we do, maybe it would be a good idea to generate them during release phase, so we don't have to commit clients, and maintain only the code generator.

In my opinion that decision must be made by developer, whether he wants to commit the generated code or add the generated folder in .gitignore. I remember the time when I was a scala developer and we used different code generators in our projects (most of them were related to protobuf).

I'm not sure if your package specifically somehow can be used, bc I see the generated output is a bit opinionated.

It's not usable in effect-aws repository I believe but it can be used on its own. It will work with any project that has dependencies on @aws-sdk/client*

kondaurovDev avatar Dec 05 '24 14:12 kondaurovDev

What do you mean by "all the packages"? And "to commit all those code duplicates"?

I meant "all the clients", so we generate during build time, and the publish to npm, like it is done in zio-aws I guess.

I think it's not feasible to generate all of AWS sdk clients (there are ~400 sdk clients)

it is the point why we still explicitly have only limited set of clients published, I cannot guaranty it would work for all aws clinets and I'm not comfortable with that

floydspace avatar Dec 05 '24 14:12 floydspace