FLUID-6587: Impossible to override any expanders in defaults

Metadata

Source
FLUID-6587
Type
Bug
Priority
Major
Status
Open
Resolution
N/A
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2021-01-08T11:13:55.080-0500
Updated
2021-11-02T08:59:50.786-0400
Versions
N/A
Fixed Versions
  1. 6.0
Component
  1. IoC System

Description

The problems with the defaults merging workflow are even more fundamental than reported in FLUID-6156. Rather than just not being able to make expanded default options defaultible, we can't override any expanders listed in defaults.

The following setup:

fluid.defaults("hortis.leafletMap", {
...
    outerBounds: "@expand:fluid.geom.emptyBounds()",
});

fluid.defaults("fluid.covidMap.map", {
    gradeNames: ["hortis.leafletMap", "hortis.streetmapTiles", "hortis.CSVLeafletMap", "hortis.conditionalTemplateRenderer"],
....
    outerBounds: {
        min: [-95.2, 41.6],
        max: [-74.3, 56.9]
    },
)}

ends up with the original expander being evaluated, since the merging algorithm produces a corrupt record with the (long-form) expander record plasted on top of the overriding value.

Yet another thing to fix when we regularise the expansion and merging pipeline for FLUID-5304.