-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
New ambiguous dfns #5958
Comments
We can't afford to never use terms twice in HTML; that's not a constraint on HTML editing we can accept. This "ambiguity" is, IMO, a problem with Bikeshed's data model, where unqualified links (with no for) get counted as ambiguous, instead of defaulting to for=/. You can opt in to the better data model with "Use Explicit For". Then edits to other specs which introduce a second instance of a term will not break your build. For the browsing context case, the issue is that for some reason Bikeshed is counting the navigation param one as exported. However, it is not exported. So there's not much we can do on the HTML side. /cc @tabatkins |
I think we can add data-noexport. I believe that for HTML Shepherd defaults to export for dfn. |
Could we change Shepherd to not do that? |
I presume Shepherd does that specially for HTML because, since HTML doesn't generally annotate its definitions properly and still largely relies on Shepherd heuristics, doing so would mean a ton of HTML definitions are treated as unexported. Unless that's changed, and every |
I don't know if we've gotten there yet, but I'd rather move toward that world, especially now that we have some harm being caused by the current setup. (I also think it's pretty unlikely that Shepherd defaults to export for dfn; otherwise large anchor blocks like https://github.com/WICG/portals/blob/3c57d0d78dda6d7a5e551ed701957583ae91d124/index.bs#L25-L46 would not be necessary. Maybe there's some heuristic involved instead.) |
@plinss would know. Is there a dataset we could inspect somewhere? |
Shepherd default exports all anchors that have a known type other than a bare Ideally it determines the anchor type from the I would also much prefer that the HTML spec grows the explicit attributes to specify the anchor types, just like Bikeshed and Respec do, and then we can remove the heuristics. A If you want to look at Shepherd's output, you can dump the entire anchor database via: https://api.csswg.org/sheperd/spec/?anchors=1&drafts=1 (you can restrict that to specific specs by adding &spec=) or you can query for individual anchors at https://respec.org/xref/ or via Bikeshed's command line. |
I'd note that the "browsing context" issue here is helped by neither In particular, the following test bikeshed document hits it:
and produces the bikeshed output:
|
This removes the "browsing context" hack that was added in 470b2a7 (part of that commit) in w3ctag#242, which is no longer needed because the referencing text was removed in 4f5f94c; the underlying issue whatwg/html#5958 still exists. It removes the `line-height` hack (added in 8ec8a21 in w3ctag#243) that was needed for unknown reasons and is no longer needed.
This removes the "browsing context" hack that was added in 470b2a7 (part of that commit) in #242, which is no longer needed because the referencing text was removed in 4f5f94c; the underlying issue whatwg/html#5958 still exists. It removes the `line-height` hack (added in 8ec8a21 in #243) that was needed for unknown reasons and is no longer needed.
I see another set of ambiguous refs according to bikeshed:
|
Yup, this one's just straight ambiguous, since the "form control" |
I'll fix that one. Did we ever figure out the browsing context issue? See #6054 (comment) where it appears Bikeshed is treating it as exported even though it contains |
No, I still see the double browsing context thing show up, currently in Mixed Content. Should we just add a for attribute even though it's not exported? |
I'd really like to get to the bottom of why the Bikeshed database is using marked-as-not-exported terms. That is, Bikeshed says |
Right, okay, I guess that comes down to asking @plinss to disable Shepherd heuristics now that we have marked things for exporting explicitly. Or maybe @tabatkins has access to that as well? |
That might work, but it seems like there's a separate issue where Bikeshed is picking up things even if the Shepherd heuristic says they should not be exported: see #6054 (comment) |
Thanks, filed speced/bikeshed#1982 in the hope of moving that forward. "Fortunately" W3C doesn't use fatal Bikeshed mode yet so nobody is blocked on us, but it's not pretty either. |
Hm, I'm no longer seeing this issue locally at all; Let me go see what Mixed Content is doing... |
Ah, I see what the problem is. Mixed Content contains a link-defaults entry specifying:
And one of the side-effects of link-defaults is that it treats the matching definitions as exported, because you explicitly said that you wanted to use them. So since HTML does still have two distinct definitions that are identical under the linking model, and both of them get turned on by this default, you suddenly have ambiguity and an extra warning message about indistinguishability. I could possibly address this by checking if multiple entries get selected by the link-defaults fixer, and then if exactly one of them is already exported leaving them as-is. But I think the right fix is in the source, to give the second browsing-context dfn a |
Thanks for debugging, that will help if we run into this again. I created w3c/webappsec-mixed-content#47. Let's close this. |
This doesn't seem right to me. We shouldn't need to add Bikeshed dfn contract things to explicitly non-exported terms... we should be free to use dfn internally without worrying about that. |
Okay, so what you want is something stronger than "not exported", which is intended to be overrideable when desired, but rather "this definition must never be referenced by anyone outside of this spec", and you want this to be triggerable while still using |
Well, I guess, but what I really want is for that to be the default, so that we don't have to use anything Bikeshed-specific in a non-Bikeshed-doc's non-exported From that perspective, I think the fix you described
sounds pretty good. The way I would phrase it is, first consider exported definitions, and see if that satisfies the request to set a default. If you then need to fall back to non-exported definitions, OK, but now you're in dangerous territory. |
I tried regenerating longtasks on bikeshed and found that there are a couple of conflicting dfns:
for:/
vsfor:agent
). But given that there had been a singleevent loop
definition for a long time and many specs use it, I would encourage rethinking the ambiguity introduced here.The text was updated successfully, but these errors were encountered: