OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.87k stars 6.59k forks source link

[REQ] Deprecating Unreal Engine 4 support #15067

Open Kahncode opened 1 year ago

Kahncode commented 1 year ago

Is your feature request related to a problem? Please describe.

I am the original author and maintainer of the cpp-ue4 template. For maintenance purposes, i'd like to deprecate Unreal 4 support and focus only on forward compatible Unreal 5 support.

Describe the solution you'd like

There are several ways to approach this and I'd want the opinion and approval of the maintainers of openapi-generator to move forward.

  1. Create a new template cpp-ue5, and deprecate cpp-ue4. I will no longer maintain cpp-ue4
  2. Add a new template cpp-ue, with explicit guarantees of compatibility with Unreal Engine versions. How far back do we want such compatibility?
  3. Keep maintaining both in cpp-ue4, however the complexity and areas that require polyfill will keep increasing. The generated code is also less readable.
  4. Create an option in the generator and try to resolve these conflicts by picking different mustache files or switching on the unreal engine version. This is also a viable and elegant way to deal with the issue, but the generator name is still cpp-ue4

Additional context

On average, Unreal releases 3 major versions per year. Unreal themselves on their marketplace only support the latest version and 3 version back for code plugins. I think a year of support is reasonable in this case.

Kahncode commented 1 year ago

@wing328 What is your opinion on this?

wing328 commented 1 year ago

My guess is that ue4 and ue5 are not "similar" so I would recommend the first solution, which is also what we do with swift (e.g. swift4 vs swift5 client generators)

jonkight commented 1 year ago

@Kahncode As a potential user of a ue5 generator and someone that heavily deals with online services in games, I'd like to see the second solution adopted. Otherwise, I'd rather see the first solution adopted over the third or fourth. Inevitably, there will be a ue6, so creating something that supports multiple versions of ue makes the most sense to me.

The support should look something like the below:

The transitions between major engine versions is the tricky part. Epic has improved making engine compatibility better, so upgrading isn't as bad. However, it would likely make sense to only support the previous major engine version (e.g. UE4) with bugs and security updates for some amount of years (2?) until fully dropping out of support. By taking this approach, you give people time to migrate or make peace with what they're stuck on. Even after support is dropped, they can always rely on older releases for their projects.

Kahncode commented 1 year ago

Hello, I haven’t yet progressed on this endeavour.

Honestly, major versions of the engine at this point are more of a marketing ploy than anything else, for this generator I don’t see the compatibility being broken too often.

I agree that option 2 is the most elegant, especially when combined with option 4. I’d be happy to provide an option in the generator for backwards compatibility. Ideally, if we could either deprecate cpp-ue4 or simply make it an alias of cpp-use, this would be easiest and cleanest.

Is there such alias functionality @wing328 ?

jonkight commented 1 year ago

I haven’t yet progressed on this endeavour.

Totally fine! I just stumbled across this issue looking over the ue4 generator and figured I'd leave a comment.

Honestly, major versions of the engine at this point are more of a marketing ploy than anything else, for this generator I don’t see the compatibility being broken too often.

Agreed. Things are much more stable these days. My support example was something I've seen successful inside companies that provide plugins to internal studios. The studios liked the predictability of it.

when combined with option 4

Just for clarity, the only thing I didn't like about option 4 was keeping the name ue4. That will be confusing over time.

Hope these comments are helpful.

dirtycajunrice commented 7 months ago

@Kahncode Hey has any progress been made towards a UE5 version? I am more than happy to help. The newer generator would benefit greatly from using a gameinstance subsystem vs a singleton

wing328 commented 7 months ago

simply make it an alias of cpp-use, this would be easiest and cleanest.

there's no such functionality

wing328 commented 7 months ago

FYI. cpp-qt4 client generator was renamed to cpp-qt like a year ago.

Kahncode commented 7 months ago

Hello @wing328 if that is the preffered path for you, i think we should rename the generator to cpp-ue or cpp-unreal for clarity.

@dirtycajunrice The generator is fully compatible with UE 5 latest and all versionf of UE4 from the day it was released. I disagree with your comment about making anything a game instance subsystem. The generated code is not a singleton either. It's a wrapper to the http call to use as you see fit, you may use it in a subsystem if you like. The unreal Online Subsystems are not uobjects and have a longer lifetime than game instances, in many cases you'll call APIs from there. This is a good example to show why APIs should not be UObject related at all. They may be called from the editor, engine, or game instance/uobject framework modules.

lchristille commented 5 months ago

@Kahncode There is any update on the project?

I'd like to help with the development to speed up the process if it could come in handy.

Kahncode commented 5 months ago

Hello, there has been no changes in that regard.

We could easily rename the generator to cpp-unreal and I would be in favor of that, if @wing328 agrees.

The generator is fully compatible with all unreal versions since its release date until today.

Is there anything specific you are looking for?

lchristille commented 5 months ago

Thank you for your answer.

From the thread, it was not apparent (at least to me) that no modifications were needed. Therefore, the generator is still supported and only pending renaming, correct?

Kahncode commented 5 months ago

Yes, the generator is actively maintained and works with Unreal Engine 5 as well.

On Mon, 3 Jun 2024 at 20:44, Luca Christille @.***> wrote:

Thank you for your answer.

From the thread, it was not apparent (at least to me) that no modifications were needed. Therefore, the generator is still supported and only pending renaming, correct?

— Reply to this email directly, view it on GitHub https://github.com/OpenAPITools/openapi-generator/issues/15067#issuecomment-2145887387, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALVKNGWOZMK22P3KLTUKXGLZFS2PBAVCNFSM6AAAAAAWKWRSB2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBVHA4DOMZYG4 . You are receiving this because you were mentioned.Message ID: @.***>