Skip to content

Commit

Permalink
[tools] Update how we encode AOT symbols according to upstream changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne committed May 27, 2024
1 parent f8cb216 commit d43aec8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tools/common/Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -933,19 +933,26 @@ void GenerateIOSMain (StringWriter sw, Abi abi)
sw.WriteLine ("}");
}

static readonly char[] charsToReplaceAot = new[] { '.', '-', '+', '<', '>' };
static string EncodeAotSymbol (string symbol)
{
var sb = new StringBuilder ();
/* This mimics what the aot-compiler does */
// https://github.com/dotnet/runtime/blob/2f08fcbfece0c09319f237a6aee6f74c4a9e14e8/src/mono/mono/metadata/native-library.c#L1265-L1284
// https://github.com/dotnet/runtime/blob/2f08fcbfece0c09319f237a6aee6f74c4a9e14e8/src/tasks/Common/Utils.cs#L419-L445
foreach (var b in System.Text.Encoding.UTF8.GetBytes (symbol)) {
char c = (char) b;
if ((c >= '0' && c <= '9') ||
(c >= 'a' && c <= 'z') ||
(c >= 'A' && c <= 'Z')) {
sb.Append (c);
continue;
} else if (charsToReplaceAot.Contains (c)) {
sb.Append ('_');
} else {
// Append the hex representation of b between underscores
sb.Append ($"_{b:X}_");
}
sb.Append ('_');
}
return sb.ToString ();
}
Expand Down

12 comments on commit d43aec8

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Unable to find the contents for the comment: D:\a\1\a\change-detection\results\gh-comment.md does not exist :fire

Pipeline on Agent
Hash: d43aec85ca4d5565c69f39fab204ba8d7436239f [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💻 [CI Build] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💻 [CI Build] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💻 [CI Build] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💻 [CI Build] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💻 [CI Build] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ [CI Build] Windows Integration Tests failed ❌

❌ Failed ❌

Pipeline on Agent
Hash: d43aec85ca4d5565c69f39fab204ba8d7436239f [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ [CI Build] Tests on macOS X64 - Mac Sonoma (14) failed ❌

Failed tests are:

  • introspection
  • xammac_tests
  • monotouch-test

Pipeline on Agent
Hash: [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ [CI Build] Windows Integration Tests failed ❌

❌ Failed ❌

Pipeline on Agent
Hash: d43aec85ca4d5565c69f39fab204ba8d7436239f [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📚 [CI Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent
Hash: [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 [CI Build] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

7 tests crashed, 11 tests failed, 150 tests passed.

Failures

❌ dotnettests tests (iOS)

🔥 Failed catastrophically on VSTS: test results - dotnettests_ios (no summary found).

Html Report (VSDrops) Download

❌ dotnettests tests (MacCatalyst)

🔥 Failed catastrophically on VSTS: test results - dotnettests_maccatalyst (no summary found).

Html Report (VSDrops) Download

❌ dotnettests tests (macOS)

1 tests failed, 0 tests passed.
  • DotNet tests: Failed (Execution failed with exit code 1)

Html Report (VSDrops) Download

❌ dotnettests tests (tvOS)

1 tests failed, 0 tests passed.
  • DotNet tests: Failed (Execution failed with exit code 1)

Html Report (VSDrops) Download

❌ install-source tests

🔥 Failed catastrophically on VSTS: test results - install-source (no summary found).

Html Report (VSDrops) Download

❌ monotouch tests (macOS)

9 tests failed, 0 tests passed.
  • monotouch-test/Mac [dotnet]/Debug [dotnet]: Failed (Test run failed.
    Tests run: 2865 Passed: 2770 Inconclusive: 4 Failed: 1 Ignored: 94)
  • monotouch-test/Mac [dotnet]/Debug (static registrar) [dotnet]: Failed (Test run failed.
    Tests run: 2862 Passed: 2768 Inconclusive: 4 Failed: 1 Ignored: 93)
  • monotouch-test/Mac [dotnet]/Release (NativeAOT, x64) [dotnet]: Failed (Test run failed.
    Tests run: 2861 Passed: 2756 Inconclusive: 4 Failed: 1 Ignored: 104)
  • monotouch-test/Mac [dotnet]/Release (static registrar) [dotnet]: Failed (Test run failed.
    Tests run: 2862 Passed: 2766 Inconclusive: 4 Failed: 1 Ignored: 95)
  • monotouch-test/Mac [dotnet]/Release (managed static registrar) [dotnet]: Failed (Test run failed.
    Tests run: 2862 Passed: 2766 Inconclusive: 4 Failed: 1 Ignored: 95)
  • monotouch-test/Mac [dotnet]/Release (NativeAOT) [dotnet]: Failed (Test run failed.
    Tests run: 2861 Passed: 2756 Inconclusive: 4 Failed: 1 Ignored: 104)
  • monotouch-test/Mac [dotnet]/Release (static registrar, all optimizations) [dotnet]: Failed (Test run failed.
    Tests run: 2862 Passed: 2768 Inconclusive: 4 Failed: 1 Ignored: 93)
  • monotouch-test/Mac [dotnet]/Debug (managed static registrar) [dotnet]: Failed (Test run failed.
    Tests run: 2862 Passed: 2768 Inconclusive: 4 Failed: 1 Ignored: 93)
  • monotouch-test/Mac [dotnet]/Release (managed static registrar, all optimizations) [dotnet]: Failed (Test run failed.
    Tests run: 2862 Passed: 2768 Inconclusive: 4 Failed: 1 Ignored: 93)

Html Report (VSDrops) Download

❌ msbuild tests

🔥 Failed catastrophically on VSTS: test results - msbuild (no summary found).

Html Report (VSDrops) Download

❌ mtouch tests

🔥 Failed catastrophically on VSTS: test results - mtouch (no summary found).

Html Report (VSDrops) Download

❌ xammac tests

🔥 Failed catastrophically on VSTS: test results - xammac (no summary found).

Html Report (VSDrops) Download

❌ xtro tests

🔥 Failed catastrophically on VSTS: test results - xtro (no summary found).

Html Report (VSDrops) Download

Successes

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 8 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 7 tests passed. Html Report (VSDrops) Download
✅ generator: All 2 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 7 tests passed. Html Report (VSDrops) Download
✅ introspection: All 8 tests passed. Html Report (VSDrops) Download
✅ linker: All 65 tests passed. Html Report (VSDrops) Download
✅ mac-binding-project: All 1 tests passed. Html Report (VSDrops) Download
✅ mmp: All 2 tests passed. Html Report (VSDrops) Download
✅ mononative: All 6 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 8 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (watchOS): All 4 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 8 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 [CI Build] Test results 🚀

Test results

✅ All tests passed on .

🎉 All 0 tests passed 🎉

Tests counts

Pipeline on Agent
Hash: [CI build]

Please sign in to comment.