You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The v3 shims disagree with themselves about smaPeriods. The same capability — "give me the indicator plus its SMA" — is a compile error on the bar-based overloads and a silent no-op on the tuple overloads, which merely warn and then discard the argument.
The unsafe form is the one that compiles.
Evidence
v2 populated PrsResult.PrsSma and RocResult.RocSma. Neither property exists in v3, so the value can never be honored; the guidance is to chain results.ToSma(smaPeriods) instead. Two overloads enforce that and two do not.
The tuple overloads' obsolete messages say only "Use 'ToPrs(..)' method. Tuple arguments were removed." and the ROC equivalent — neither mentions that smaPeriods is accepted and thrown away.
Impact
Lower severity than #2211 or #2212: the returned indicator values are correct, and only the requested SMA is missing. But it is a silent partial no-op. A v2 caller migrating tuple-based code keeps compiling, sees a warning about tuples, addresses that, and never learns their moving average stopped being computed — the result type simply has no field where it used to appear.
Resolution
Options, roughly in increasing cost:
Extend the tuple overloads' [Obsolete] messages to state that smaPeriods is ignored and direct callers to chain .ToSma(..). Cheapest; keeps compilation working.
Drop the parameter from the tuple signatures. Also a compile break, and loses the diagnostic opportunity.
Option 1 looks right for the 3.x line; option 2 or 3 would suit the wave that removes these shims.
Why it was not caught
Same as #2208, #2211, #2212: no test calls these shims and every one carries [ExcludeFromCodeCoverage]. A discarded parameter is additionally invisible to output comparison, since the values that are returned are correct.
Summary
The v3 shims disagree with themselves about
smaPeriods. The same capability — "give me the indicator plus its SMA" — is a compile error on the bar-based overloads and a silent no-op on the tuple overloads, which merely warn and then discard the argument.The unsafe form is the one that compiles.
Evidence
v2 populated
PrsResult.PrsSmaandRocResult.RocSma. Neither property exists in v3, so the value can never be honored; the guidance is to chainresults.ToSma(smaPeriods)instead. Two overloads enforce that and two do not.PRS —
src/Obsolete.V3.Indicators.cs:686-694vs:696-707:smaPeriodsGetPrs(IBar, IBar, int?, int?)Obsolete(.., true)— errorGetPrs(tuple, tuple, int, int)Obsolete(.., false)— warningROC —
:734-738vs:740-749:smaPeriodsGetRoc(IBar, int, int)Obsolete(.., true)— errorGetRoc(tuple, int, int?)Obsolete(.., false)— warningThe tuple overloads' obsolete messages say only
"Use 'ToPrs(..)' method. Tuple arguments were removed."and the ROC equivalent — neither mentions thatsmaPeriodsis accepted and thrown away.Impact
Lower severity than #2211 or #2212: the returned indicator values are correct, and only the requested SMA is missing. But it is a silent partial no-op. A v2 caller migrating tuple-based code keeps compiling, sees a warning about tuples, addresses that, and never learns their moving average stopped being computed — the result type simply has no field where it used to appear.
Resolution
Options, roughly in increasing cost:
[Obsolete]messages to state thatsmaPeriodsis ignored and direct callers to chain.ToSma(..). Cheapest; keeps compilation working.Obsolete(.., true)for thesmaPeriods-bearing forms, matching the bar-based ones. Consistent, but turns a warning into a build break for code that currently compiles — a bigger step than fix: V3 GetKeltner shim narrows multiplier to int, breaking compilation of v2 code #2212, which only restores a call form.Option 1 looks right for the 3.x line; option 2 or 3 would suit the wave that removes these shims.
Why it was not caught
Same as #2208, #2211, #2212: no test calls these shims and every one carries
[ExcludeFromCodeCoverage]. A discarded parameter is additionally invisible to output comparison, since the values that are returned are correct.Found while reviewing #2210.