Skip to content

#3320 switch sourcelink to private#3321

Open
thompson-tomo wants to merge 5 commits intoshesha-io:mainfrom
thompson-tomo:patch-1
Open

#3320 switch sourcelink to private#3321
thompson-tomo wants to merge 5 commits intoshesha-io:mainfrom
thompson-tomo:patch-1

Conversation

@thompson-tomo
Copy link
Copy Markdown

@thompson-tomo thompson-tomo commented May 29, 2025

Closes #3320

Summary by CodeRabbit

  • Chores
    • Removed redundant SourceLink package references across multiple project configuration files; no functional or public API changes.
  • Style
    • Standardized formatting and cleaned up whitespace and XML tag layout in several project configuration files for consistency and readability.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented May 29, 2025

Warning

Rate limit exceeded

@thompson-tomo has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 18 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 48f4aaf7-868d-4c13-9fc8-c9b860dddff2

📥 Commits

Reviewing files that changed from the base of the PR and between 93f8cff and e3b8497.

⛔ Files ignored due to path filters (1)
  • shesha-core/test/Shesha.Tests/Shesha.Tests.csproj is excluded by none and included by none
📒 Files selected for processing (1)
  • shesha-core/src/Shesha.Web.Host/Shesha.Web.Host.csproj

Walkthrough

Centralized the Microsoft.SourceLink.GitHub package by adding it to shesha-core/src/Directory.Build.props and removed duplicate SourceLink references from multiple project files; several projects also received minor XML/formatting and ItemGroup reorganization tweaks. No code or public API changes.

Changes

Cohort / File(s) Summary
Centralized props
shesha-core/src/Directory.Build.props
Added Microsoft.SourceLink.GitHub PackageReference (v8.0.0) with PrivateAssets=all and IncludeAssets=runtime;build;native;contentfiles;analyzers.
Projects — removed SourceLink
shesha-core/src/Shesha.Application/Shesha.Application.csproj, shesha-core/src/Shesha.Common/Shesha.Common.csproj, shesha-core/src/Shesha.Core/Shesha.Core.csproj, shesha-core/src/Shesha.Elmah/Shesha.Elmah.csproj, shesha-core/src/Shesha.FluentMigrator/Shesha.FluentMigrator.csproj, shesha-core/src/Shesha.Framework/Shesha.Framework.csproj, shesha-core/src/Shesha.GraphQL/Shesha.GraphQL.csproj, shesha-core/src/Shesha.Import/Shesha.Import.csproj, shesha-core/src/Shesha.MongoRepository/Shesha.MongoRepository.csproj, shesha-core/src/Shesha.NHibernate.PostGis/Shesha.NHibernate.PostGis.csproj, shesha-core/src/Shesha.NHibernate/Shesha.NHibernate.csproj, shesha-core/src/Shesha.RestSharp/Shesha.RestSharp.csproj, shesha-core/src/Shesha.Scheduler/Shesha.Scheduler.csproj, shesha-core/src/Shesha.Sms.Clickatell/Shesha.Sms.Clickatell.csproj, shesha-core/src/Shesha.Web.Core/Shesha.Web.Core.csproj, shesha-core/src/Shesha.Web.FormsDesigner/Shesha.Web.FormsDesigner.csproj, shesha-core/src/Shesha.Web.Host/Shesha.Web.Host.csproj
Removed individual Microsoft.SourceLink.GitHub PackageReference ItemGroup entries from project files to centralize the dependency.
Formatting & small project edits
shesha-core/src/Shesha.Core/..., shesha-core/src/Shesha.Elmah/..., shesha-core/src/Shesha.GraphQL/..., shesha-core/src/Shesha.Import/..., shesha-core/src/Shesha.MongoRepository/..., shesha-core/src/Shesha.NHibernate/..., shesha-core/src/Shesha.RestSharp/..., shesha-core/src/Shesha.Scheduler/..., shesha-core/src/Shesha.Sms.Clickatell/..., shesha-core/src/Shesha.Web.Core/...
Normalized XML formatting for AsyncFixer and IDisposableAnalyzers PackageReference tags; relocated a few <Folder Include="..."> entries between ItemGroups. No version or semantics changed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • IvanIlyichev

Poem

I nibble at XML, tidy and spry,
SourceLink hops to props on high.
Projects lean, duplicates gone,
Dev-only breadcrumbs tucked at dawn.
🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: consolidating Microsoft.SourceLink.GitHub to be a private/dev-only dependency instead of a public one.
Linked Issues check ✅ Passed The changes successfully move Microsoft.SourceLink.GitHub from individual project files to Directory.Build.props with PrivateAssets=all, making it dev-only and preventing it from appearing on nuget.org.
Out of Scope Changes check ✅ Passed All changes are focused on consolidating Microsoft.SourceLink.GitHub package references to be dev-only. Minor formatting adjustments to other package references are incidental housekeeping.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@shesha-core/src/Directory.Build.props`:
- Around line 14-19: The XML has an unclosed <ItemGroup> that wraps the
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0"> entry;
fix by adding a matching </ItemGroup> closing tag after the PackageReference
block so the <ItemGroup> is properly terminated and the XML can parse correctly
(ensure the closing </ItemGroup> is placed before any subsequent tags/comments).
- Around line 15-18: Directory.Build.props already declares PackageReference
Include="Microsoft.SourceLink.GitHub" Version="8.0.0", so remove the duplicate
PackageReference entries from Shesha.Web.Host.csproj and Shesha.Tests.csproj:
locate the <PackageReference Include="Microsoft.SourceLink.GitHub"> (in
Shesha.Web.Host.csproj) and the <PackageReference
Include="Microsoft.SourceLink.GitHub" Version="8.0.0"> (in Shesha.Tests.csproj)
and delete those nodes so the projects inherit the centralized reference from
Directory.Build.props, ensuring consistent versioning and avoiding conflicts.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 35b3ce4c-f00b-407f-b169-4267f8553cbc

📥 Commits

Reviewing files that changed from the base of the PR and between 701e49f and ce8dd15.

📒 Files selected for processing (3)
  • shesha-core/src/Directory.Build.props
  • shesha-core/src/Shesha.Application/Shesha.Application.csproj
  • shesha-core/src/Shesha.Core/Shesha.Core.csproj
💤 Files with no reviewable changes (1)
  • shesha-core/src/Shesha.Application/Shesha.Application.csproj

Comment on lines +15 to +18
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Find any remaining Microsoft.SourceLink.GitHub references in project files

echo "=== Searching for Microsoft.SourceLink.GitHub references in .csproj files ==="
rg -n "Microsoft\.SourceLink\.GitHub" --glob "*.csproj"

Repository: shesha-io/shesha-framework

Length of output: 1488


Remove duplicate Microsoft.SourceLink.GitHub package references from project files.

Projects under shesha-core/src/ inherit from this Directory.Build.props. Remove the duplicate reference from:

  • shesha-core/src/Shesha.Web.Host/Shesha.Web.Host.csproj (line 50, no version)

Additionally, remove the duplicate from:

  • shesha-core/test/Shesha.Tests/Shesha.Tests.csproj (line 101, version 8.0.0)

Centralizing this dependency in Directory.Build.props ensures consistent versioning across the solution and avoids package resolution conflicts.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shesha-core/src/Directory.Build.props` around lines 15 - 18,
Directory.Build.props already declares PackageReference
Include="Microsoft.SourceLink.GitHub" Version="8.0.0", so remove the duplicate
PackageReference entries from Shesha.Web.Host.csproj and Shesha.Tests.csproj:
locate the <PackageReference Include="Microsoft.SourceLink.GitHub"> (in
Shesha.Web.Host.csproj) and the <PackageReference
Include="Microsoft.SourceLink.GitHub" Version="8.0.0"> (in Shesha.Tests.csproj)
and delete those nodes so the projects inherit the centralized reference from
Directory.Build.props, ensuring consistent versioning and avoiding conflicts.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@shesha-core/src/Directory.Build.props`:
- Around line 14-19: Remove the redundant Microsoft.SourceLink.GitHub
PackageReference from the Shesha.Web.Host.csproj file: since
shesha-core/src/Directory.Build.props already defines <PackageReference
Include="Microsoft.SourceLink.GitHub" Version="8.0.0"> for projects under
src/**, delete the corresponding PackageReference block in
Shesha.Web.Host.csproj (the direct reference around line 50) so the project
inherits the centralized setting; after removal, run a build to confirm no other
duplicate SourceLink references remain and that SourceLink is still applied via
Directory.Build.props.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b9c67325-cef6-47cd-8e88-b622c8aa9b8d

📥 Commits

Reviewing files that changed from the base of the PR and between ce8dd15 and 93f8cff.

📒 Files selected for processing (1)
  • shesha-core/src/Directory.Build.props

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.

Dev dependencies being included

1 participant