tc39 / ecma262

Status, process, and documents for ECMA-262
https://tc39.es/ecma262/
Other
14.85k stars 1.27k forks source link

Editorial: remove unused step IDs #3336

Closed michaelficarra closed 1 week ago

michaelficarra commented 1 month ago

Ran this quick and dirty script to find them:

ack '\[id="([^"]+)"\]' spec.html --output='$1' | xargs -I '{}' bash -c "echo -n '{}: '; grep '{}' spec.html | wc -l"

Maybe this is something we should enforce in ecmarkup? We're not going to intentionally expect another spec to refer to an individual step, right?

ljharb commented 1 month ago

Are we sure HTML or 402 isn’t using these?

michaelficarra commented 1 month ago

@ljharb We could check, but as I said above, we wouldn't want an integration of that kind anyway.

ljharb commented 1 month ago

Why wouldn't we? I'm pretty sure both HTML and Intl modify specific steps at times.

michaelficarra commented 1 month ago

We want all spec integrations to be done through an overridden AO which is specifically designed for that purpose, and whose invariants/constraints are inviolable, even by integrating specs.

ljharb commented 1 month ago

Then it seems like a good first step is to ensure those two specs don't reference any specific steps, and if they are, provide whatever mechanisms they need to avoid depending on steps?

michaelficarra commented 1 month ago

I've checked that the affected IDs in this PR are not referenced. Feel free to search for any cases of a downstream spec reaching into 262 AOs (other than defining Host AOs) and report them in the issue tracker.

bakkot commented 1 month ago

I don't see a reason to remove these, regardless of whether they're linked to.

michaelficarra commented 1 month ago

@bakkot Would you add them if they didn't exist? I don't understand why we would have them.

bakkot commented 1 month ago

I don't think "we wouldn't add this if it didn't already exist" is enough reason, on its own, to justify removing something. It's OK to leave things as they are in the absence of an affirmative reason to change them.

jmdyck commented 1 month ago

It's like oldids. We don't need them any more, but we keep them so that the published spec continues to support inbound links that use old fragment ids. (The link might be from another spec, or a blog, or a tweet, or just someone's bookmark.)

syg commented 3 weeks ago

I agree with @bakkot. I don't see a reason to remove these, since they add no reader burden.