From 647c4733cbd5e71940c0b80996303ae3bbecdf69 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:32:24 +0100 Subject: [PATCH 1/2] Bump actions/checkout from 4 to 5 (#376) Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/pr.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b0b63684..e4b670e0 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup .NET uses: actions/setup-dotnet@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 590b0ead..dcc0c55d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup .NET uses: actions/setup-dotnet@v4 From 10d283a9f7b03be139d5f5857ccba952b4673e0c Mon Sep 17 00:00:00 2001 From: Adam Hathcock Date: Tue, 26 Aug 2025 16:45:53 +0100 Subject: [PATCH 2/2] Report increment rather than total position (#377) * Report increment rather than total position * Report progress before saving SQLite --- .config/dotnet-tools.json | 4 ++-- src/Speckle.Sdk/Models/Base.cs | 3 +-- src/Speckle.Sdk/Serialisation/V2/Send/ObjectSaver.cs | 2 +- src/Speckle.Sdk/Transports/ServerUtils/ProgressStream.cs | 4 ++-- .../Serialisation/PrimitiveTestFixture.cs | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 9c4df592..321b5d64 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,11 +3,11 @@ "isRoot": true, "tools": { "csharpier": { - "version": "1.0.2", + "version": "1.1.2", "commands": [ "csharpier" ], "rollForward": false } } -} +} \ No newline at end of file diff --git a/src/Speckle.Sdk/Models/Base.cs b/src/Speckle.Sdk/Models/Base.cs index 57fb1408..1065e6b0 100644 --- a/src/Speckle.Sdk/Models/Base.cs +++ b/src/Speckle.Sdk/Models/Base.cs @@ -169,8 +169,7 @@ public class Base : DynamicBase, ISpeckleObject return count; } - case IEnumerable e - and not string: + case IEnumerable e and not string: { foreach (var arrValue in e) { diff --git a/src/Speckle.Sdk/Serialisation/V2/Send/ObjectSaver.cs b/src/Speckle.Sdk/Serialisation/V2/Send/ObjectSaver.cs index 906d408b..0e26a1bc 100644 --- a/src/Speckle.Sdk/Serialisation/V2/Send/ObjectSaver.cs +++ b/src/Speckle.Sdk/Serialisation/V2/Send/ObjectSaver.cs @@ -100,9 +100,9 @@ public sealed class ObjectSaver( { if (!_options.SkipCacheWrite && batch.Count != 0) { - sqLiteJsonCacheManager.SaveObjects(batch.Select(x => (x.Id.Value, x.Json.Value))); Interlocked.Add(ref _cached, batch.Count); progress?.Report(new(ProgressEvent.CachedToLocal, _cached, _objectsSerialized)); + sqLiteJsonCacheManager.SaveObjects(batch.Select(x => (x.Id.Value, x.Json.Value))); } } catch (OperationCanceledException) diff --git a/src/Speckle.Sdk/Transports/ServerUtils/ProgressStream.cs b/src/Speckle.Sdk/Transports/ServerUtils/ProgressStream.cs index ac15cb86..e0bfa5ac 100644 --- a/src/Speckle.Sdk/Transports/ServerUtils/ProgressStream.cs +++ b/src/Speckle.Sdk/Transports/ServerUtils/ProgressStream.cs @@ -20,7 +20,7 @@ internal sealed class ProgressStream( { int n = _stream.Read(buffer, offset, count); _position += n; - progress?.Report(new(ProgressEvent.DownloadBytes, _position, streamLength)); + progress?.Report(new(ProgressEvent.DownloadBytes, n, streamLength)); return n; } @@ -28,7 +28,7 @@ internal sealed class ProgressStream( { _stream.Write(buffer, offset, count); _position += count; - progress?.Report(new(ProgressEvent.UploadBytes, _position, streamLength)); + progress?.Report(new(ProgressEvent.UploadBytes, count, streamLength)); } public override bool CanRead => true; diff --git a/tests/Speckle.Sdk.Tests.Unit/Serialisation/PrimitiveTestFixture.cs b/tests/Speckle.Sdk.Tests.Unit/Serialisation/PrimitiveTestFixture.cs index 75f63184..6aa76069 100644 --- a/tests/Speckle.Sdk.Tests.Unit/Serialisation/PrimitiveTestFixture.cs +++ b/tests/Speckle.Sdk.Tests.Unit/Serialisation/PrimitiveTestFixture.cs @@ -39,7 +39,7 @@ public abstract class PrimitiveTestFixture }.Select(x => new object[] { x }); public static Half[] Float16TestCases { get; } = - [default, Half.Epsilon, Half.MaxValue, Half.MinValue, Half.PositiveInfinity, Half.NegativeInfinity, Half.NaN]; + [default, Half.Epsilon, Half.MaxValue, Half.MinValue, Half.PositiveInfinity, Half.NegativeInfinity, Half.NaN]; public static float[] FloatIntegralTestCases { get; } = [0, 1, int.MaxValue, int.MinValue];