Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"negative-tests.json" Too Strict ("{keys:1}", "{+keys:1}") #57

Open
watuwo opened this issue Nov 6, 2022 · 1 comment
Open

"negative-tests.json" Too Strict ("{keys:1}", "{+keys:1}") #57

watuwo opened this issue Nov 6, 2022 · 1 comment

Comments

@watuwo
Copy link

watuwo commented Nov 6, 2022

I propose that these tests are removed from
"negative-tests.json":

[ "{keys:1}",  false  ],
[ "{+keys:1}",  false  ],

I guess that the author of these tests thought of this
extract from the RFC:

Prefix modifiers are not applicable to variables that
have composite values.

The normative part of the RCF does not seem to explicitly
say what "not applicable" means. The algorithm in
"Appendix A" of the RFC
(https://www.rfc-editor.org/rfc/rfc6570#appendix-A) seems
to ignore the prefix modifier for complex values (and would
therefore not pass the above tests).

Also the algorithm in "Appendix A" explicitly ignores
variables with an absent or undefined value. Keeping the
above tests would mean that evaluating a
"prefix-modifier-varspec" with absent/undefined value
should be tolerated while the evaluation must fail for
complex values. This is not the behavior I would have
expected after reading the specification.

@mnot
Copy link
Member

mnot commented Jul 14, 2023

Appendix A is non-normative, and not meant to be considered a full implementation. Using a prefix modifier on a compositve value is at the very best not interoperable, because it is not specified; the specification's characterisation of it being 'not applicable' only reinforces that. So it's reasonable to expect failure in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants