Respec: Warn when self-citing

Created on 13 Dec 2018  ·  13Comments  ·  Source: w3c/respec

Important info

  • URL to affected spec:
  • ReSpec version: develop
  • [x] I did a "hard refresh", but it's still busted.

Description of problem

What happened (e.g., it crashed)?:

USVString links to http://localhost:8080/tests/spec/core/webidl.html#idl-USVString when locally opened.

But what I was expecting?:

It should always link to https://heycam.github.io/webidl/#idl-USVString.

CCing @sidvishnoi, any idea why? AFAIK this has been broken for a while, not sure since when.

All 13 comments

@saschanaz We never added support for xref linking in IDL blocks. Will check in more depth after exam tomorrow.
Update: it's not related to xref. 🤦‍♂️

I checked it and it seems to be broken between v23.4.0 and v23.5.0. But I can't seem to find where and how exactly it broke 😞
(try using this for quick checks: https://unpkg.com/[email protected]/builds/respec-w3c-common.js)

This commit 9604ca8ca1486996b1c21d2a7cbe24ac641b43a1 looks suspicious as it's the only data-cite related one, but not sure yet.

This commit 9604ca8 looks suspicious as it's the only data-cite related one, but not sure yet.

No. it's not it. I reverted its changes but no effect.

Can you confirm about breakage in 23.4.0 and 23.5.0?

unpkg currently gives me HTTP 503 so not yet 😅

Okay, it now works and I can confirm cross-reference works correctly in 23.4.0.

TIL we have two modules that process [data-cite]: data-cite and link-to-dfn. Why?

I got the situation.

  1. https://github.com/w3c/respec/commit/9604ca8ca1486996b1c21d2a7cbe24ac641b43a1 prevented self-citing by comparing conf.shortName with data-cite
  2. Our testset's conf.shortName is webidl
  3. ReSpec thinks we are self-citing, so it links to the localhost rather than Web IDL specification!

IMO we should warn in this case rather than silently self-cite. What do you think, @marcoscaceres?

Sounds good.

Can I take this up? As far I as I can tell, we need to implement a warning when conf.shortname === key in core/data-cite ?
Also, a quick reference to the html file involving USVString would be great. Its tests/spec/core/webidl.html if I am right.

Yes, AFAIK no one is working on this.

As far I as I can tell, we need to implement a warning when conf.shortname === key in core/data-cite ?

Right, though I have a concern: What if conf.shortName is intentionally webidl? Currently core/webidl adds data-cite="WEBIDL#..." so it will always generate a warning, which sounds somewhat bad.

Do the warnings show up in the page and not just in the console? Still haven't seen one.
I guess I will wait until this self citing reason becomes more clear.

Update: I looked up the warnings, I think we should do a console.warn instead of showInlineWarning

Can we do this in data-cite:

  1. Lookup and link to documentation whether or not conf.shortname == key . If conf.shortname == key and lookup fails (for a random conf name), disable linking as done in https://github.com/w3c/respec/commit/9604ca8ca1486996b1c21d2a7cbe24ac641b43a1
  2. If conf.shortname == key issue a warning stating self citing is deprecated and the author should href instead.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

sidvishnoi picture sidvishnoi  ·  4Comments

deniak picture deniak  ·  5Comments

noamr picture noamr  ·  3Comments

saschanaz picture saschanaz  ·  6Comments

saschanaz picture saschanaz  ·  6Comments