Sourceless relay rule with non-local target causes failure
Description
A sourceless relay rule whose target is not the current component causes a failure in fluid.materialiseModelPath. Example was
This is sent into fluid.registerDirectChangeRelay which seems to have a somewhat sloppy test on line 831:
This then gives
in fluid.matchMaterialiserSpec line 683 since there are no source segments
Environment
None
Activity
Show:
Antranig Basman January 6, 2022 at 2:41 PM
As it turns out the triggering condition is not the non-local source, but the local target. The failure is triggered one level higher up in fluid.parseModelRelay:
Putting a non-local reference in target causes us to take branch 2 which then doesn't bomb on a sourceless transform. All seems rather dodgy - of course our model of "relay documents are relay sources" is a deep crock.
A sourceless relay rule whose target is not the current component causes a failure in fluid.materialiseModelPath. Example was
This is sent into fluid.registerDirectChangeRelay which seems to have a somewhat sloppy test on line 831:
This then gives
in fluid.matchMaterialiserSpec line 683 since there are no source segments