Skip to content

build(SdkGenerator): upgrade CppSharp and retarget to net9.0 - #59

Draft
ofmiceandcam98-eng wants to merge 1 commit into
tiltedphoques:mainfrom
ofmiceandcam98-eng:build/sdkgenerator-cppsharp-net9
Draft

build(SdkGenerator): upgrade CppSharp and retarget to net9.0#59
ofmiceandcam98-eng wants to merge 1 commit into
tiltedphoques:mainfrom
ofmiceandcam98-eng:build/sdkgenerator-cppsharp-net9

Conversation

@ofmiceandcam98-eng

Copy link
Copy Markdown

Problem

SdkGenerator pins CppSharp 1.1.5.3168, whose bundled Clang is too old for the MSVC 14.44 STL. On a current toolchain the build fails with:

error STL1000: Unexpected compiler version, expected Clang 19.0.0 or newer

Fix

Upgrade to CppSharp 1.1.84.17100, which ships a new enough Clang. That package targets net9.0 only, so SdkGenerator is retargeted to net9.0 as well.

Scope is deliberately narrow: only SdkGenerator moves to net9.0. The SDK and plugins stay on net8.0, and CI already installs the .NET 9 SDK, so no workflow change is needed. SdkGenerator is a build-time code generator, not something shipped to clients.

Worth knowing

SdkGenerator/Program.cs wraps Main in catch (Exception e) { Console.WriteLine(e); }, so codegen failures exit 0. The build then proceeds and fails later with confusing namespace 'Internal' does not exist errors instead of surfacing the real parse error.

That cost me a while to track down. Worth a non-zero exit — happy to raise it separately if you'd like.

Related

CppSharp 1.1.5.3168 bundles a Clang too old for the MSVC 14.44 STL, so
SdkGenerator fails on a current toolchain:

  error STL1000: Unexpected compiler version, expected Clang 19.0.0 or newer

1.1.84.17100 ships a new enough Clang. It targets net9.0 only, so
SdkGenerator moves to net9.0 as well; the SDK and the plugins stay on
net8.0. CI already installs the .NET 9 SDK.

Only SdkGenerator is affected - it is a build-time code generator, not
something shipped to clients.
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.

2 participants