pcdshub / lcls-twincat-motion

TwinCAT 3 Motion Control Utilities - PLC Motion Library for all PCDS Applications
https://pcdshub.github.io/lcls-twincat-motion
Other
35 stars 20 forks source link

Minimize Redundant Deprecation Warnings #170

Closed ZLLentz closed 1 year ago

ZLLentz commented 1 year ago

Current Behavior

Some of the deprecated function blocks show many many deprecation warnings, since they themselves reference deprecated names.

Expected Behavior

There should only be 1 warning per deprecation infraction, rather than potentially dozens.

Context / environment

PR review at https://github.com/pcdshub/lcls-twincat-motion/pull/163#discussion_r1232520349

In the context of the demo PLC, this ends up producing a lot of deprecation warnings. You'd naively only expect 2 warnings (using DUT_MotionStage once + using XPIM which extends a deprecated FB) but you get many more. I think some of this is due to deprecated FBs including deprecated FBs and deprecated structs and getting the compiler warning in every layer.

Suggested Solution

We should switch out all internal names, even those in deprecated function blocks, to use the newest names when there is a 1:1 alias.