Skip to content

Conversation

@dameng324
Copy link
Owner

This pull request improves the debugging experience for the LightProto project by enabling Source Link and configuring symbol package generation. These changes will make it easier to debug into the source code when using the library from NuGet.

Build and debugging improvements:

  • Enabled deterministic builds, continuous integration build settings, and symbol package generation (snupkg) in the project file (LightProto.csproj).
  • Added a package reference to Microsoft.SourceLink.GitHub to support Source Link integration for better debugging with source code.

Copilot AI review requested due to automatic review settings January 6, 2026 09:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request enables Source Link support for the LightProto library to improve the debugging experience when consuming the package from NuGet. The changes configure MSBuild properties for deterministic builds, symbol package generation, and add the Microsoft.SourceLink.GitHub package reference.

  • Adds MSBuild properties to enable deterministic builds and symbol generation
  • Integrates Microsoft.SourceLink.GitHub for source code debugging support
  • Configures symbol package format as snupkg for NuGet compatibility

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<!-- Enable Source Link for better debugging experience -->
<PropertyGroup>
<Deterministic>true</Deterministic>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting ContinuousIntegrationBuild to true unconditionally will break local development builds. This property should only be set to true in CI environments. When enabled for local builds, it causes Source Link to embed absolute file paths that won't exist on developers' machines, making debugging problematic.

The recommended approach is to use a condition that checks if the build is running in a CI environment. You can either:

  1. Remove this line and let the CI workflow set it via command line argument (e.g., dotnet pack -p:ContinuousIntegrationBuild=true)
  2. Use a condition like: Condition="'$(CI)' == 'true' OR '$(GITHUB_ACTIONS)' == 'true'"

Most CI systems automatically set environment variables that can be detected. GitHub Actions sets GITHUB_ACTIONS=true.

Suggested change
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<ContinuousIntegrationBuild Condition="'$(CI)' == 'true' OR '$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.39%. Comparing base (b6cc48c) to head (241ac10).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #140   +/-   ##
=======================================
  Coverage   98.39%   98.39%           
=======================================
  Files          99       99           
  Lines        2186     2186           
  Branches      231      231           
=======================================
  Hits         2151     2151           
  Misses         23       23           
  Partials       12       12           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link

github-actions bot commented Jan 6, 2026


BenchmarkDotNet v0.15.3, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.101
  [Host]    : .NET 8.0.22 (8.0.22, 8.0.2225.52707), X64 RyuJIT x86-64-v3
  .NET 10.0 : .NET 10.0.1 (10.0.1, 10.0.125.57005), X64 RyuJIT x86-64-v3
  .NET 8.0  : .NET 8.0.22 (8.0.22, 8.0.2225.52707), X64 RyuJIT x86-64-v3
  .NET 9.0  : .NET 9.0.11 (9.0.11, 9.0.1125.51716), X64 RyuJIT x86-64-v3


Method Job Runtime Mean Error StdDev Ratio Allocated Alloc Ratio
Deserialize_ProtoBuf_net .NET 10.0 .NET 10.0 768.8 μs 3.13 μs 2.61 μs 1.19 562 KB 0.88
Deserialize_GoogleProtoBuf .NET 10.0 .NET 10.0 636.5 μs 2.45 μs 2.29 μs 0.98 648.7 KB 1.01
Deserialize_LightProto .NET 10.0 .NET 10.0 646.5 μs 4.26 μs 3.78 μs 1.00 639.98 KB 1.00
Deserialize_ProtoBuf_net .NET 8.0 .NET 8.0 920.9 μs 1.55 μs 1.29 μs 1.45 562 KB 0.88
Deserialize_GoogleProtoBuf .NET 8.0 .NET 8.0 830.5 μs 2.36 μs 2.21 μs 1.31 648.7 KB 1.01
Deserialize_LightProto .NET 8.0 .NET 8.0 635.2 μs 2.73 μs 2.56 μs 1.00 639.98 KB 1.00
Deserialize_ProtoBuf_net .NET 9.0 .NET 9.0 832.5 μs 1.76 μs 1.56 μs 1.29 562 KB 0.88
Deserialize_GoogleProtoBuf .NET 9.0 .NET 9.0 722.0 μs 1.53 μs 1.20 μs 1.12 648.7 KB 1.01
Deserialize_LightProto .NET 9.0 .NET 9.0 645.0 μs 6.73 μs 6.30 μs 1.00 639.98 KB 1.00

BenchmarkDotNet v0.15.3, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.101
  [Host]    : .NET 8.0.22 (8.0.22, 8.0.2225.52707), X64 RyuJIT x86-64-v3
  .NET 10.0 : .NET 10.0.1 (10.0.1, 10.0.125.57005), X64 RyuJIT x86-64-v3
  .NET 8.0  : .NET 8.0.22 (8.0.22, 8.0.2225.52707), X64 RyuJIT x86-64-v3
  .NET 9.0  : .NET 9.0.11 (9.0.11, 9.0.1125.51716), X64 RyuJIT x86-64-v3


Method Job Runtime Mean Error StdDev Ratio RatioSD Allocated Alloc Ratio
Serialize_ProtoBuf_net .NET 10.0 .NET 10.0 958.2 μs 16.97 μs 15.04 μs 1.37 0.02 526.41 KB 1.03
Serialize_GoogleProtoBuf .NET 10.0 .NET 10.0 797.1 μs 6.98 μs 6.19 μs 1.14 0.01 512.95 KB 1.00
Serialize_LightProto .NET 10.0 .NET 10.0 697.7 μs 5.05 μs 4.21 μs 1.00 0.01 512.95 KB 1.00
Serialize_ProtoBuf_net .NET 8.0 .NET 8.0 1,069.2 μs 11.47 μs 10.72 μs 1.34 0.02 526.4 KB 1.03
Serialize_GoogleProtoBuf .NET 8.0 .NET 8.0 849.8 μs 10.76 μs 10.07 μs 1.06 0.02 512.95 KB 1.00
Serialize_LightProto .NET 8.0 .NET 8.0 798.1 μs 8.93 μs 8.35 μs 1.00 0.01 512.95 KB 1.00
Serialize_ProtoBuf_net .NET 9.0 .NET 9.0 1,045.4 μs 10.72 μs 8.95 μs 1.39 0.02 526.4 KB 1.03
Serialize_GoogleProtoBuf .NET 9.0 .NET 9.0 847.5 μs 15.75 μs 15.47 μs 1.13 0.02 512.95 KB 1.00
Serialize_LightProto .NET 9.0 .NET 9.0 751.1 μs 7.88 μs 7.37 μs 1.00 0.01 512.95 KB 1.00

@dameng324 dameng324 merged commit 76f50dd into main Jan 6, 2026
14 checks passed
@dameng324 dameng324 deleted the source-link branch January 6, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants