Repository navigation
Add a ReplaceDeprecatedNodes utility to help users update old applications. - #20
Closed
mjohanse-emr wants to merge 9 commits into
Closed
mjohanse-emr wants to merge 9 commits into
mjohanse-emr wants to merge 9 commits into
Conversation
Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
…I replacement. Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
Signed-off-by: Michael Johansen <michael.johansen@emerson.com>
mjohanse-emr
marked this pull request as draft
July 1, 2026 16:28
mjohanse-emr
commented
Jul 1, 2026
Contributor
Author
Contributor
Author
|
This work is being placed on hold due to additional problems found with the current implementation. At this point, it's not worth it to continue this development. I will leave the branch around in case we want to pick it up at some later point. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this Pull Request accomplish?
As part of this MDS release, we have deprecated/renamed a number of VIs and controls. The users application will still load, but it will have the typical red line through the deprecated nodes, etc. The utility introduced in this PR will recursively search a user selected directory for all .vi and .ctl files and replace the deprecated nodes with the new replacements. This is meant to handle:
Note: Right now, the deprecations are limited to Read Measurement and Read Condition workflows, so any changes by this tool should not affect what goes into the user's MDS database.
Note: This tool was created with the current set of deprecations in mind. I don't claim that it will handle all future deprecations without some additional changes.
It works as follows:
Why should this Pull Request be merged?
What testing has been done?
I saved off a number of VIs and Controls before the deprecation took place. I ran the utility on these files for testing. Testing was limited to making sure the VIs were not broken and that the replacements were performed correctly. I didn't execute the VIs before/after to compare results. I didn't think that was strictly necessary assuming visual inspection is sufficient. These files are attached to the azdo work item here (Pre Rename Code.zip or Pre Rename Code 2024.zip):
https://dev.azure.com/ni/DevCentral/_workitems/edit/3927049/
Concerns
Once concern is that I have been testing against the same set of files the whole time, which doesn't offer much breadth of testing. There's no way to predict what type of code the user will try and run this on, but perhaps as part of the review or validation a different set of "old" code is used to try and catch any bugs.
Another concern is that this ended up being a pretty complex set of LabVIEW VIs. While I've tried to think of all user cases, surely I've missed some, and there's certainly a chance there's a bug somewhere in this LV code. The consequences of any bad replacements will hopefully be obvious, but if they are close enough in type, they may just generate a coercion dot instead of a broken VI. This could potentially change the users application in an unwanted way.
Alternatives
If this utility seems too risky we could just not ship this utility and make clients do one of the following: