Skip to content

Commit 85c7b38

Browse files
chore(audience): IVT for Samples.SampleApp + exclude Tests/Editor from headless build
InternalsVisibleTo grant for Immutable.Audience.Samples.SampleApp with a comment explaining the coupling: the sample reaches for OnLog / InvokeOnLog on ImmutableAudience, ToEchoDictionary, and Json.Serialize(dict, indent) / JsonReader.DeserializeObject — all helpers the public API deliberately does not expose. The sample ships from this repo and rebuilds alongside the SDK, so renaming any of these is a single-commit change that updates sample + SDK together. Audience.Tests.csproj grows a "<Compile Remove='Editor/**/*.cs' />" item group. No-op in this PR (Tests/Editor/ doesn't exist yet); prereq for the sample-app PR, whose editor-only tests reference Unity types (MonoBehaviour, VisualElement, SampleApp host MonoBehaviour) that fail the headless dotnet build. Unity runs those tests in-editor through its own test framework. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9381ece commit 85c7b38

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

src/Packages/Audience/Runtime/AssemblyInfo.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@
22

33
[assembly: InternalsVisibleTo("Immutable.Audience.Runtime.Tests")]
44
[assembly: InternalsVisibleTo("Immutable.Audience.Unity")]
5+
6+
// First-party SampleApp reaches Json.Serialize and
7+
// JsonReader.DeserializeObject; both stay internal so their
8+
// signatures aren't frozen into the public API.
9+
[assembly: InternalsVisibleTo("Immutable.Audience.Samples.SampleApp")]

src/Packages/Audience/Tests/Audience.Tests.csproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,12 @@
1515
<ItemGroup>
1616
<ProjectReference Include="../Runtime/Audience.Runtime.csproj" />
1717
</ItemGroup>
18+
<!--
19+
Exclude Tests/Editor/ from the headless dotnet build. Those tests reference
20+
Unity-only types (MonoBehaviour, VisualElement, SampleApp MonoBehaviour)
21+
and run inside the Unity Test Framework in-editor.
22+
-->
23+
<ItemGroup>
24+
<Compile Remove="Editor/**/*.cs" />
25+
</ItemGroup>
1826
</Project>

0 commit comments

Comments
 (0)