Opened 4 years ago

Closed 4 years ago

#151 closed defect (invalid)

Declaring with same ID does not raise an error

Reported by: omamce Owned by: ymipsl
Priority: major Component: XIOS
Version: 2.0 Keywords:


I you declare in your XML something like :

 <file id="file1" name_suffix="_grid_T"

An then later in the XML :

 <file id="file1" name_suffix="_grid_U"

Only the lastest declared file is created. XIOS does not see that an ID is used several times, and does not raise any error or warning.

The same problem exists for ID in variable declarations, and probably for other objects.

It might be very hard for the user to understand that his/her file or variable is not written.

XIOS should see the conflict and raise an error (at least a warning).



Change History (3)

comment:1 Changed 4 years ago by ymipsl

Yes, because this is the expected behaviour. An object declared with the same Id is the same object.
Because the parsing order of the XML is not defined, in same case attribute can be overwritten in a undefined order.

This behaviour will not be changed in a close future.


comment:2 Changed 4 years ago by omamce

That's at lot of lost hours if we don't have any tool to check that. From user experience, duplicate IDs are mostly errors, not features :-((

comment:3 Changed 4 years ago by ymipsl

  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.