Skip to content

Unused reference cleanup and add missing Obsolete attribute#7408

Open
heku wants to merge 2 commits intoelsa-workflows:mainfrom
heku:cleanup
Open

Unused reference cleanup and add missing Obsolete attribute#7408
heku wants to merge 2 commits intoelsa-workflows:mainfrom
heku:cleanup

Conversation

@heku
Copy link
Copy Markdown
Contributor

@heku heku commented Apr 21, 2026

  • Unused PackageReference cleanup
  • Add missing Obsolete attribute to IWorkflowBuilder

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 21, 2026

Greptile Summary

This PR removes unused PolySharp and IronCompress package references from Elsa.Workflows.Management.csproj and the central Directory.Packages.props, and adds the missing [Obsolete] attribute to two WithVariable<T> overloads in IWorkflowBuilder to match what the concrete WorkflowBuilder already carried.

Confidence Score: 5/5

Safe 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 ExecuteAlterationPlanWorkflow.cs is a minor follow-up item.

Important Files Changed

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
Loading

Comments Outside Diff (1)

  1. src/modules/Elsa.Alterations/Workflows/ExecuteAlterationPlanWorkflow.cs, line 22-23 (link)

    P2 Existing caller uses newly-obsoleted overloads

    ExecuteAlterationPlanWorkflow calls both WithVariable<string>() and WithVariable<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

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.

1 participant