Azure / autorest.typescript

Extension for AutoRest (https://github.com/Azure/autorest) that generates TypeScript code. The transpiled javascript code is isomorphic. It can be run in browser and in node.js environment.
MIT License
177 stars 73 forks source link

Split RLC from Modular #1981

Open qiaozha opened 10 months ago

qiaozha commented 10 months ago

In our earlier discussions with Architects about multi clients, we have decided that we should split RLC from modular . And in the multi client PR implementation https://github.com/Azure/autorest.typescript/pull/1830, we just removed the subpath export from RLC. we still need to remove the generated code from Modular generation, instead we should just use the public RLC as a normal dependendency.

As we will not have public release of codegen internal tests. this kind of removal of code should behind the azureSdkForJS: true flag.

lirenhe commented 10 months ago

@qiaozha, could you add some description for this issue about what the current behavior and the expected output? If there are doc about the design, feel free to link it there as well. thanks.

deyaaeldeen commented 10 months ago

Would the routes still be generated and exported?

qiaozha commented 10 months ago

If you mean in RLC , then yeah. If you mean in Modular, no, there will be no RLC code in Modular generated code once this task is done.

deyaaeldeen commented 10 months ago

But I thought it is valuable for customers to use the RLC companion of the modular client for scenarios where unknown fields in the request or the response are needed. For example, see https://github.com/Azure/azure-sdk-for-js/issues/26579#issuecomment-1687141541

qiaozha commented 10 months ago

we will release a public version of RLC for every modular package. so in your example, you could just use @azure-rest/openai when the public RLC of openai is available.

FYI, your example will only work for ECMAScript customers not for CommonJS customers, that's the main reason we need to split the RLC from Modular.

cc @xirzec