gateway-api-rs icon indicating copy to clipboard operation
gateway-api-rs copied to clipboard

Code Generators: Type Collision Resolution Improvements

Open shaneutt opened this issue 1 month ago • 6 comments

We've introduced new generators to resolve #38. While these are partially functional, there are inconsistencies in resolutions and the code is emitted when new types are introduced. For the moment we're not cutting releases with this change as there are improvements needed to get it ready, this is the tracking issue for that.

shaneutt avatar Oct 30 '25 14:10 shaneutt

hey @shaneutt, I was wondering if you could provide more info on what the problem is.. I have cut my own version of Inference Extensions and have been using them in Kubvernor https://github.com/kubvernor/gateway-api-inference-extension-rs so would be keen to see what needs to change.

dawid-nowak avatar Nov 16 '25 17:11 dawid-nowak

Try adding new types, and see that the ordering of things will change, causing the generators to do things like change which types get identified as duplicates, and modifying the common modules. I suspect it isn't a ton of time to fix, but I haven't quite gotten to it yet. If you would like to take a pass at it, feel free and it would be appreciated.

shaneutt avatar Nov 17 '25 12:11 shaneutt

I will have a look. Out of interest would you consider having a different/separate create for Inference Extension APIs ? I think that would probably reflect current state better where we have Gateway API and Inference Extension as separate entities.

dawid-nowak avatar Nov 17 '25 14:11 dawid-nowak

I suppose I'm open to the suggestion, ideally we would have common tooling so perhaps this would be good cause to get the type-reducer refit to be in kopium directly? 🤔

shaneutt avatar Nov 17 '25 14:11 shaneutt

That would be a better way. Otherwise as a stop-gap, there could exist two crates under gateway-api-rs: gateway_api and inference_ext_api. These two get published to crates.io but they would share the common code of type-reducer.

dawid-nowak avatar Nov 17 '25 14:11 dawid-nowak

Let's move this over to #175, as it's not specific to this bug.

shaneutt avatar Nov 17 '25 15:11 shaneutt