-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Initial AOT compatibility metadata #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
BenjaminMichaelis
merged 16 commits into
main
from
benjaminmichaelis/nuget-aot-assessment
May 19, 2026
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
fabc827
Add production AOT compatibility targeting
BenjaminMichaelis 4ba71f9
Address PR feedback on AOT target assets
BenjaminMichaelis 7d9ff94
Replace XmlSerializer with manual XmlWriter/XmlReader for full AOT co…
BenjaminMichaelis f8aa26b
Fix aot-compatibility CI job
BenjaminMichaelis f68a79e
Fix aot-compatibility CI job (workflow corrections)
BenjaminMichaelis f1a4253
Address PR review comments on AOT compatibility
BenjaminMichaelis 3cac23a
Reduce duplication: extract PlaylistXmlHelper and FilterResults
BenjaminMichaelis 0643515
Add net8.0 target to VSTestPlaylistTools to match TrxToPlaylistConverter
BenjaminMichaelis b2b432d
Enhance TestOutcome enum with additional statuses
BenjaminMichaelis a755801
Address PR review comments: README TFMs and enum parsing guard
BenjaminMichaelis 821918b
Address PR comments: CLI enum validation and docs grammar
BenjaminMichaelis ff656d9
Reintegrate TrxLib for TRX parsing and outcome API
BenjaminMichaelis 605c14b
Fix AOT smoke publish for multi-target project references
BenjaminMichaelis e52f4ba
Restore explicit TrxLib reference in CLI project
BenjaminMichaelis fe36a33
Merge origin/main into benjaminmichaelis/nuget-aot-assessment
BenjaminMichaelis c961431
Clarify AOT compatibility status in README
BenjaminMichaelis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,4 +35,4 @@ | |
| <PrivateAssets>all</PrivateAssets> | ||
| </PackageVersion> | ||
| </ItemGroup> | ||
| </Project> | ||
| </Project> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
VSTestPlaylistTools.TrxToPlaylistConverter.AotSmokeTest/Program.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| using PlaylistV1 = VS.TestPlaylistTools.PlaylistV1; | ||
| using PlaylistV2 = VS.TestPlaylistTools.PlaylistV2; | ||
| using VSTestPlaylistTools.TrxToPlaylist; | ||
|
|
||
| // --- V1: object creation and round-trip serialization --- | ||
|
|
||
| PlaylistV1.PlaylistRoot v1Playlist = PlaylistV1.PlaylistV1Builder.Create(["Ns.Class.Method1", "Ns.Class.Method2"]); | ||
|
|
||
| if (v1Playlist.Tests.Count != 2) | ||
| { | ||
| Console.Error.WriteLine($"FAIL: Expected 2 tests, got {v1Playlist.Tests.Count}"); | ||
| return 1; | ||
| } | ||
|
|
||
| string v1Xml = PlaylistV1.PlaylistV1Builder.ToXmlString(v1Playlist); | ||
|
|
||
| if (!v1Xml.Contains("Ns.Class.Method1") || !v1Xml.Contains("Ns.Class.Method2")) | ||
| { | ||
| Console.Error.WriteLine("FAIL: V1 XML missing expected test names"); | ||
| return 2; | ||
| } | ||
|
|
||
| PlaylistV1.PlaylistRoot v1Roundtrip = PlaylistV1.PlaylistV1Parser.FromString(v1Xml); | ||
|
|
||
| if (v1Roundtrip.Tests.Count != 2) | ||
| { | ||
| Console.Error.WriteLine($"FAIL: V1 round-trip expected 2 tests, got {v1Roundtrip.Tests.Count}"); | ||
| return 3; | ||
| } | ||
|
|
||
| // --- V2: object creation and round-trip serialization --- | ||
|
|
||
| PlaylistV2.PlaylistRoot v2Playlist = PlaylistV2.PlaylistV2Builder.Create([ | ||
| PlaylistV2.BooleanRule.Any("Includes", | ||
| PlaylistV2.BooleanRule.All( | ||
| PlaylistV2.PropertyRule.Solution(), | ||
| PlaylistV2.BooleanRule.Any( | ||
| PlaylistV2.BooleanRule.All( | ||
| PlaylistV2.PropertyRule.Project("MyProject"), | ||
| PlaylistV2.BooleanRule.Any( | ||
| PlaylistV2.PropertyRule.Class("MyClass") | ||
| ) | ||
| ) | ||
| ) | ||
| ) | ||
| ) | ||
| ]); | ||
|
|
||
| string v2Xml = PlaylistV2.PlaylistV2Builder.ToXmlString(v2Playlist); | ||
|
|
||
| if (!v2Xml.Contains("MyProject") || !v2Xml.Contains("MyClass")) | ||
| { | ||
| Console.Error.WriteLine("FAIL: V2 XML missing expected values"); | ||
| return 4; | ||
| } | ||
|
|
||
| PlaylistV2.PlaylistRoot v2Roundtrip = PlaylistV2.PlaylistV2Parser.FromString(v2Xml); | ||
|
|
||
| if (v2Roundtrip.Rules.Count != 1) | ||
| { | ||
| Console.Error.WriteLine($"FAIL: V2 round-trip expected 1 root rule, got {v2Roundtrip.Rules.Count}"); | ||
| return 5; | ||
| } | ||
|
|
||
| // --- Converter: exercise TRX parsing path with a real TRX file --- | ||
|
|
||
| string trxContent = """ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <TestRun id="run1" name="TestRun" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010"> | ||
| <TestDefinitions> | ||
| <UnitTest name="TestMethod1" id="test1"> | ||
| <TestMethod className="MyNamespace.MyClass" name="TestMethod1" /> | ||
| </UnitTest> | ||
| <UnitTest name="TestMethod2" id="test2"> | ||
| <TestMethod className="MyNamespace.MyClass" name="TestMethod2" /> | ||
| </UnitTest> | ||
| </TestDefinitions> | ||
| <Results> | ||
| <UnitTestResult testId="test1" testName="TestMethod1" outcome="Passed" /> | ||
| <UnitTestResult testId="test2" testName="TestMethod2" outcome="Failed" /> | ||
| </Results> | ||
| </TestRun> | ||
| """; | ||
|
|
||
| string trxPath = Path.GetTempFileName() + ".trx"; | ||
| try | ||
| { | ||
| File.WriteAllText(trxPath, trxContent); | ||
| var converter2 = new TrxToPlaylistConverter(); | ||
| string playlistXml = converter2.ConvertTrxToPlaylistXml(trxPath, TrxLib.TestOutcome.Failed); | ||
| if (!playlistXml.Contains("MyClass.TestMethod2")) | ||
| { | ||
| Console.Error.WriteLine($"FAIL: TRX parse smoke test - expected MyClass.TestMethod2 in output, got: {playlistXml}"); | ||
| return 7; | ||
| } | ||
| } | ||
| finally | ||
| { | ||
| File.Delete(trxPath); | ||
| } | ||
|
|
||
| // --- Converter: exercise code path (FileNotFoundException expected) --- | ||
|
|
||
| var converter = new TrxToPlaylistConverter(); | ||
|
|
||
| try | ||
| { | ||
| converter.ConvertTrxToPlaylist("nonexistent-file-that-does-not-exist.trx"); | ||
| Console.Error.WriteLine("FAIL: Expected FileNotFoundException was not thrown"); | ||
| return 6; | ||
| } | ||
| catch (FileNotFoundException) | ||
| { | ||
| // Expected | ||
|
BenjaminMichaelis marked this conversation as resolved.
|
||
| } | ||
|
|
||
| Console.WriteLine("AOT smoke test passed."); | ||
| return 0; | ||
17 changes: 17 additions & 0 deletions
17
...listConverter.AotSmokeTest/VSTestPlaylistTools.TrxToPlaylistConverter.AotSmokeTest.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFramework>net10.0</TargetFramework> | ||
| <PublishAot>true</PublishAot> | ||
| <ILLinkTreatWarningsAsErrors>true</ILLinkTreatWarningsAsErrors> | ||
| <!-- This project is only published via dotnet publish -r <RID>; exclude from dotnet test --> | ||
| <IsTestProject>false</IsTestProject> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\VSTestPlaylistTools.TrxToPlaylistConverter\VSTestPlaylistTools.TrxToPlaylistConverter.csproj" | ||
| SetTargetFramework="TargetFramework=net10.0" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -281,4 +281,4 @@ public void ConvertMultipleTrxToPlaylistXml_TwoFiles_ReturnsValidXml() | |
|
|
||
| #endregion | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 7 additions & 5 deletions
12
VSTestPlaylistTools.TrxToPlaylistConverter/VSTestPlaylistTools.TrxToPlaylistConverter.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.