-
Notifications
You must be signed in to change notification settings - Fork 23
Warn or error if non-keyword strings having "@" are encountered #16
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
Is it possible to choose to ignore such new |
That's what 1.0 does, it just ignores them. The issue was an example in schema.org (ItemList example #3) which uses
|
I'm not sure if I'm misunderstanding, but the example doesn't seem to have ignored it at all-- it expanded it to |
Good point, that's because of the use of |
This seems like a feature implementations could offer (a special mode to check for this sort of thing). I don't think we'd want this extra burden (or any similar extra burdens) added to the standard processing rules. |
@dlongley I don't maintain an impl (so take a grain of salt with this question), but would a configurable mode just shift the burden to the clients of impls instead of the maintainers of impls? |
Yes, but I think that's where it should be. In fact, I think I'm speaking more with my client hat on than my implementer hat when I say that I do not want my production systems to have to deal with the extra burden of checking non-error cases to express warnings. I think it should be a goal to have a "fast lane" for JSON-LD processing to keep things as efficient as possible. I would prefer that the bottleneck in a complex software system never be JSON-LD processing. One way to help support that effort is to keep corner cases like raising warnings out of the standard processing mode. |
I'm convinced by @dlongley's argument. I'm in favor of close won't fix for the following rationale:
|
@azaroth42 I'm actually fine with close-won't-fix, but I do want to address one point you make:
I disagree strongly. It's exactly in the case of a large fully-automated system where I want warnings from my libraries (instead of silent acquiescence), so that I can accumulate information that lets me improve workflows without them having to break down first. So although I agree that this ticket isn't a good case at all for emitting warnings, I disagree strongly that we could find no such cases. Just my 2¢! |
WG resolved to add a non-normative note to the API specification to recommend that implementations generate a warning, however is appropriate for the implementation's language, when |
Fixed in 760b32fd396e47f5ae0ff720c3f3c9a2080592eb. |
Reopening from TPAC discussion |
This issue was discussed in a meeting.
View the transcriptIvan Herman: See Issue Syntax#260Gregg Kellogg: what we’re most worried about is other specs using @ and we want them to be compatible with us … but at this point hopefully everyone’s aware of our use of @ Manu Sporny: what does changing it to MUST NOT buy us? Gregg Kellogg: it means that if we add things like @direction in the future, the processors would choke on the new term but they also wouldn’t try to turn it into a URIRalph Swick: so, could you just say SHOULD NOT? Rob Sanderson: it does Ralph Swick: ah, so you are leaving this open for future compatibility Gregg Kellogg: and I think @direction is an example of why we want thisRob Sanderson: there was an earlier issue which we closed about this … and it was mentioned that if we found new info we might reopen it … this seems like new infromation Gregg Kellogg: so, some future @direction type thing could be setup to just disappearRob Sanderson: or attempt to turn into a crazy relative IRI Benjamin Young: so, as long as we just ignore the new values when processing–and don’t choke–that should leave the door open to the future without tripping up old clients Gregg Kellogg: authors should not use these keywords, but processors must ignore them … but with a warning Proposed resolution: Reopen #16 and require processors to ignore terms beginning with @ that are not defined keywords (Rob Sanderson) Ivan Herman: See Issue syntax#16 Gregg Kellogg: +1 Manu Sporny: +1 Rob Sanderson: +1 Benjamin Young: +1 Simon Steyskal: +1 Pierre-Antoine Champin: +1 Ivan Herman: +1 Resolution #5: Reopen #16 and require processors to ignore terms beginning with @ that are not defined keywords Rob Sanderson: Have we made this clear, it’s resolved? Gregg Kellogg: Yes, the editors need to do their thing now. Rob Sanderson: so we’ll close #260 in favor of opening #16. |
Looking at a schema.org example for ItemList, there is a JSON-LD example which includes the fictitious
@url
keyword, where they likely meant@id
.There's nothing to signal an issue, and a JSON-LD processor will happily resolve this relative to
@vocab
ashttp://schema.org/@url
. This creates a potential forward-compatibility issue if new keywords are introduced, as they are in 1.1. We might want to describe normative or suggested behavior if a processor encounters a string which could hold a keyword, but holds something else starting with@
.cc/ @danbri
Original issue: Warn or error if non-keyword strings having "@" are encountered #598
The text was updated successfully, but these errors were encountered: