Skip to content

Feature/unreal5.7 - #2344

Open
heitara wants to merge 6 commits into
Tencent:masterfrom
heitara:feature/unreal5.7
Open

Feature/unreal5.7#2344
heitara wants to merge 6 commits into
Tencent:masterfrom
heitara:feature/unreal5.7

Conversation

@heitara

@heitara heitara commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Properly create generates .ts type files without any TS keywords, which can cause problems.

  • The UE types that contain keywords are renamed, so the resulting .ts files can used with TypeScript without errors.
  • The terminal in UE prints errors if there is anything that Puerts plugin faces. Failing silently is not an option.

heitara added 5 commits May 12, 2026 10:57
Documents two issues found when building the plugin against UE 5.7:
1. AdditionalCompilerArguments is invalid in UE 5.7 BuildConfiguration.xml;
   use PCHMemoryAllocationFactor instead to pass /Zm to cl.exe.
2. The XGE executor ignores MaxParallelActions, causing burst-parallel PCH
   allocations that exhaust virtual memory commit (error 1455 / C1076).
   Fix: set bAllowXGE=false and MaxParallelActions=4 in BuildConfiguration.xml.
UE 5.7 no longer injects ENGINE_MAJOR_VERSION into the compiler command
line; it must be pulled from Runtime/Launch/Resources/Version.h. The
SharedPCH for the Editor target happens to include it transitively, but
the Game target's smaller PCH does not, causing C4668 errors on any file
that tests that macro without an explicit include.

Also add UObject/Package.h to JSClassRegister.cpp so that UPackage is
fully defined when HasAnyPackageFlags is called in the Game target
(where the monolithic Engine PCH is not present).

Files changed:
- DefaultJSModuleLoader.cpp: add Version.h before #if ENGINE_MAJOR_VERSION
- ObjectRetainer.h: add Version.h before #if ENGINE_MAJOR_VERSION
- JSClassRegister.cpp: add UObject/Package.h for full UPackage definition
@getong

getong commented Jun 19, 2026

Copy link
Copy Markdown

ue 5.8 released, how about adding 5.8 support?

@heitara

heitara commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Sure! We will work on it next week.

* feat: project specific clang-format applied

* feat: Reverted the V8 to 9.4.146.24 per review

* feat: correct reserved-word verification false positives

1. Anchor VerifyNoReservedWordIdentifiers regex to line-start
   declarations so reserved words inside JSDoc prose aren't flagged.
2. Make IsTypeScriptReservedWord case-sensitive (ESearchCase::CaseSensitive)
   so PascalCase UE types (Class, Enum, Function, ...) aren't wrongly
   flagged/escaped — TypeScript keywords are case-sensitive.
@chexiongsheng

Copy link
Copy Markdown
Collaborator

The master branch compiles in UE 5.7 even without the changes you're submitting.

@heitara

heitara commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

The plug-in was not generating the TS types definitions of the UE classes, because some types are using TS keywords like enum. The added code just renames such types in the TS code. The latest commit is addressing the CI scripts that are executed on the cloud.

@chexiongsheng

Copy link
Copy Markdown
Collaborator

The plug-in was not generating the TS types definitions of the UE classes, because some types are using TS keywords like enum. The added code just renames such types in the TS code. The latest commit is addressing the CI scripts that are executed on the cloud.

That sounds unrelated to the UE 5.7 version?

@heitara

heitara commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

It might be a valid problem for earlier versions, but I've tested with 5.7 and I saw some types that are new and causing it. This the branch name is ue5.7. It this branch with these fixes we have a working version. If you want to back port them to 5.6 or you want to support earlier versions, feel free to do it.

@heitara

heitara commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

@getong do we need anything else to get these fixes merged? We have some updates for 5.8 as well, but let's fix everything one at a time? Anything that needs addressing to get this one resolved?

@getong

getong commented Jul 28, 2026

Copy link
Copy Markdown

It seems to me, the update is not about 5.7 and 5.8 . But it is related to some small bugfix of undiscoverd bug. so you can change your commit msg and add some test suite to describe it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants