diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml
new file mode 100644
index 0000000..fd6aec7
--- /dev/null
+++ b/.github/workflows/publish-packages.yml
@@ -0,0 +1,70 @@
+name: Publish
+
+on:
+ push:
+ branches: [ master ]
+ paths:
+ - '.github/workflows/publish-packages.yml'
+ - 'src/**'
+ - 'build/**'
+
+env:
+ # Disable the .NET logo in the console output.
+ DOTNET_NOLOGO: true
+ # Disable the .NET first time experience to skip caching NuGet packages and speed up the build.
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
+ # Disable sending .NET CLI telemetry to Microsoft.
+ DOTNET_CLI_TELEMETRY_OPTOUT: true
+
+jobs:
+ publish:
+ name: Publish
+ runs-on: ubuntu-latest
+ steps:
+ - name: Setup
+ uses: butr/actions-common-setup@v2
+ with:
+ github-token: ${{secrets.GITHUB_TOKEN}}
+
+ - name: Setup .NET 9
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 9.x.x
+
+ - name: Run _build
+ run: >-
+ dotnet pack src/BUTR.CrashReport.Models/BUTR.CrashReport.Models.csproj --configuration Release -o "./packages";
+ dotnet pack src/BUTR.CrashReport.AutomatedRemediation/BUTR.CrashReport.AutomatedRemediation.csproj --configuration Release -o "./packages";
+ dotnet pack src/BUTR.CrashReport.ContextualAnalysis/BUTR.CrashReport.ContextualAnalysis.csproj --configuration Release -o "./packages";
+ dotnet pack src/BUTR.CrashReport.Decompilers/BUTR.CrashReport.Decompilers.csproj --configuration Release -o "./packages";
+ dotnet pack src/BUTR.CrashReport/BUTR.CrashReport.csproj --configuration Release -o "./packages";
+ dotnet pack src/BUTR.CrashReport.ILMerged/BUTR.CrashReport.ILMerged.csproj --configuration Release -o "./packages";
+
+ dotnet pack src/BUTR.CrashReport.Renderer.Html/BUTR.CrashReport.Renderer.Html.csproj --configuration Release -o "./packages";
+ dotnet pack src/BUTR.CrashReport.Renderer.WinForms/BUTR.CrashReport.Renderer.WinForms.csproj --configuration Release -o "./packages";
+ dotnet pack src/BUTR.CrashReport.Renderer.Zip/BUTR.CrashReport.Renderer.Zip.csproj --configuration Release -o "./packages";
+
+ dotnet pack src/BUTR.CrashReport.Memory/BUTR.CrashReport.Memory.csproj --configuration Release -o "./packages";
+ dotnet pack src/BUTR.CrashReport.Native/BUTR.CrashReport.Native.csproj --configuration Release -o "./packages";
+ dotnet pack src/BUTR.CrashReport.Native.SourceGenerator/BUTR.CrashReport.Native.SourceGenerator.csproj --configuration Release -o "./packages";
+ dotnet pack src/BUTR.CrashReport.CImGui/BUTR.CrashReport.CImGui.csproj --configuration Release -o "./packages";
+ dotnet pack src/BUTR.CrashReport.ImGui/BUTR.CrashReport.ImGui.csproj --configuration Release -o "./packages";
+ dotnet pack src/BUTR.CrashReport.Renderer.ImGui/BUTR.CrashReport.Renderer.ImGui.csproj --configuration Release -o "./packages";
+ dotnet pack src/BUTR.CrashReport.Renderer.ImGui.Silk.NET/BUTR.CrashReport.Renderer.ImGui.Silk.NET.csproj --configuration Release -o "./packages";
+ dotnet pack src/BUTR.CrashReport.Renderer.ImGui.Silk.NET.ILMerged/BUTR.CrashReport.Renderer.ImGui.Silk.NET.ILMerged.csproj --configuration Release -o "./packages";
+
+ dotnet pack src/BUTR.CrashReport.Renderer.Html.Tool/BUTR.CrashReport.Renderer.Html.Tool.csproj --configuration Release -o "./packages";
+ dotnet pack src/BUTR.CrashReport.Renderer.ImGui.Tool/BUTR.CrashReport.Renderer.ImGui.Tool.csproj --configuration Release -o "./packages";
+ shell: pwsh
+
+ - name: Push to NuGet
+ run: dotnet nuget push "./packages/*.nupkg" -k ${{secrets.NUGET_API_KEY}} -s https://www.nuget.org
+ shell: pwsh
+
+ - name: Push to GPR
+ run: |
+ for f in ./packages/*.nupkg
+ do
+ curl -vX PUT -u "vslee:${{secrets.GITHUB_TOKEN}}" -F package=@$f https://nuget.pkg.github.com/BUTR/
+ done
+ shell: bash
diff --git a/.github/workflows/publish-standalone.yml b/.github/workflows/publish-standalone.yml
new file mode 100644
index 0000000..ea456da
--- /dev/null
+++ b/.github/workflows/publish-standalone.yml
@@ -0,0 +1,130 @@
+name: Publish Standalone
+
+on:
+ push:
+ branches: [ master ]
+ tags:
+ - 'v*'
+
+env:
+ # Disable the .NET logo in the console output.
+ DOTNET_NOLOGO: true
+ # Disable the .NET first time experience to skip caching NuGet packages and speed up the build.
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
+ # Disable sending .NET CLI telemetry to Microsoft.
+ DOTNET_CLI_TELEMETRY_OPTOUT: true
+
+jobs:
+ create-release:
+ name: Create Release
+ runs-on: ubuntu-latest
+ outputs:
+ release_id: ${{ steps.create_release.outputs.id }}
+ steps:
+ - name: Create Release
+ id: create_release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ tag_name: ${{ github.ref }}
+ release_name: Release ${{ github.ref }}
+ draft: false
+ prerelease: true
+
+ publish-native:
+ strategy:
+ matrix:
+ data: [
+ { rid: 'win-x64', os: 'windows-latest' },
+ { rid: 'win-x86', os: 'windows-latest' },
+ { rid: 'linux-x64', os: 'ubuntu-22.04' },
+ { rid: 'linux-arm64', os: 'ubuntu-22.04-arm' },
+ { rid: 'osx-x64', os: 'macos-13' },
+ { rid: 'osx-arm64', os: 'macos-latest' }
+ ]
+ name: Publish Native ${{ matrix.data.rid }}
+ runs-on: ${{ matrix.data.os }}
+ needs: create-release
+ steps:
+ - name: Setup
+ uses: butr/actions-common-setup@v2
+ with:
+ github-token: ${{secrets.GITHUB_TOKEN}}
+
+ - name: Setup .NET 9
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 9.x.x
+
+ - name: Run _build
+ run: >-
+ dotnet publish src/BUTR.CrashReport.Renderer.ImGui.Standalone/BUTR.CrashReport.Renderer.ImGui.Standalone.csproj --configuration Release -f net9.0 -r "${{ matrix.data.rid }}" -o "./imgui";
+ Compress-Archive -Path imgui/* -Destination "imgui-native-${{ matrix.data.rid }}.zip"
+
+ dotnet publish src/BUTR.CrashReport.Renderer.Html.Standalone/BUTR.CrashReport.Renderer.Html.Standalone.csproj --configuration Release -f net9.0 -r "${{ matrix.data.rid }}" -o "./html";
+ Compress-Archive -Path html/* -Destination "html-native-${{ matrix.data.rid }}.zip"
+ shell: pwsh
+
+ - name: Upload Release Assets (ImGui)
+ uses: dwenegar/upload-release-assets@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ release_id: ${{ needs.create-release.outputs.release_id }}
+ assets_path: "imgui-native-${{ matrix.data.rid }}.zip"
+
+ - name: Upload Release Assets (Html)
+ uses: dwenegar/upload-release-assets@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ release_id: ${{ needs.create-release.outputs.release_id }}
+ assets_path: "html-native-${{ matrix.data.rid }}.zip"
+
+ publish-universal:
+ strategy:
+ matrix:
+ data: [
+ { rid: 'win', os: 'windows-latest' },
+ { rid: 'linux', os: 'ubuntu-22.04' },
+ { rid: 'osx', os: 'macos-latest' }
+ ]
+ name: Publish Universal ${{ matrix.data.rid }}
+ runs-on: ${{ matrix.data.os }}
+ needs: create-release
+ steps:
+ - name: Setup
+ uses: butr/actions-common-setup@v2
+ with:
+ github-token: ${{secrets.GITHUB_TOKEN}}
+
+ - name: Setup .NET 9
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 9.x.x
+
+ - name: Run _build
+ run: >-
+ dotnet publish src/BUTR.CrashReport.Renderer.ImGui.Standalone/BUTR.CrashReport.Renderer.ImGui.Standalone.csproj --configuration Release -f net6.0 -p:RuntimeSingleFile=true -o "./imgui";
+ Compress-Archive -Path imgui/* -Destination "imgui-net6-${{ matrix.data.rid }}.zip"
+
+ dotnet publish src/BUTR.CrashReport.Renderer.Html.Standalone/BUTR.CrashReport.Renderer.Html.Standalone.csproj --configuration Release -f net6.0 -p:RuntimeSingleFile=true -o "./html";
+ Compress-Archive -Path html/* -Destination "html-net6-${{ matrix.data.rid }}.zip"
+ shell: pwsh
+
+ - name: Upload Release Assets (ImGui)
+ uses: dwenegar/upload-release-assets@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ release_id: ${{ needs.create-release.outputs.release_id }}
+ assets_path: "imgui-net6-${{ matrix.data.rid }}.zip"
+
+ - name: Upload Release Assets (Html)
+ uses: dwenegar/upload-release-assets@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ release_id: ${{ needs.create-release.outputs.release_id }}
+ assets_path: "html-net6-${{ matrix.data.rid }}.zip"
diff --git a/.github/workflows/publish-wasm-deploy.yml b/.github/workflows/publish-wasm-deploy.yml
new file mode 100644
index 0000000..d2f91e1
--- /dev/null
+++ b/.github/workflows/publish-wasm-deploy.yml
@@ -0,0 +1,30 @@
+name: Deploy WASM
+
+on:
+ workflow_dispatch:
+ workflow_run:
+ workflows: ["Publish WASM"]
+ types:
+ - completed
+
+jobs:
+ deploy:
+ name: 'Deploy to Netlify'
+ runs-on: ubuntu-latest
+ environment:
+ name: netlify
+ url: ${{ steps.deploy.outputs.deploy-url }}
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ ref: gh-pages
+
+ - name: Deploy to Netlify
+ id: deploy
+ uses: nwtgck/actions-netlify@v3.0
+ with:
+ publish-dir: './wwwroot'
+ production-deploy: true
+ env:
+ NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
+ NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
diff --git a/.github/workflows/publish-wasm.yml b/.github/workflows/publish-wasm.yml
new file mode 100644
index 0000000..0ae4e20
--- /dev/null
+++ b/.github/workflows/publish-wasm.yml
@@ -0,0 +1,45 @@
+name: Publish WASM
+
+on:
+ push:
+ branches: [ master ]
+ tags:
+ - 'v*'
+
+env:
+ # Disable the .NET logo in the console output.
+ DOTNET_NOLOGO: true
+ # Disable the .NET first time experience to skip caching NuGet packages and speed up the build.
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
+ # Disable sending .NET CLI telemetry to Microsoft.
+ DOTNET_CLI_TELEMETRY_OPTOUT: true
+
+jobs:
+ publish-wasm:
+ name: Publish WASM
+ runs-on: warp-ubuntu-latest-x64-16x
+ # NativeAOT (clang) requires > 16 GB RAM, so GitHub Runners are not enough
+ steps:
+ - name: Setup
+ uses: butr/actions-common-setup@v2
+ with:
+ github-token: ${{secrets.GITHUB_TOKEN}}
+
+ - name: Setup .NET 9
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 9.x.x
+
+ - name: Run _build
+ run: >-
+ dotnet workload install wasm-tools;
+
+ dotnet publish src/BUTR.CrashReport.Renderer.ImGui.WASM/BUTR.CrashReport.Renderer.ImGui.WASM.csproj --configuration Release -o "./site";
+
+ - name: Deploy to GitHub Pages
+ uses: crazy-max/ghaction-github-pages@v4
+ with:
+ target_branch: gh-pages
+ build_dir: ./site
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
deleted file mode 100644
index a9bba08..0000000
--- a/.github/workflows/publish.yml
+++ /dev/null
@@ -1,57 +0,0 @@
-name: Publish
-
-on:
- push:
- branches: [ master ]
- paths:
- - '.github/workflows/publish.yml'
- - 'src/**'
- - 'build/**'
-
-env:
- # Disable the .NET logo in the console output.
- DOTNET_NOLOGO: true
- # Disable the .NET first time experience to skip caching NuGet packages and speed up the build.
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
- # Disable sending .NET CLI telemetry to Microsoft.
- DOTNET_CLI_TELEMETRY_OPTOUT: true
-
-jobs:
- publish:
- name: Publish
- runs-on: ubuntu-latest
- steps:
- - name: Setup
- uses: butr/actions-common-setup@v2
- with:
- github-token: ${{secrets.GITHUB_TOKEN}}
-
- - name: Setup .NET 8
- uses: actions/setup-dotnet@v4
- with:
- dotnet-version: 8.x.x
-
- - name: Run _build
- run: >-
- dotnet pack src/BUTR.CrashReport.Models/BUTR.CrashReport.Models.csproj --configuration Release -o "./packages";
- dotnet pack src/BUTR.CrashReport/BUTR.CrashReport.csproj --configuration Release -o "./packages";
- dotnet pack src/BUTR.CrashReport.Tool/BUTR.CrashReport.Tool.csproj --configuration Release -o "./packages";
- dotnet pack src/BUTR.CrashReport.Renderer.Html/BUTR.CrashReport.Renderer.Html.csproj --configuration Release -o "./packages";
- dotnet pack src/BUTR.CrashReport.Renderer.ImGui/BUTR.CrashReport.Renderer.ImGui.csproj --configuration Release -o "./packages";
- dotnet pack src/BUTR.CrashReport.Renderer.WinForms/BUTR.CrashReport.Renderer.WinForms.csproj --configuration Release -o "./packages";
- dotnet pack src/BUTR.CrashReport.Renderer.Zip/BUTR.CrashReport.Renderer.Zip.csproj --configuration Release -o "./packages";
- dotnet pack src/BUTR.CrashReport.Bannerlord.Source/BUTR.CrashReport.Bannerlord.Source.csproj --configuration Release -o "./packages";
- dotnet pack src/BUTR.CrashReport.Bannerlord.Parser/BUTR.CrashReport.Bannerlord.Parser.csproj --configuration Release -o "./packages";
- shell: pwsh
-
- - name: Push to NuGet
- run: dotnet nuget push "./packages/*.nupkg" -k ${{secrets.NUGET_API_KEY}} -s https://www.nuget.org
- shell: pwsh
-
- - name: Push to GPR
- run: |
- for f in ./packages/*.nupkg
- do
- curl -vX PUT -u "vslee:${{secrets.GITHUB_TOKEN}}" -F package=@$f https://nuget.pkg.github.com/BUTR/
- done
- shell: bash
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..6e8d9d9
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,8 @@
+[submodule "external/Utf8StringInterpolation"]
+ path = external/Utf8StringInterpolation
+ url = https://github.com/Cysharp/Utf8StringInterpolation
+ branch = main
+[submodule "external/ZString"]
+ path = external/ZString
+ url = https://github.com/Cysharp/ZString
+ branch = master
diff --git a/build/common.props b/build/common.props
index 8dbe0f0..0d05f16 100644
--- a/build/common.props
+++ b/build/common.props
@@ -3,8 +3,8 @@
- 7
- 14.0.0.$(GITHUB_RUN_NUMBER)
+ 0
+ 15.0.0.$(GITHUB_RUN_NUMBER)
11.0
enable
@@ -13,7 +13,20 @@
$(DefineConstants);BUTRCRASHREPORT_ENABLEWARNINGS;
- $(NoWarn);NU1701
+ $(NoWarn);NU1701;MSB4011
+
+ true
+ embedded
+
+ 1.91.0.1
+ 1.91.0.46
+ 3.4.0
+ 2.30.8
+ 2.22.0
+
+
+
+ true
diff --git a/external/.editorconfig b/external/.editorconfig
new file mode 100644
index 0000000..1b6036e
--- /dev/null
+++ b/external/.editorconfig
@@ -0,0 +1,5 @@
+root = true
+
+[*]
+generated_code = true
+ij_formatter_enabled = false
\ No newline at end of file
diff --git a/external/Directory.Build.props b/external/Directory.Build.props
new file mode 100644
index 0000000..ca893c5
--- /dev/null
+++ b/external/Directory.Build.props
@@ -0,0 +1,7 @@
+
+
+
+ false
+
+
+
diff --git a/external/Utf8StringInterpolation b/external/Utf8StringInterpolation
new file mode 160000
index 0000000..96d8ca9
--- /dev/null
+++ b/external/Utf8StringInterpolation
@@ -0,0 +1 @@
+Subproject commit 96d8ca9524de4799c3647733050730c99018cda3
diff --git a/external/ZString b/external/ZString
new file mode 160000
index 0000000..f4b39aa
--- /dev/null
+++ b/external/ZString
@@ -0,0 +1 @@
+Subproject commit f4b39aad95edd3350f8f06567c9d07168ac941ec
diff --git a/resources/CascadiaCode.ttf b/resources/CascadiaCode.ttf
new file mode 100644
index 0000000..bba59c9
Binary files /dev/null and b/resources/CascadiaCode.ttf differ
diff --git a/resources/CascadiaCode.ttf.compressed b/resources/CascadiaCode.ttf.compressed
new file mode 100644
index 0000000..e1bc6b9
Binary files /dev/null and b/resources/CascadiaCode.ttf.compressed differ
diff --git a/src/BUTR.CrashReport.AutomatedRemediation/BUTR.CrashReport.AutomatedRemediation.csproj b/src/BUTR.CrashReport.AutomatedRemediation/BUTR.CrashReport.AutomatedRemediation.csproj
new file mode 100644
index 0000000..d180de7
--- /dev/null
+++ b/src/BUTR.CrashReport.AutomatedRemediation/BUTR.CrashReport.AutomatedRemediation.csproj
@@ -0,0 +1,26 @@
+
+
+
+ net35;net45;netstandard2.0
+ latest
+ enable
+ true
+
+ true
+ true
+
+
+
+ BUTR.CrashReport.AutomatedRemediation
+ BUTR.CrashReport.AutomatedRemediation
+ Contains the automated remediation for the crash report
+ MIT
+ https://raw.githubusercontent.com/BUTR/BUTR.CrashReport/master/assets/Icon128x128.png
+ butr crash report
+
+
+
+
+
+
+
diff --git a/src/BUTR.CrashReport.Models/Analyzer/GenericSuggestedFix.cs b/src/BUTR.CrashReport.AutomatedRemediation/CrashGenericFix.cs
similarity index 68%
rename from src/BUTR.CrashReport.Models/Analyzer/GenericSuggestedFix.cs
rename to src/BUTR.CrashReport.AutomatedRemediation/CrashGenericFix.cs
index 4294477..e5d5e08 100644
--- a/src/BUTR.CrashReport.Models/Analyzer/GenericSuggestedFix.cs
+++ b/src/BUTR.CrashReport.AutomatedRemediation/CrashGenericFix.cs
@@ -1,17 +1,17 @@
-namespace BUTR.CrashReport.Models.Analyzer;
+namespace BUTR.CrashReport.AutomatedRemediation;
///
/// Represents a generic crash report fix.
///
-public sealed record GenericSuggestedFix
+public sealed record CrashGenericFix
{
///
/// The type of suggested fix.
///
- public required GenericSuggestedFixType Type { get; set; }
+ public required CrashGenericFixType Type { get; set; }
///
- public bool Equals(GenericSuggestedFix? other)
+ public bool Equals(CrashGenericFix? other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
diff --git a/src/BUTR.CrashReport.Models/Analyzer/GenericSuggestedFixType.cs b/src/BUTR.CrashReport.AutomatedRemediation/CrashGenericFixType.cs
similarity index 64%
rename from src/BUTR.CrashReport.Models/Analyzer/GenericSuggestedFixType.cs
rename to src/BUTR.CrashReport.AutomatedRemediation/CrashGenericFixType.cs
index 5402cf2..0242da9 100644
--- a/src/BUTR.CrashReport.Models/Analyzer/GenericSuggestedFixType.cs
+++ b/src/BUTR.CrashReport.AutomatedRemediation/CrashGenericFixType.cs
@@ -1,12 +1,12 @@
using System;
-namespace BUTR.CrashReport.Models.Analyzer;
+namespace BUTR.CrashReport.AutomatedRemediation;
///
-/// Represents the type of a generic fix.
+/// Represents the type of generic fix.
///
[Flags]
-public enum GenericSuggestedFixType
+public enum CrashGenericFixType
{
///
/// No fix.
diff --git a/src/BUTR.CrashReport.Models/Analyzer/ModuleSuggestedFix.cs b/src/BUTR.CrashReport.AutomatedRemediation/CrashModuleFix.cs
similarity index 78%
rename from src/BUTR.CrashReport.Models/Analyzer/ModuleSuggestedFix.cs
rename to src/BUTR.CrashReport.AutomatedRemediation/CrashModuleFix.cs
index f7a7afd..823201f 100644
--- a/src/BUTR.CrashReport.Models/Analyzer/ModuleSuggestedFix.cs
+++ b/src/BUTR.CrashReport.AutomatedRemediation/CrashModuleFix.cs
@@ -1,9 +1,9 @@
-namespace BUTR.CrashReport.Models.Analyzer;
+namespace BUTR.CrashReport.AutomatedRemediation;
///
/// Represents a module specific crash report fix.
///
-public sealed record ModuleSuggestedFix
+public sealed record CrashModuleFix
{
///
///
@@ -14,10 +14,10 @@ public sealed record ModuleSuggestedFix
///
/// The type of suggested fix.
///
- public required ModuleSuggestedFixType Type { get; set; }
+ public required CrashModuleFixType Type { get; set; }
///
- public bool Equals(ModuleSuggestedFix? other)
+ public bool Equals(CrashModuleFix? other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
diff --git a/src/BUTR.CrashReport.Models/Analyzer/ModuleSuggestedFixType.cs b/src/BUTR.CrashReport.AutomatedRemediation/CrashModuleFixType.cs
similarity index 75%
rename from src/BUTR.CrashReport.Models/Analyzer/ModuleSuggestedFixType.cs
rename to src/BUTR.CrashReport.AutomatedRemediation/CrashModuleFixType.cs
index a9c9dc1..bea16ea 100644
--- a/src/BUTR.CrashReport.Models/Analyzer/ModuleSuggestedFixType.cs
+++ b/src/BUTR.CrashReport.AutomatedRemediation/CrashModuleFixType.cs
@@ -1,12 +1,12 @@
using System;
-namespace BUTR.CrashReport.Models.Analyzer;
+namespace BUTR.CrashReport.AutomatedRemediation;
///
-/// Represents the type of a module fix.
+/// Represents the type of module fix.
///
[Flags]
-public enum ModuleSuggestedFixType
+public enum CrashModuleFixType
{
///
/// No fix.
diff --git a/src/BUTR.CrashReport.Models/Analyzer/ModuleUpdate.cs b/src/BUTR.CrashReport.AutomatedRemediation/CrashModuleUpdate.cs
similarity index 73%
rename from src/BUTR.CrashReport.Models/Analyzer/ModuleUpdate.cs
rename to src/BUTR.CrashReport.AutomatedRemediation/CrashModuleUpdate.cs
index aa3c401..a561321 100644
--- a/src/BUTR.CrashReport.Models/Analyzer/ModuleUpdate.cs
+++ b/src/BUTR.CrashReport.AutomatedRemediation/CrashModuleUpdate.cs
@@ -1,9 +1,9 @@
-namespace BUTR.CrashReport.Models.Analyzer;
+namespace BUTR.CrashReport.AutomatedRemediation;
///
/// Represents an available module update.
///
-public sealed record ModuleUpdate
+public sealed record CrashModuleUpdate
{
///
///
@@ -17,16 +17,18 @@ public sealed record ModuleUpdate
public required string ModuleVersion { get; set; }
///
- /// Whether the module was involced in the crash.
+ /// Whether the module was involved in the crash.
///
public required bool IsModuleInvolved { get; set; }
///
- public bool Equals(ModuleUpdate? other)
+ public bool Equals(CrashModuleUpdate? other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
- return ModuleId == other.ModuleId && ModuleVersion == other.ModuleVersion && IsModuleInvolved == other.IsModuleInvolved;
+ return ModuleId == other.ModuleId &&
+ ModuleVersion == other.ModuleVersion &&
+ IsModuleInvolved == other.IsModuleInvolved;
}
///
diff --git a/src/BUTR.CrashReport.AutomatedRemediation/README.md b/src/BUTR.CrashReport.AutomatedRemediation/README.md
new file mode 100644
index 0000000..2fff022
--- /dev/null
+++ b/src/BUTR.CrashReport.AutomatedRemediation/README.md
@@ -0,0 +1,6 @@
+The basic abstraction for creating deterministic diagnostics that can have automated fixes.
+
+AutomatedRemediation:
+* **"Automated"** clearly signals no human intervention.
+* **"Remediation"** implies actionable fixes (updates, removals, verifications).
+* Matches the code’s focus on module health and predefined fixes.
\ No newline at end of file
diff --git a/src/BUTR.CrashReport.Bannerlord.Parser/CrashReportParser.cs b/src/BUTR.CrashReport.Bannerlord.Parser/CrashReportParser.cs
deleted file mode 100644
index a6d39a5..0000000
--- a/src/BUTR.CrashReport.Bannerlord.Parser/CrashReportParser.cs
+++ /dev/null
@@ -1,544 +0,0 @@
-using BUTR.CrashReport.Bannerlord.Parser.Extensions;
-using BUTR.CrashReport.Models;
-using BUTR.CrashReport.Utils;
-
-using HtmlAgilityPack;
-
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.IO;
-using System.IO.Compression;
-using System.Linq;
-using System.Text;
-
-namespace BUTR.CrashReport.Bannerlord.Parser;
-
-///
-/// Parses a rendered Crash Report
-///
-public static class CrashReportParser
-{
- private delegate bool MatchSpan(ReadOnlySpan span);
- private static IReadOnlyList GetAllOpenTags(ReadOnlySpan content, MatchSpan matcher)
- {
- var list = new List();
- var span = content;
- while (span.IndexOf('<') is var idxOpen and not -1 && span.Slice(idxOpen).IndexOf('>') is var idxClose and not -1)
- {
- var tag = span.Slice(idxOpen, idxClose + 1);
- span = span.Slice(idxOpen + idxClose + 1);
- if (tag.Length < 2 || tag[1] == '/' || tag[^2] == '/') continue;
- if (matcher(tag)) list.Add(tag.ToString());
- }
- return list;
- }
-
- private static IList GetEnhancedStacktrace(ReadOnlySpan rawContent, int version, HtmlNode node)
- {
- const string enhancedStacktraceStartDelimiter1 = "