Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 19, 2025

Optimize SourceLink to only run on Release builds

This PR addresses the issue where SourceLink breaks incremental builds on new commits by optimizing it to only run during Release configurations.

✅ Rebase Completed and Merged

The branch has been successfully rebased on the latest master branch (commit 946cd40) and merged back with the remote branch to update it with the rebased commits.

Changes Made:

  • Modified /Content/Library/src/Directory.Build.props to add Debug configuration condition that disables SourceLink properties:
    • EnableSourceLink=false - Disables SourceLink entirely for Debug builds
    • IncludeSourceRevisionInInformationalVersion=false - Prevents source revision in version info
  • Successfully integrated with the updated master branch structure which now includes:
    • Dotnet Watch support for build files
    • Enhanced Build Quality settings (Deterministic, ContinuousIntegrationBuild, ProduceReferenceAssembly, GenerateDocumentationFile, EnablePackageValidation)
    • Code Quality settings with nullable reference types enabled
    • Dependency Quality settings with NuGet auditing configured
    • F# analyzers packages (FSharp.Analyzers.Build, Ionide.Analyzers, G-Research.FSharp.Analyzers)

Rebase Details:

Verification:

  • ✅ Build passes without errors
  • ✅ Template generation works correctly
  • ✅ Generated library projects include SourceLink optimization at the correct location (lines 27-32)
  • ✅ Generated projects build and test successfully
  • ✅ SourceLink disabled for Debug builds, enabled for Release builds
  • ✅ All new build/code/dependency quality settings are present

Behavior:

  • Debug builds: SourceLink is disabled, preventing incremental build issues during development
  • Release builds: SourceLink remains fully enabled for proper debugging support in production packages
  • Console projects: Unaffected as they don't use SourceLink properties

Fixes #301

Original prompt

This section details on the original issue you should resolve

<issue_title>Optimize SourceLink to only run on Release builds to prevent increment builds from breaking on new commits</issue_title>
<issue_description>Is your feature request related to a problem? Please describe.

Update any places that are using SourceLink to only be run during Release Configurations

    <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
        <!-- Disable SourceLink for Debug builds since it breaks incremental builds. See
        https://github.com/dotnet/sdk/issues/37371#issuecomment-2561620166 -->
        <EnableSourceLink>false</EnableSourceLink>
        <IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
        <EmbedUntrackedSources>true</EmbedUntrackedSources>
    </PropertyGroup>

For reference:
https://github.com/TheAngryByrd/IcedTasks/blob/b94f98007e8df40ae8da4f48df08a654ff4a1ca0/Directory.Build.props#L31-L37

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.
</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #301


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Optimize SourceLink to run only on Release builds Optimize SourceLink to only run on Release builds to prevent incremental build breakage Oct 19, 2025
Copilot AI requested a review from TheAngryByrd October 19, 2025 22:41
Copilot finished work on behalf of TheAngryByrd October 19, 2025 22:41
@TheAngryByrd
Copy link
Owner

@copilot rebase and resolve conflicts

Copy link
Contributor Author

Copilot AI commented Nov 1, 2025

@copilot rebase and resolve conflicts

Rebased on master and resolved conflicts. The SourceLink optimization has been successfully integrated into the updated Directory.Build.props structure from PR #309. All new build quality, code quality, and dependency quality settings are preserved. (commit 31b831a)

Copilot finished work on behalf of TheAngryByrd November 1, 2025 12:14
@TheAngryByrd TheAngryByrd marked this pull request as ready for review November 1, 2025 12:45
Copilot AI requested a review from TheAngryByrd November 1, 2025 12:48
Copilot finished work on behalf of TheAngryByrd November 1, 2025 12:48
@TheAngryByrd TheAngryByrd merged commit 357ed2a into master Nov 1, 2025
7 checks passed
@TheAngryByrd TheAngryByrd deleted the copilot/optimize-sourcelink-settings branch November 1, 2025 13:08
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.

Optimize SourceLink to only run on Release builds to prevent increment builds from breaking on new commits

2 participants