Skip to content

Replace DistributedLock meta-package with DistributedLock.Core in Elsa.Common#7169

Merged
sfmskywalker merged 2 commits intorelease/3.6.0from
copilot/remove-unneeded-references
Dec 24, 2025
Merged

Replace DistributedLock meta-package with DistributedLock.Core in Elsa.Common#7169
sfmskywalker merged 2 commits intorelease/3.6.0from
copilot/remove-unneeded-references

Conversation

Copy link
Contributor

Copilot AI commented Dec 24, 2025

Elsa.Common was referencing the DistributedLock meta-package, which transitively pulls in all provider implementations (SQL Server, Redis, PostgreSQL, Azure, FileSystem, etc.) despite only using the core abstractions.

Changes

  • Replace DistributedLock package reference with DistributedLock.Core in Elsa.Common.csproj

The module only uses interfaces from Medallion.Threading namespace (IDistributedLock, IDistributedLockProvider, IDistributedSynchronizationHandle), which are provided by DistributedLock.Core. Provider-specific implementations remain available to modules that explicitly need them (e.g., Elsa.Workflows.Runtime with DistributedLock.FileSystem).

Original prompt

This section details on the original issue you should resolve

<issue_title>Avoid bringing unneeded references to the project output</issue_title>
<issue_description>https://github.com/elsa-workflows/elsa-core/blob/90dbdc48d935eb9e1d6aeb765bce321ab271b3f6/src/modules/Elsa.Common/Elsa.Common.csproj#L20C9-L20C55

This meta-package will reference all the libraries from providers that won't be used anywhere on the project, and should be replaced just with DistributedLock.Core for the needed abstractions.</issue_description>

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

@sfmskywalker Yep, nice catch 👍🏻

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


This change is Reviewable

…a.Common

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix unneeded references in project output Replace DistributedLock meta-package with DistributedLock.Core in Elsa.Common Dec 24, 2025
@sfmskywalker sfmskywalker marked this pull request as ready for review December 24, 2025 20:50
Copilot AI review requested due to automatic review settings December 24, 2025 20:50
Copilot AI requested a review from sfmskywalker December 24, 2025 20:50
@sfmskywalker sfmskywalker merged commit 53245ca into release/3.6.0 Dec 24, 2025
6 checks passed
@sfmskywalker sfmskywalker deleted the copilot/remove-unneeded-references branch December 24, 2025 20:50
@sfmskywalker sfmskywalker linked an issue Dec 24, 2025 that may be closed by this pull request
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 PR optimizes package dependencies by replacing the DistributedLock meta-package with DistributedLock.Core in the Elsa.Common module. This change eliminates unnecessary transitive dependencies from provider implementations (SQL Server, Redis, PostgreSQL, Azure, FileSystem, etc.) that are not used by this module.

Key Changes:

  • Replace DistributedLock with DistributedLock.Core package reference in Elsa.Common.csproj

The module only requires the core abstractions (IDistributedLock, IDistributedLockProvider, IDistributedSynchronizationHandle) from the Medallion.Threading namespace, which are all provided by DistributedLock.Core. Modules that need specific provider implementations (like Elsa.Workflows.Runtime with DistributedLock.FileSystem) already reference them directly.

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.

Avoid bringing unneeded references to the project output

3 participants