[enhancement] deprecate Cardinality _MANY#6005
Conversation
|
@reinhapa I think your code comment could benefit from being a little less assertive as _MANY has the value 4 whilst ONE_OR_MORE has the value 6. So it's unfortunately in most places not just a case of replacing one with the other, but instead at those call sites some changes may need to be made |
line-o
left a comment
There was a problem hiding this comment.
_MANY will be removed without an (exposed) replacement. In places where _MANY is still used within the codebase it needs to be adapted to make use of ONE_OR_MORE instead.
I think the comment is good enough to transport that information
|
@line-o actually no, that's not how you would fix the call sites, which is why I commented that Patrick's comment in the code is incorrect/misleading |
@adamretter What would be your suggestion instead? I had a look into the code and to occurrences of those values and for me at least there is a mix up between the following use cases
IMHO this can not actually be captured in a single Enum in general. |
The cardinality Enum should only have the cardinalities applicable to XDM, i.e.:
My suggestion is to fix the calling code by refactoring it, the solution to fixing that is not to move those call sites to |
That is actually the plan. But I would suggest to move the discussion to #6007 ... |
in preparation of replaceing _MANY with ONE_OR_MORE this enum is marked for depecation Signed-off-by: Patrick Reinhart <patrick@reini.net>
313f014 to
47bb02c
Compare
Description:
Deprecate
_MANYas it is not an available XPath indicator.Use
EMPTY_SEQUENCEandEXACTLY_ONEto achieve the same behavior if needed.