-
Notifications
You must be signed in to change notification settings - Fork 35
Possible bug in Expansion Algorithm step 13.4.16 #270
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
Comments
You might be referring to compact#tjs11, which doesn't have a related expansion test. t0122 is about catching IRIs having the form of a keyword. I'll add a couple of tests for this. And, that test should read, instead:
But, this step overlaps a change in PR #275. |
I'm not doing anything related to compaction, so I doubt there's any confusion with tjs11. |
Can you describe what it is about t0122 that relates to this processing step? |
To be clear, t0122 contains the following input file: {
"@context": {
"@base": "http://example.org/"
},
"http://example.org/vocab/at": {"@id": "@"},
"http://example.org/vocab/foo.bar": {"@id": "@foo.bar"},
"http://example.org/vocab/ignoreme": {"@id": "@ignoreMe"}
} which doesn't seem to relate to JSON literals. One test I was going to add uses the following input file: {
"@context": {
"@version": 1.1,
"e": {"@id": "http://example.org/vocab#null", "@type": "@json"}
},
"e": null
} I think this would trigger the issue you were concerned about. |
Is the "unless" that begins 13.4.16 meant to apply only to the first clause about |
My concern here is is about
Given that reading/parsing, I can't/couldn't figure out how to end up with an empty string as: 13.4.3.2 will set |
Note that 13.4.16 is updated by PR #275 to be "Unless expanded value is This would be true for any non-null values of expanded value, any null values where property is not |
Relating to your original question (which I now finally understand), yes it does return null. It seems a bug in my code, from which the result is taken, turned it into an empty string. The test result should be updated to be the following: [{
"http://example.org/vocab/at": [{"@id": "http://example.org/@"}],
"http://example.org/vocab/foo.bar": [{"@id": "http://example.org/@foo.bar"}],
"http://example.org/vocab/ignoreme": [{"@id": null}]
}] |
@kasei I believe the corrected t0122 is correct, and I added two other tests for null JSON literals. Because we're changing expected results, the WG will need to consider this. |
@gkellogg updated tests looks good, thanks. |
This issue was discussed in a meeting.
View the transcriptPossible bug in Expansion Algorithm step 13.4.16Rob Sanderson: link: #270 Rob Sanderson: so the next one is issue 270 … after some discussion gkellogg believes the test is fixed … and added two more tests … but since we’re changing the tests, we do need to consider this as a group … any change to the algorithm that doesn’t change the test results is fine … but this one changes the test results…so we need to determine the weight of this one … it doesn’t seem like a dropping us out of CR sort of change … gkellogg can you elaborate? Gregg Kellogg: there was a bug in my implementation based on my misinterpretation of my own text … I’ll have to dig into it again more closely … I’d misinterpreted what his concern was initially Rob Sanderson: what I recall is that it was a null vs. empty list question … and that the test results needed to test for whichever one it should have been rather than the other one Gregg Kellogg: so the text had previously said if an input type was @json … because null would be kept only in the case for @value when the type is @json … that was a change to the algorithm text … in terms of what the test result was… … one of these was redundant … expand 122 out. it had been an empty string…and should have stayed null … so it partly related to that wrong step that shouldn’t have been in there Rob Sanderson: so the good thing is that Greg agrees with these fixes … so I think that we should have a resolution … that there was essentially a typo in the test result … and that we’re fixing it by tweaking both the algorithm and the test result … and the issue submitter (Greg) agrees with this fix … and that we agree this shouldn’t trigger a new CR … my proposal, then, would be that we suggest a non-normative tweak to the algorithm text and fix what amounts to a typo in the tests Ivan Herman: so, since as you say the algorithm is non-normative, then we should be fine … certainly the algorithm and tests should be in sync Rob Sanderson: pchampin you’re ok with this also? Pierre-Antoine Champin: yes. it’s fine. Rob Sanderson: so we should note that this would effect other implementation’s test results potentially Proposed resolution: Accept #270 including both text change to the algorithm and fix to the expected test result, noting that this would potentially affect other implementations’ test results, but that we do not believe this requires re-entry to CR (Rob Sanderson) Rob Sanderson: but that we do not believe this requires re-entry into CR Gregg Kellogg: +1 Benjamin Young: +1 Jeff Mixter: +1 Tim Cole: +1 Pierre-Antoine Champin: +1 Rob Sanderson: +1 Resolution #3: Accept #270 including both text change to the algorithm and fix to the expected test result, noting that this would potentially affect other implementations’ test results, but that we do not believe this requires re-entry to CR Ivan Herman: +1 |
Uh oh!
There was an error while loading. Please reload this page.
Expansion Algorithm step 13.4.16 says:
I believe test t0122 highlights a case where this is problematic. It's possible by way of 13.4.3.2 and (IRI Expansion step 2) that
expanded value
is null here, but the test expects the resulting value to be an empty string. I'm not sure where else thenull
value might be converted to an empty string. Is it possible the test is wrong? Or does the wording in 13.4.16 need updating?The text was updated successfully, but these errors were encountered: