Skip to content

Commit

Permalink
Merge branch 'master' into release/Habu
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveGilham committed Jul 23, 2024
2 parents 9db97e9 + 7c78865 commit 328f817
Show file tree
Hide file tree
Showing 74 changed files with 3,752 additions and 1,422 deletions.
6 changes: 3 additions & 3 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-reportgenerator-globaltool": {
"version": "5.3.0",
"version": "5.3.6",
"commands": [
"reportgenerator"
],
Expand All @@ -17,7 +17,7 @@
"rollForward": false
},
"altcode.gendarme-tool": {
"version": "2023.12.27.19054",
"version": "2024.6.28.12460",
"commands": [
"gendarme"
],
Expand All @@ -38,7 +38,7 @@
"rollForward": false
},
"nbgv": {
"version": "3.6.133",
"version": "3.6.139",
"commands": [
"nbgv"
],
Expand Down
1 change: 1 addition & 0 deletions AltCover.Api.Tests/AltCover.Api.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<OutputType Condition="'$(TargetFramework)' == 'net472'">Library</OutputType>
<AssemblySearchPaths Condition="'$(TargetFramework)' == 'net472'">$(AssemblySearchPaths);{GAC}</AssemblySearchPaths>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<NoWarn Condition="'$(LocalCecil)' == 'true'">MSB3277</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
29 changes: 29 additions & 0 deletions AltCover.Async/AltCover.Async.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>AltCover.Async</AssemblyName>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<TargetFramework>net46</TargetFramework>
<ContinuousIntegrationBuild>false</ContinuousIntegrationBuild>
<DeterministicSourcePaths>false</DeterministicSourcePaths>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
</PropertyGroup>
<PropertyGroup>
<LangVersion>11.0</LangVersion>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup>
<RootNamespace />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;DEBUG;CODE_ANALYSIS</DefineConstants>
<NoWarn>CS1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>TRACE</DefineConstants>
<NoWarn>CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\_Generated\AssemblyVersion.cs" Link="AssemblyVersion.cs" />
</ItemGroup>

</Project>
31 changes: 0 additions & 31 deletions AltCover.Async/AltCover.Async.fsproj

This file was deleted.

59 changes: 59 additions & 0 deletions AltCover.Async/Instance.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using System.Collections.Generic;
using System;
using System.Runtime.InteropServices;
using System.Threading;
using System.Runtime.Versioning;
using System.Diagnostics.CodeAnalysis;

[assembly: CLSCompliant(true)]
[assembly: ComVisible(false)]

namespace AltCover.Recorder;

public static class Instance
{
//internal static IEnumerable<string> Modules
//{
// get { return new string[] { "a", "b", "c", "d" }; }
//}

public static class I
{
internal static class CallTrack
{
[SuppressMessage("Microsoft.Performance",
"CA1823:AvoidUnusedPrivateFields",
Justification = "Template code only")]
private static readonly TargetFrameworkAttribute attr =
new TargetFrameworkAttribute(".NETFramework,Version=v4.6");

private static readonly AsyncLocal<Stack<int>> __value = new AsyncLocal<Stack<int>>();

private static AsyncLocal<Stack<int>> Value
{
[SuppressMessage("Microsoft.Performance",
"CA1811:AvoidUncalledPrivateCode",
Justification = "Template code only")]
get { return __value; }
}

// no race conditions here
[SuppressMessage("Gendarme.Rules.Performance",
"AvoidUncalledPrivateCodeRule",
Justification = "Template code only")]
[SuppressMessage("Microsoft.Performance",
"CA1811:AvoidUncalledPrivateCode",
Justification = "Template code only")]
[SuppressMessage("Gendarme.Rules.Performance",
"AvoidRepetitiveCallsToPropertiesRule",
Justification = "Initialization")]
private static Stack<int> Instance()
{
if (Value.Value == null)
Value.Value = new Stack<int>();

return Value.Value;
}
}
}
}
1 change: 1 addition & 0 deletions AltCover.Avalonia/AltCover.Avalonia.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<GlobalDefineConstants>AVALONIA;$(TOGGLE)</GlobalDefineConstants>
<UseStandardResourceNames>True</UseStandardResourceNames>
<Win32Resource>$(ProjectDir)../AltCover.Visualizer/Resource.res</Win32Resource>
<NoWarn>NU1902,NU1903,NU1904</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Debug'">
Expand Down
55 changes: 55 additions & 0 deletions AltCover.Base/AltCover.Base.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>AltCover</RootNamespace>
<AssemblyName>AltCover.Base</AssemblyName>
<GlobalDefineConstants>RUNNER;LITEVERSION</GlobalDefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DefineConstants>TRACE;DEBUG;CODE_ANALYSIS;$(GlobalDefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DefineConstants>TRACE;$(GlobalDefineConstants)</DefineConstants>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\_Generated\AssemblyVersion.cs" Link="AssemblyVersion.cs" />
<Compile Include="..\_Generated\VisibleToTest.cs" Link="VisibleToTest.cs" />
<Compile Include="..\AltCover.Recorder\Base.cs" Link="Base.cs" />
<None Include="..\AltCover.Recorder\Base.fs" Link="Base.fs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Mono.Cecil" Condition="'$(LocalCecil)' != 'true'" />
<Reference Include="Mono.Cecil" Condition="'$(LocalCecil)' == 'true'">
<HintPath>..\ThirdParty\cecil\Mono.Cecil.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Rocks" Condition="'$(LocalCecil)' == 'true'">
<HintPath>..\ThirdParty\cecil\Mono.Cecil.Rocks.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Mdb" Condition="'$(LocalCecil)' == 'true'">
<HintPath>..\ThirdParty\cecil\Mono.Cecil.Mdb.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Pdb" Condition="'$(LocalCecil)' == 'true'">
<HintPath>..\ThirdParty\cecil\Mono.Cecil.Pdb.dll</HintPath>
</Reference>
<PackageReference Include="System.IO.Compression" />
</ItemGroup>

<ItemGroup>
<Reference Include="Manatee.Json">
<HintPath>..\ThirdParty\Manatee.Json.dll</HintPath>
<!-- Last static linkable version; the local version of [Nullable] kills later version linkage -->
<!-- PackageReference Include="Manatee.Json" Version="11.0.4" / -->
<!-- Last official version; moved to ThirdParty; see https://github.com/gregsdennis/Manatee.Json and https://graphqello.com/ -->
<!-- PackageReference Include="Manatee.Json" Version="13.0.5" / -->
</Reference>
</ItemGroup>

</Project>
18 changes: 18 additions & 0 deletions AltCover.Base/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: InternalsVisibleTo("AltCover.Engine, PublicKey=0024000004800000940000000602000000240000525341310004000001000100916443A2EE1D294E8CFA7666FB3F512D998D7CEAC4909E35EDB2AC1E104DE68890A93716D1D1931F7228AAC0523CACF50FD82CDB4CCF4FF4BF0DED95E3A383F4F371E3B82C45502CE74D7D572583495208C1905E0F1E8A3CCE66C4C75E4CA32E9A8F8DEE64E059C0DC0266E8D2CB6D7EBD464B47E062F80B63D390E389217FB7")]
[assembly: InternalsVisibleTo("AltCover.PowerShell, PublicKey=0024000004800000940000000602000000240000525341310004000001000100916443A2EE1D294E8CFA7666FB3F512D998D7CEAC4909E35EDB2AC1E104DE68890A93716D1D1931F7228AAC0523CACF50FD82CDB4CCF4FF4BF0DED95E3A383F4F371E3B82C45502CE74D7D572583495208C1905E0F1E8A3CCE66C4C75E4CA32E9A8F8DEE64E059C0DC0266E8D2CB6D7EBD464B47E062F80B63D390E389217FB7")]
[assembly: InternalsVisibleTo("AltCover.Toolkit, PublicKey=0024000004800000940000000602000000240000525341310004000001000100916443A2EE1D294E8CFA7666FB3F512D998D7CEAC4909E35EDB2AC1E104DE68890A93716D1D1931F7228AAC0523CACF50FD82CDB4CCF4FF4BF0DED95E3A383F4F371E3B82C45502CE74D7D572583495208C1905E0F1E8A3CCE66C4C75E4CA32E9A8F8DEE64E059C0DC0266E8D2CB6D7EBD464B47E062F80B63D390E389217FB7")]
[assembly: InternalsVisibleTo("AltCover, PublicKey=0024000004800000940000000602000000240000525341310004000001000100916443A2EE1D294E8CFA7666FB3F512D998D7CEAC4909E35EDB2AC1E104DE68890A93716D1D1931F7228AAC0523CACF50FD82CDB4CCF4FF4BF0DED95E3A383F4F371E3B82C45502CE74D7D572583495208C1905E0F1E8A3CCE66C4C75E4CA32E9A8F8DEE64E059C0DC0266E8D2CB6D7EBD464B47E062F80B63D390E389217FB7")]
#if DEBUG
// Self-test signing key
[assembly: InternalsVisibleTo("AltCover.Engine, PublicKey=002400000480000094000000060200000024000052534131000400000100010041C08339BC8FE3A8B847E3EC38CB1BB31A9B39855347761BAB7AC04E726FFB227B147DF92DE5C3D8BCE3B7CFC7C9AC8110AF2E22F5E35D9CB0EBF47C36890DF617BD83E211002A1979DAB26CC18743DE674CE6F34ABAC834F597364BC5598C133F192596FC2161A832A9BBD33835DBB44F3B924A6F736BE6217ECE42889ABBCF")]
[assembly: InternalsVisibleTo("AltCover.PowerShell, PublicKey=002400000480000094000000060200000024000052534131000400000100010041C08339BC8FE3A8B847E3EC38CB1BB31A9B39855347761BAB7AC04E726FFB227B147DF92DE5C3D8BCE3B7CFC7C9AC8110AF2E22F5E35D9CB0EBF47C36890DF617BD83E211002A1979DAB26CC18743DE674CE6F34ABAC834F597364BC5598C133F192596FC2161A832A9BBD33835DBB44F3B924A6F736BE6217ECE42889ABBCF")]
[assembly: InternalsVisibleTo("AltCover.Toolkit, PublicKey=002400000480000094000000060200000024000052534131000400000100010041C08339BC8FE3A8B847E3EC38CB1BB31A9B39855347761BAB7AC04E726FFB227B147DF92DE5C3D8BCE3B7CFC7C9AC8110AF2E22F5E35D9CB0EBF47C36890DF617BD83E211002A1979DAB26CC18743DE674CE6F34ABAC834F597364BC5598C133F192596FC2161A832A9BBD33835DBB44F3B924A6F736BE6217ECE42889ABBCF")]
[assembly: InternalsVisibleTo("AltCover, PublicKey=002400000480000094000000060200000024000052534131000400000100010041C08339BC8FE3A8B847E3EC38CB1BB31A9B39855347761BAB7AC04E726FFB227B147DF92DE5C3D8BCE3B7CFC7C9AC8110AF2E22F5E35D9CB0EBF47C36890DF617BD83E211002A1979DAB26CC18743DE674CE6F34ABAC834F597364BC5598C133F192596FC2161A832A9BBD33835DBB44F3B924A6F736BE6217ECE42889ABBCF")]
#endif
[assembly: CLSCompliant(true)]
[assembly: ComVisible(false)]
[assembly: System.Resources.NeutralResourcesLanguage("en-GB")]
7 changes: 1 addition & 6 deletions AltCover.DataCollector/DataCollector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private void Supervise()
RecorderInstance.ToList().ForEach(
i =>
{
var supervision = i.GetProperty("supervision",
var supervision = i.GetField("supervision",
BindingFlags.Static | BindingFlags.NonPublic);
if (supervision == null)
{
Expand Down Expand Up @@ -98,11 +98,6 @@ public void TestCaseEnd(TestCaseEndArgs testCaseEndArgs)
testCaseEndArgs?.DataCollectionContext?.TestCase?.FullyQualifiedName,
testCaseEndArgs?.TestOutcome);

//Console.Error.WriteLine(
// "Console.Error.WriteLine TestCaseEnd {0} => {1}",
// testCaseEndArgs.DataCollectionContext.TestCase.FullyQualifiedName,
// testCaseEndArgs.TestOutcome);

if (EqtTrace.IsInfoEnabled)
{
EqtTrace.Info("TestCaseEnd {0}", testCaseEndArgs);
Expand Down
11 changes: 7 additions & 4 deletions AltCover.Engine/AltCover.Engine.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DefineConstants>TRACE;$(GlobalDefineConstants)</DefineConstants>
<!-- OtherFlags>- -keyfile:$(SolutionDir)Build\Infrastructure.snk - -staticlink:Manatee.Json</OtherFlags -->
</PropertyGroup>

<ItemGroup>
Expand All @@ -26,7 +25,7 @@
<Compile Include="Output.fs" />
<Compile Include="Canonical.fs" />
<Compile Include="Augment.fs" />
<Compile Include="..\AltCover.Recorder\Base.fs" Link="Base.fs" />
<None Include="..\AltCover.Recorder\Base.fs" Link="Base.fs" />
<Compile Include="ProgramDatabase.fs" />
<Compile Include="Filter.fs" />
<Compile Include="Metadata.fs" />
Expand Down Expand Up @@ -67,10 +66,10 @@
<EmbeddedResource Include="..\Build\Recorder.snk">
<Link>Recorder.snk</Link>
</EmbeddedResource>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)..\_Binaries\AltCover.Recorder\Release+AnyCPU\net20\AltCover.Recorder.dll">
<EmbeddedResource Include="$(MSBuildThisFileDirectory)..\_Repack\AltCover.Recorder.dll">
<Link>AltCover.Recorder.net20.dll</Link>
</EmbeddedResource>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)..\_Binaries\AltCover.Async\Release+AnyCPU\net46\AltCover.Async.dll">
<EmbeddedResource Include="$(MSBuildThisFileDirectory)..\_Repack\AltCover.Async.dll">
<Link>AltCover.Async.net46.dll</Link>
</EmbeddedResource>
</ItemGroup>
Expand Down Expand Up @@ -121,6 +120,10 @@
<AbstractFs Include="$(ProjectDir)Abstract.fs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AltCover.Base\AltCover.Base.csproj" />
</ItemGroup>

<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Copy SourceFiles="@(AbstractFsi)" DestinationFiles="@(AbstractFs)" SkipUnchangedFiles="true" />
</Target>
Expand Down
Loading

0 comments on commit 328f817

Please sign in to comment.