FLUID-6735: Distributing an implicit nested model relay cause a circular reference

Metadata

Source
FLUID-6735
Type
Bug
Priority
Major
Status
Closed
Resolution
Won't Fix
Assignee
N/A
Reporter
Justin Obara
Created
2022-05-12T14:16:17.004-0400
Updated
2024-07-22T10:35:21.082-0400
Versions
  1. 4.0
Fixed Versions
N/A
Component
  1. Framework
  2. IoC System

Description

This was first discovered while trying to distribute the panelIndex to the local model path in UIO+ which uses a fullNOPreview prefs editor loader but displayed similar to the separated panel prefs editor. This occurred as the UIO was configured with a call to fluid.uiOptions and the options set on the prefsEditor option which is distributed down to the prefsEditor component.

The result is a circular reference error like: "Error in component configuration - a circular reference was found during evaluation of path segment "model of path ,model,panelIndex".

Some work arounds include supplying this configuration as part of a gradeName that is merged on top. Or distributing a record containing the specific configuration to the component's model.

Comments

  • Justin Obara commented 2022-05-12T14:22:54.977-0400

    Added a test case https://github.com/fluid-project/infusion/pull/1080

  • Antranig Basman commented 2022-07-05T09:00:36.726-0400

    From comment thread on pull #1080:

    From amb26:

    Cheers @jobara - I reworked this test case in #1081 which resolves the circular reference problem. As I remarked in the channel, the problem is caused by the "misaligned" material in the parent grade which can't avoid trying to resolve a reference into its model from its options as it constructs, which is not permitted in Infusion. If/when Infusion 6 is written, this class of problem will be removed by removing the distinction between "models" and "general options" but until then I'm not sure we can do much better about issuing a helpful diagnostic although I can try. Hopefully this reworking is good enough to let you make progress on your panelIndex issue

    From jobara:

    @amb26 I was able to get past this issue in UIO+ by passing in a grade that contained the model configuration. Similar to what you described except I used the gradeNames directly.

  • Antranig Basman commented 2022-07-05T09:01:28.511-0400

    Closed since we found an effective workaround and big improvements in this experience will need to wait for a framework rewrite