Conversation
Co-authored-by: SIkebe <17608272+SIkebe@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Directory.Build.props
Outdated
|
|
||
| <!-- Source Link Configuration --> | ||
| <PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
| <EmbedUntrackedSources>true</EmbedUntrackedSources> | ||
|
|
||
| <!-- Deterministic builds help ensure reproducible builds --> | ||
| <Deterministic>true</Deterministic> | ||
| <ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild> |
There was a problem hiding this comment.
@copilot src/ShukujitsuSharp/ShukujitsuSharp.csproj ではなく Directory.Build.props に追加した理由は?
There was a problem hiding this comment.
You're right to question this. I've moved the Source Link properties from Directory.Build.props to the specific ShukujitsuSharp.csproj project file where they're actually needed. Source Link is only relevant for NuGet packages that get published, and only the main library project has IsPackable=true. The test project and generator don't need these properties. This makes the configuration more targeted and precise. Commit: 5a0ef13
There was a problem hiding this comment.
Pull Request Overview
This PR adds Source Link support to the GitHub repository, enabling developers to step into the library source code during debugging sessions.
- Added the Microsoft.SourceLink.GitHub package reference to the main project.
- Configured Source Link properties (PublishRepositoryUrl, EmbedUntrackedSources, Deterministic, ContinuousIntegrationBuild) globally in Directory.Build.props.
- Removed the duplicate PublishRepositoryUrl property from the project file.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/ShukujitsuSharp/ShukujitsuSharp.csproj | Removed duplicate PublishRepositoryUrl and added Microsoft.SourceLink.GitHub package. |
| Directory.Build.props | Added Source Link configuration properties for reproducible builds and CI integration. |
Why globally? |
…ific project file Co-authored-by: SIkebe <17608272+SIkebe@users.noreply.github.com>
Good point. I initially configured them globally but realized that Source Link properties are only meaningful for projects that get published as NuGet packages. I've moved them to the specific |
Implements Source Link support to enable debugging into the library source code from NuGet packages.
Changes Made
Added Microsoft.SourceLink.GitHub package reference (v8.0.0) to the main library project with
PrivateAssets="All"to avoid exposing it as a dependencyConfigured Source Link MSBuild properties in
Directory.Build.props:PublishRepositoryUrl=true- Enables repository URL publishing in packagesEmbedUntrackedSources=true- Embeds source files not tracked by source controlDeterministic=true- Enables deterministic builds for reproducibilityContinuousIntegrationBuild=true- Enabled when running in GitHub ActionsRemoved duplicate
PublishRepositoryUrlproperty from the project file since it's now defined globallyBenefits
Verification
sourcelink test✅/_/*→https://raw.githubusercontent.com/SIkebe/ShukujitsuSharp/{commit}/*✅This implementation follows the Microsoft Source Link documentation and enables a better debugging experience for library consumers.
Fixes #9.
💡 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.