speced / bikeshed

:bike: A preprocessor for anyone writing specifications that converts source files into actual specs.
https://speced.github.io/bikeshed
Creative Commons Zero v1.0 Universal
1.08k stars 199 forks source link

Discover obsolete biblio/anchors/link-defaults #1338

Open annevk opened 6 years ago

annevk commented 6 years ago

It would be nice to know when biblio/anchors/link-defaults entries have been obsoleted by upstream changes so they can be cleaned up. You can kinda test this by removing them and diffing the output, but that's not great.


tabatkins commented 6 years ago

Hm, yes, that would be great. I just occasionally rip out all the anchors/link-defaults from my specs and see what causes errors, and I agree it's not a very optimal solution.

This would also help guard against the practice I commonly see of just copy-pasting the entire chunk of metadata from the top of a previous spec, anchors and all.

tabatkins commented 6 years ago

Okay, obsolete biblio tracking is landed in 4d64f957, let me know how it works for you.

Every type of linking is a totally different workflow, so the rest will come separately. ^_^

annevk commented 6 years ago

I think I'm getting some false-positives: https://travis-ci.org/whatwg/fetch/builds/421417299. E.g., it reports HTTP-SEMANTICS which the text definitely uses. Perhaps there's a bug due to the alias feature?

tabatkins commented 6 years ago

Hm, probably. I was hoping that wouldn't be a concern. I'll take a look at Fetch.

tabatkins commented 6 years ago

@annevk Sorry for the delay, all the false positives from Fetch are fixed. (I was looking at the keys of the returned biblio entries, not the keys actually used to request a biblio entry. Aliases are implemented by just doing another search for what they're aliasing and returning that result, thus all your local aliases didn't show up as being used.)