Files
UnrealEngineUWP/Engine/Source/Programs/Shared/EpicGames.UHT
jonathan bard 0c6d30425f Added UHT support for `UE_DEPRECATED(all, "...")` macro, which is already used in the engine and will serve as a way to leave the UE_DEPRECATED mark on code that has been deprecated for more than 2 engine versions but has to stay in the codebase "forever" because it's reflected (UPROPERTY, UFUNCTION, UCLASS, USTRUCT).
Use case :
```
// Let's say we've deprecated the following code in UE5.1
UE_DEPRECATED(5.1, "Use the other thing instead...")
UPROPERTY(meta = (DeprecatedProperty, DeprecationMessage = "Use the other thing instead"))
float SomeUProperty_DEPRECATED = 1.0f;

UE_DEPRECATED(5.1, "Use the other thing instead...")
UFUNCTION(meta = (DeprecatedFunction, DeprecationMessage = "Use the other thing instead..."))
void FooBar(int32 X);

// Then when shipping UE5.4, we would turn that into:
UE_DEPRECATED(all, "Use the other thing instead...")
UPROPERTY(meta = (DeprecatedProperty, DeprecationMessage = "Use the other thing instead"))
float SomeUProperty_DEPRECATED = 1.0f;

UE_DEPRECATED(all, "Use the other thing instead...")
UFUNCTION(meta = (DeprecatedFunction, DeprecationMessage = "Use the other thing instead..."))
void FooBar(int32 X);
```

Therefore, the act of deprecating code that is more than 2 engine versions old consists in a simple text-search for "UE_DEPRECATED" in your code and for the occurrences that are not tagged as "all" and more than 2 versions old. Then:
- If the code is reflected, turn them into UE_DEPRECATED(all, ...)
- Otherwise, remove the code altogether

#rb Tim.Smith

[CL 31622610 by jonathan bard in ue5-main branch]
2024-02-19 15:38:08 -05:00
..