inductiveautomation / ignition-module-tools

Tools that help in the creation and development of Modules for Inductive Automation's Ignition.
49 stars 12 forks source link

Jars listed in Module XML are not de-duplicated by scope #52

Closed benmusson closed 2 months ago

benmusson commented 2 months ago

Currently, the plugin allows for generation of module.xml files that list the same jar multiple times. I would expect the plugin to combine these entries together by combining the scopes.


Current behavior, notice how kotlin-stdlib-2.0.0.jar has entries for C, CDG, D, and G.

<jar scope="C">core-client-0.1.0.jar</jar>
<jar scope="C">kotlin-stdlib-2.0.0.jar</jar>
<jar scope="C">annotations-13.0.jar</jar>
<jar scope="C">if97-steam-tables-client-0.1.0.jar</jar>
<jar scope="CDG">core-common-0.3.0.jar</jar>
<jar scope="CDG">if97-2.0.0.jar</jar>
<jar scope="CDG">kotlin-stdlib-2.0.0.jar</jar> 
<jar scope="CDG">annotations-13.0.jar</jar>
<jar scope="CDG">if97-steam-tables-common-0.1.0.jar</jar>
<jar scope="D">core-designer-0.3.0.jar</jar>
<jar scope="D">kotlin-stdlib-2.0.0.jar</jar>
<jar scope="D">annotations-13.0.jar</jar>
<jar scope="D">if97-steam-tables-designer-0.1.0.jar</jar>
<jar scope="G">core-gateway-0.3.0.jar</jar>
<jar scope="G">kotlin-stdlib-2.0.0.jar</jar>
<jar scope="G">annotations-13.0.jar</jar>
<jar scope="G">if97-steam-tables-gateway-0.1.0.jar</jar>

Expected behavior, kotlin-stdlib-2.0.0.jar should have a single entry for CDG (the maximum applied extent of the scope).

<jar scope="C">core-client-0.1.0.jar</jar>
<jar scope="C">if97-steam-tables-client-0.1.0.jar</jar>
<jar scope="CDG">annotations-13.0.jar</jar>
<jar scope="CDG">core-common-0.3.0.jar</jar>
<jar scope="CDG">if97-2.0.0.jar</jar>
<jar scope="CDG">if97-steam-tables-common-0.1.0.jar</jar>
<jar scope="CDG">kotlin-stdlib-2.0.0.jar</jar>
<jar scope="D">core-designer-0.3.0.jar</jar>
<jar scope="D">if97-steam-tables-designer-0.1.0.jar</jar>
<jar scope="G">core-gateway-0.3.0.jar</jar>
<jar scope="G">if97-steam-tables-gateway-0.1.0.jar</jar>
brianeray commented 2 months ago

For internal tracking: IGN-10612.

brianeray commented 2 months ago

@paul-griffith or @PerryAJ can you take a look at this issue? I don't have enough domain expertise. My gut instinct is "yeah, that behavior sure could be tightened up" but maybe there is some reason for not collapsing the repeats and accumulating the scopes into a single node.

brianeray commented 2 months ago

Fixed by #53.