From 97299d896e913c3042118a1904627432fdbcbe6d Mon Sep 17 00:00:00 2001 From: Gamzesbh Date: Mon, 26 Oct 2026 13:27:31 +0300 Subject: [PATCH] =?UTF-8?q?PRT-4071=20Fix:=20ba=C4=9F=C4=B1ml=C4=B1l=C4=B1?= =?UTF-8?q?k,=20test=20altyap=C4=B1s=C4=B1=20ve=20runtime=20g=C3=BCvenlik?= =?UTF-8?q?=20g=C3=BCncellemesi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Kütüphane paketleri: - Google.Protobuf 3.27.1 -> 3.36.2 - libphonenumber-csharp 9.0.13 -> 9.0.41 - Microsoft.ML.OnnxRuntime 1.18.0 -> 1.31.0 - Microsoft.ML.Tokenizers 0.22.0 -> 2.0.1 Test altyapısı: - xunit 2.7.0 -> xunit.v3 4.0.2. Gerekçe: xunit 2.x NuGet'te "Legacy" işaretli ve xunit.v3'e yönlendiriyor. - xunit.runner.visualstudio 2.5.7 -> 4.0.1 - Microsoft.NET.Test.Sdk 17.11.1 -> 18.11.0 - coverlet.collector 6.0.0 -> 10.1.0 - Test projesine OutputType=Exe eklendi; xunit v3 gereksinimi. - global.json eklendi, dotnet test'in Microsoft.Testing.Platform modunu seçmesi için. Bu dosya olmadan .NET 10 SDK ile testler HİÇ koşmuyor ("No test is available") ve derleme yeşil kaldığı için sessizce geçiyor. Test projesindeki Google.Protobuf doğrudan referansı kaldırıldı: tek test dosyasında hiç kullanılmıyor ve kütüphane sürümüyle arasında paket düşürme çakışması üretiyordu. Hedef framework net8.0 -> net10.0 (üç proje). Gerekçe: .NET 8'in desteği 10.11.2026'da bitiyor ve sonrasında güvenlik yaması almıyor. CI: actions/checkout v4 -> v7, actions/setup-dotnet v4 -> v6, SDK 8.0.x -> 10.0.x. dependabot.yml: NuGet izlemesi artık "/src" ile birlikte "/tests" ve "/samples" dizinlerini de kapsıyor. Önceden yalnız "/src" yazılıydı ve test ile örnek projelerin paketleri hiç izlenmiyordu. Ayrıca github-actions ekosistemi eklendi. Doğrulama: temiz kurulum sonrası derleme 0 hata 0 uyarı, 5/5 test geçti, 0 zafiyet, 0 deprecated paket, güncellenecek paket kalmadı. Ölçülen ama bu commit kapsamında düzeltilmeyen kusur: Ner/MicrosoftMlTokenizerAdapter, Microsoft.ML.Tokenizers API'sini reflection ile arıyor. Aradığı tipler (TokenizerModel, Tokenizer.FromFile, Tokenizer.FromJson, Encode(string)) ne 0.22.0 ne de 2.0.1 sürümünde var; gerçek API BertTokenizer.Create + EncodeToIds. Yani adaptör bu güncellemeden ÖNCE de çalışmıyordu ve başarısızlıkta sessizce basit bir yedek yola düşüyor. Ayrı bir iş olarak ele alınmalı. --- .github/dependabot.yml | 20 ++++++++++++++----- .github/workflows/dotnet.yml | 6 +++--- global.json | 5 +++++ .../Devoplus.DataGuardian.SampleApi.csproj | 2 +- .../Devoplus.DataGuardian.csproj | 10 +++++----- .../Devoplus.DataGuardian.Tests.csproj | 18 +++++++++++------ 6 files changed, 41 insertions(+), 20 deletions(-) create mode 100644 global.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 636f405..6ba9538 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,11 +1,21 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: +# Dependabot yapilandirmasi. Belgeler: # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file version: 2 updates: - - package-ecosystem: "nuget" # See documentation for possible values - directory: "/src/" # Location of package manifests + # NuGet: uc proje de ayri dizinlerde. Yalnizca "/src" verilirse tests/ ve + # samples/ altindaki paketler HIC izlenmez. + - package-ecosystem: "nuget" + directories: + - "/src" + - "/tests" + - "/samples" + schedule: + interval: "weekly" + + # CI'daki action surumleri (checkout, setup-dotnet) NuGet ekosistemine dahil + # degildir; bu giris olmadan hic guncellenmez. + - package-ecosystem: "github-actions" + directory: "/" schedule: interval: "weekly" diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index d95eb18..181752e 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -10,11 +10,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v6 with: - dotnet-version: '8.0.x' + dotnet-version: '10.0.x' - name: Restore NuGet Packages run: dotnet restore - name: Clean solution diff --git a/global.json b/global.json new file mode 100644 index 0000000..3140116 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "test": { + "runner": "Microsoft.Testing.Platform" + } +} diff --git a/samples/Devoplus.DataGuardian.SampleApi/Devoplus.DataGuardian.SampleApi.csproj b/samples/Devoplus.DataGuardian.SampleApi/Devoplus.DataGuardian.SampleApi.csproj index e748dd3..af0c15a 100644 --- a/samples/Devoplus.DataGuardian.SampleApi/Devoplus.DataGuardian.SampleApi.csproj +++ b/samples/Devoplus.DataGuardian.SampleApi/Devoplus.DataGuardian.SampleApi.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 enable enable diff --git a/src/Devoplus.DataGuardian/Devoplus.DataGuardian.csproj b/src/Devoplus.DataGuardian/Devoplus.DataGuardian.csproj index 8b20e8f..9ff2ece 100644 --- a/src/Devoplus.DataGuardian/Devoplus.DataGuardian.csproj +++ b/src/Devoplus.DataGuardian/Devoplus.DataGuardian.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 enable latest nullable @@ -19,10 +19,10 @@ 1.0.1 - - - - + + + + diff --git a/tests/Devoplus.DataGuardian.Tests/Devoplus.DataGuardian.Tests.csproj b/tests/Devoplus.DataGuardian.Tests/Devoplus.DataGuardian.Tests.csproj index 791d044..ff43d5b 100644 --- a/tests/Devoplus.DataGuardian.Tests/Devoplus.DataGuardian.Tests.csproj +++ b/tests/Devoplus.DataGuardian.Tests/Devoplus.DataGuardian.Tests.csproj @@ -1,16 +1,22 @@ - net8.0 + net10.0 + Exe false enable true + - - - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all +