Unverified Commit 1784dff9 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub
Browse files

Rename Modules Duplicated by EliminateTargetPaths (bp #1370) (#1373)



* Add Target utility referringModule

This adds a utility method, referringModule, to the Target object that
behaves like IsMember.pathlessTarget except that it returns the module
of an InstanceTarget. This is useful for situations where you want to
get at "the module" a target is pointing at, but you want behavior
to get an actual module from an instance.

Signed-off-by: default avatarSchuyler Eldridge <schuyler.eldridge@ibm.com>
(cherry picked from commit 72427067

)

* Rename modules when duplicating instances

Change the behavior of EliminateTargetPaths to generate ModuleTarget
renames when instances are duplicated. Previously, only InstanceTarget
renames would be generated.

In effect, annotations targeting a duplicated module when be
duplicated to point at the original and duplicated module.

Signed-off-by: default avatarSchuyler Eldridge <schuyler.eldridge@ibm.com>
(cherry picked from commit 64762d2e

)

* Test EliminateTargetPaths ModuleTarget anno duping

Add a test that EliminateTargetPaths properly duplicates an annotation
pointing at a ModuleTarget.

Signed-off-by: default avatarSchuyler Eldridge <schuyler.eldridge@ibm.com>
(cherry picked from commit bcbe60de

)

Co-authored-by: default avatarSchuyler Eldridge <schuyler.eldridge@gmail.com>
parent 3097244c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment