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

Reffy is exporting non-exported terms? #1250

Closed
fantasai opened this issue Apr 6, 2023 · 3 comments
Closed

Reffy is exporting non-exported terms? #1250

fantasai opened this issue Apr 6, 2023 · 3 comments

Comments

@fantasai
Copy link

fantasai commented Apr 6, 2023

Using [=ascii case-insensitive=] should link over to Infra, but Bikeshed is reporting that it conflicts with WebCryptoAPI. However, I can't find any markup in the WebCryptoAPI spec that would indicate that their ascii case-insensitive DFN should be exported.

Can you fix Reffy so that only exported terms get exported, or explain why reffy thinks this DFN should be exported so that WebCryptoAPI can stop exporting it?

Thanks~

@tidoust
Copy link
Member

tidoust commented Apr 7, 2023

The /TR version of the WebCrypto API is old enough that it does not follow the usual dfn data model. Reffy considers that definitions in old specs are exported by default. That is useful in a number of other cases.

We are considering curating definitions (tracked in w3c/webref#789) but curation involves manual intervention and, for definitions, we need to find a balance between being up-to-date and producing results without ambiguity, as we cannot commit to maintaining patches on a daily basis.

Different specs do export definitions that are already defined elsewhere in practice, see e.g. w3c/webref#306 (comment) (not sure why WebCrypto does not appear in that list though). In other words, we're not yet at a point where we have a clean global namespace for definitions. That isn't an issue with Respec specs because authors need to be explicit about the list of specs to use for xref purpose. Bikeshed does not have such a mechanism.

I'll look into patching Reffy to make an exception for WebCrypto. Looking at references across specs, there are a number of references to WebCrypto that indeed need fixing:

There remain a few references to WebCrypto that seem correct:

@tidoust
Copy link
Member

tidoust commented Apr 7, 2023

Going a bit deeper into details, the problem is really the /TR version of the spec. The nightly version of the spec follows the right dfn data model and only export definitions that need to be.

In practice, the references to WebCrypto either are to concepts only defined in the nightly version ("generate a random UUID") or are made through explicit links (through <a data-cite="...">) and thus do not rely on xref data. In other words, I think that we can safely force the definitions in the /TR version of WebCrypto to be "non-exported".

tidoust added a commit that referenced this issue Apr 7, 2023
See discussion in #1250

The definitions are extracted as "exported" because the release version of the
spec does not follow the usual dfn data model, but this creates duplication
issues in Bikeshed specs.

Valid references to the WebCrypto API do not use the xref mechanism in any case
so marking the definitions as private should not have any consequences for
existing specs.
tidoust added a commit that referenced this issue Apr 7, 2023
See discussion in #1250

The definitions are extracted as "exported" because the release version of the
spec does not follow the usual dfn data model, but this creates duplication
issues in Bikeshed specs.

Valid references to the WebCrypto API do not use the xref mechanism in any case
so marking the definitions as private should not have any consequences for
existing specs.
@tidoust
Copy link
Member

tidoust commented Apr 13, 2023

Crawler was patched not to export definitions from the release version of the WebCrypto API. Most of the specs mentioned above that incorrectly linked to WebCrypto have been re-generated since last week and no longer link to WebCrypto as a result. I created pull requests to fix remaining specs: w3c/IndexedDB#401 and WICG/capability-delegation#35

@tidoust tidoust closed this as completed Apr 13, 2023
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