Snapshot for release 2026.10.21.3 (internal 04b831a)

This commit is contained in:
Tom Bohar 2026-10-21 21:03:43 -04:00
commit c4efe5821d
46 changed files with 2657 additions and 213 deletions

View file

@ -7,7 +7,7 @@
1. writes obj\...\rynth-plugin.json from the csproj:
name RynthPluginName (default: AssemblyName without "RynthCore.Plugin.")
version Version (Publish-Update.ps1 passes -p:Version=yyyy.m.d.n)
minEngineApi RynthPluginMinEngineApi
minEngineApi RynthPluginMinEngineApi (raised in release builds; see _RynthPluginEffectiveMinEngineApi)
maxEngineApi RynthPluginMaxEngineApi (optional; leave unset - the table is append-only)
dependencies @(RynthPluginDependency) Include = plugin name, metadata MinVersion, Optional="true"
author RynthPluginAuthor (default: Authors, then Company)
@ -37,9 +37,41 @@
<PropertyGroup>
<!-- The engine API this SDK knows; tools\PluginManifestTests checks it equals PluginContractVersion.Current. -->
<RynthCoreSdkApiVersion>89</RynthCoreSdkApiVersion>
<!-- The first engine API that loads managed plugins and gives them Runtime\PluginShared (2026.10.19.1). -->
<RynthCoreManagedPluginApi>88</RynthCoreManagedPluginApi>
<_RynthPluginManifestOn Condition="'$(RynthPluginMinEngineApi)' != '' and '$(RynthPluginManifest)' != 'false'">true</_RynthPluginManifestOn>
</PropertyGroup>
<!--
The minEngineApi that goes into the manifest (and the [assembly: RynthPluginManifest] runtime
check): _RynthPluginEffectiveMinEngineApi.
Normally the plugin's own RynthPluginMinEngineApi, as it is.
RynthPluginSharedSdk=true (Publish-Update.ps1's release builds): the plugin ships alone in the
feed and runs against the RynthCore.PluginSdk.dll in Runtime\PluginShared, which reaches a
player only with the core installer of the same release. Its Has* checks guard against an
engine without a function, not against an older PluginShared without an SDK member it calls
(that fails the method, or the load). So:
* a declared minimum at or above RynthCoreManagedPluginApi (88) is the plugin's own checked
claim and is used as it is;
* a lower one (the "66: every newer call is behind its Has* check" of NativeAOT days, when each
plugin carried its own SDK) can't hold for a plugin that needs 88 just to load, so the build
uses RynthCoreSdkApiVersion, the API of the SDK it was compiled against: it may call anything
this SDK has, and the launcher then holds the plugin until the player's core has that API.
A plugin checked against an older PluginShared declares that API (88 or more) to keep running on
older cores. Release builds used to force -p:RynthPluginMinEngineApi=88 on every plugin instead,
so a plugin calling a v89 SDK member was offered to API-88 cores (structural audit 2026-10-21).
-->
<PropertyGroup Condition="'$(_RynthPluginManifestOn)' == 'true'">
<_RynthPluginEffectiveMinEngineApi>$(RynthPluginMinEngineApi.Trim())</_RynthPluginEffectiveMinEngineApi>
<_RynthPluginMinIsNumber>$([System.Text.RegularExpressions.Regex]::IsMatch('$(RynthPluginMinEngineApi.Trim())', '^[0-9]{1,9}$'))</_RynthPluginMinIsNumber>
</PropertyGroup>
<PropertyGroup Condition="'$(_RynthPluginManifestOn)' == 'true' and '$(RynthPluginSharedSdk)' == 'true' and '$(_RynthPluginMinIsNumber)' == 'True'">
<_RynthPluginMinRaised Condition="$(RynthPluginMinEngineApi.Trim()) &lt; $(RynthCoreManagedPluginApi)">true</_RynthPluginMinRaised>
<_RynthPluginEffectiveMinEngineApi Condition="'$(_RynthPluginMinRaised)' == 'true'">$(RynthCoreSdkApiVersion)</_RynthPluginEffectiveMinEngineApi>
</PropertyGroup>
<PropertyGroup Condition="'$(_RynthPluginManifestOn)' == 'true'">
<RynthPluginName Condition="'$(RynthPluginName)' == ''">$([System.Text.RegularExpressions.Regex]::Replace('$(AssemblyName)', '^RynthCore\.Plugin\.', ''))</RynthPluginName>
<RynthPluginAuthor Condition="'$(RynthPluginAuthor)' == '' and '$(Authors)' != '' and '$(Authors)' != '$(AssemblyName)'">$(Authors)</RynthPluginAuthor>
@ -56,7 +88,7 @@
plugin's own check matches its manifest without any code in the plugin. -->
<ItemGroup Condition="'$(_RynthPluginManifestOn)' == 'true'">
<AssemblyAttribute Include="RynthCore.PluginSdk.RynthPluginManifestAttribute">
<_Parameter1>$(RynthPluginMinEngineApi)</_Parameter1>
<_Parameter1>$(_RynthPluginEffectiveMinEngineApi)</_Parameter1>
<_Parameter1_IsLiteral>true</_Parameter1_IsLiteral>
</AssemblyAttribute>
</ItemGroup>
@ -283,7 +315,9 @@ public class RynthEmbedPluginManifest : Task
<!-- 1 + 2: the JSON and RynthPluginInfo, before compiling (RynthPluginInfo is compiled in). -->
<Target Name="RynthGeneratePluginManifest" BeforeTargets="CoreCompile" Condition="'$(_RynthPluginManifestOn)' == 'true'">
<RynthWritePluginManifest Name="$(RynthPluginName)" Version="$(Version)" MinEngineApi="$(RynthPluginMinEngineApi)"
<Message Importance="high" Condition="'$(_RynthPluginMinRaised)' == 'true'"
Text="$(RynthPluginName): RynthPluginMinEngineApi $(RynthPluginMinEngineApi) is below the managed-plugin API $(RynthCoreManagedPluginApi); this shared-SDK build declares $(_RynthPluginEffectiveMinEngineApi), the API of the SDK it was built with. Declare a checked minimum (at least $(RynthCoreManagedPluginApi)) to run on older cores." />
<RynthWritePluginManifest Name="$(RynthPluginName)" Version="$(Version)" MinEngineApi="$(_RynthPluginEffectiveMinEngineApi)"
MaxEngineApi="$(RynthPluginMaxEngineApi)" SdkApiVersion="$(RynthCoreSdkApiVersion)"
Author="$(RynthPluginAuthor)" Description="$(RynthPluginDescription)"
Homepage="$(RynthPluginHomepage)" License="$(RynthPluginLicense)"