xamarin-macios/tests/common
Haritha Mohan 297f12d141
[dotnet] add sourcelink support (#20054)
Fixes https://github.com/xamarin/xamarin-macios/issues/18968

We provide a mapping to the checked in source files via SourceLink.json
and the rest of the generated/untracked sources are embedded into the
PDB to provide a more comprehensive debugging experience. Since we
invoke CSC directly, there were a few workarounds that had to be
implemented (ex: implementing a helper script to account for untracked
sources instead of simply using the EmbedUntrackedSources MSBuild
property).

As for testing, the newly added support was validated via the dotnet
sourcelink tool which confirmed all the sources in the PDB either had
valid urls or were embedded.

`sourcelink test Microsoft.MacCatalyst.pdb` —> `sourcelink test passed:
Microsoft.MacCatalyst.pdb`

The PDB size does increase in size after embedding;
Microsoft.MacCatalyst.pdb went from 5 MB to 15.7 MB.

But considering it would significantly help improve the debugging
experience, be consistent with Android’s offerings, and it’s a
highlighted attribute on the NuGet package explorer I think it’s a
worthy size increase.

Refs:
https://github.com/xamarin/xamarin-android/pull/7298 
https://github.com/dotnet/roslyn/issues/12625
https://github.com/dotnet/sourcelink/tree/main/docs

---------

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Michael Cummings (MSFT) <mcumming@microsoft.com>
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2024-02-26 08:10:26 -08:00
..
TestProjects [net8.0] Merge main into net8.0. 2023-05-17 08:28:14 +02:00
mac [net8.0] Merge main into net8.0. 2023-06-08 13:32:48 +02:00
ApiTest.cs Change all null checking expressions to use 'is' and 'is not'. (#18176) 2023-05-05 17:52:19 +02:00
AppDelegate.cs [net8.0] Revert "[tests] Find a workaround for #xamarin/maccore@2668." (#18943) 2023-09-11 18:40:47 +02:00
Assert.cs [autoformat] Add common test files. (#16740) 2022-11-17 13:04:59 +01:00
AssertHelpers.cs [autoformat] Add common test files. (#16740) 2022-11-17 13:04:59 +01:00
BinLog.cs [tests] Add test to keep track of trimmer warnings. (#20125) 2024-02-16 16:53:12 +01:00
BundlerTest.cs [autoformat] Add common test files. (#16740) 2022-11-17 13:04:59 +01:00
BundlerTool.cs Change all null checking expressions to use 'is' and 'is not'. (#18176) 2023-05-05 17:52:19 +02:00
ConditionalCompilation.cs [msbuild] Don't define __IOS__ for tvOS binding projects (#2274) 2017-06-30 12:35:48 -04:00
Configuration.cs Enable `dotnet test` in worktree (#19982) 2024-02-02 16:06:21 -05:00
DotNet.cs [dotnet] add sourcelink support (#20054) 2024-02-26 08:10:26 -08:00
ErrorHelper.tests.cs [tools/src] Enable nullability in a few error-related source files. (#16987) 2022-12-07 17:43:05 +01:00
ExecutionHelper.cs Change all null checking expressions to use 'is' and 'is not'. (#18176) 2023-05-05 17:52:19 +02:00
Extensions.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
MixedClassLibrary.dll [macos] Error when linking mix-mode assemblies (#2911) 2017-11-16 09:18:18 -06:00
MonoNativeConfig.cs [tools/tests] Remove the Compat option for the MonoNative library. 2023-02-02 16:30:29 +01:00
PlatformInfo.cs Change all null checking expressions to use 'is' and 'is not'. (#18176) 2023-05-05 17:52:19 +02:00
ProductTests.cs [net8.0] Merge main into net8.0. 2023-05-11 11:54:37 +02:00
Profile.cs [generator] Fix property accessor attributes when one accessor's iOS availability is different than the property itself. (#17298) 2023-01-25 09:27:58 +01:00
SupportedOSPlatformVersions.targets [dotnet] Create an MSBuild property for the current min OS version. (#17034) 2023-01-10 21:18:39 +01:00
TestAssemblyLoader.cs [tests] Unify code related to how to load test assemblies. (#17111) 2023-01-13 22:20:47 +01:00
TestRuntime.RunAsync.cs [tests] Rework TestRuntime.RunAsync. (#18391) 2023-06-06 21:36:49 +02:00
TestRuntime.cs [dotnet] add sourcelink support (#20054) 2024-02-26 08:10:26 -08:00
Tool.cs [Generator] Clean the AttributeManager from deps and fix a bug in the errors. (#19532) 2023-12-04 07:08:16 -05:00
shared-dotnet-test.mk [test] Add help makefile targets to run .NET tests on remote machines. (#14144) 2022-02-16 07:57:09 +01:00
shared-dotnet.csproj [tests] Define NATIVEAOT in our common csproj file instead of xharness when building with NativeAOT. (#19914) 2024-02-22 09:23:49 +01:00
shared-dotnet.mk [dotnet] Use the correct variable to define the verbosity for 'dotnet build' (#19676) 2023-12-20 11:03:32 +01:00