Unused reference cleanup and add missing Obsolete attribute#7408
Unused reference cleanup and add missing Obsolete attribute#7408heku wants to merge 2 commits intoelsa-workflows:mainfrom
Conversation
heku
commented
Apr 21, 2026
- Unused PackageReference cleanup
- Add missing Obsolete attribute to IWorkflowBuilder
Greptile SummaryThis PR removes unused Confidence Score: 5/5Safe to merge; all changes are housekeeping with no behavioural impact at runtime. All three file changes are non-breaking cleanup. The only finding is a P2 style note about an existing call-site that will now produce a compiler warning — not a blocking issue. No files require special attention; the P2 note in
|
| Filename | Overview |
|---|---|
| Directory.Packages.props | Removes the PolySharp central package version entry; confirmed no other projects still reference it. |
| src/modules/Elsa.Workflows.Core/Contracts/IWorkflowBuilder.cs | Adds [Obsolete] to the two anonymous WithVariable<T> overloads, matching the existing attribute on the concrete WorkflowBuilder class. Correct and consistent. |
| src/modules/Elsa.Workflows.Management/Elsa.Workflows.Management.csproj | Removes unused IronCompress and PolySharp package references; IronCompress remains in Elsa.Common where it is actually used. |
Class Diagram
%%{init: {'theme': 'neutral'}}%%
classDiagram
class IWorkflowBuilder {
+WithVariable~T~() Variable~T~ ⚠️ Obsolete
+WithVariable~T~(T value) Variable~T~ ⚠️ Obsolete
+WithVariable~T~(string name, T value) Variable~T~
+WithVariable~T~(Variable~T~ variable) IWorkflowBuilder
+WithVariable(Variable variable) IWorkflowBuilder
}
class WorkflowBuilder {
+WithVariable~T~() Variable~T~ ⚠️ Obsolete (pre-existing)
+WithVariable~T~(T value) Variable~T~ ⚠️ Obsolete (pre-existing)
+WithVariable~T~(string name, T value) Variable~T~
}
IWorkflowBuilder <|.. WorkflowBuilder : implements
Comments Outside Diff (1)
-
src/modules/Elsa.Alterations/Workflows/ExecuteAlterationPlanWorkflow.cs, line 22-23 (link)Existing caller uses newly-obsoleted overloads
ExecuteAlterationPlanWorkflowcalls bothWithVariable<string>()andWithVariable<int>()— the two overloads that this PR marks[Obsolete]. After merging, the build will emit CS0618 warnings for these two lines. Consider migrating them to the named overload (WithVariable<T>(string name, T value)) either in this PR or as an immediate follow-up.
Reviews (1): Last reviewed commit: "Unused PackageReference cleanup" | Re-trigger Greptile