finos / legend-pure

Legend Pure module
https://legend.finos.org
Apache License 2.0
66 stars 136 forks source link

Fix duplicate import groups #842

Closed kevin-m-knight-gs closed 2 months ago

kevin-m-knight-gs commented 2 months ago

Fix an issue where duplicate import groups were being created under certain circumstances. This was happening in cases where a DSL (such as Mapping or Diagram) parsed a code section, transformed it into M3 grammar, and then sent that to the M3 parser. In cases like that, both the DSL parser and the M3 parser would create an import group for the same section. Now the M3 parser only creates an import group if it cannot find one that already exists for the section.

Add tests to ensure there are no duplicate import groups and that import groups had the expected imports.

github-actions[bot] commented 2 months ago

Test Results

   368 files  +  3     368 suites  +3   1h 15m 23s :stopwatch: -4s 3 454 tests +16  3 430 :heavy_check_mark: +17  24 :zzz:  - 1  0 :x: ±0  4 550 runs  +16  4 526 :heavy_check_mark: +17  24 :zzz:  - 1  0 :x: ±0 

Results for commit cc0e1f8e. ± Comparison against base commit 5d4cc830.