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

Extract all definitions from a spec into an anchors.bsdata file #2006

Open
kainino0x opened this issue Mar 31, 2021 · 0 comments
Open

Extract all definitions from a spec into an anchors.bsdata file #2006

kainino0x opened this issue Mar 31, 2021 · 0 comments

Comments

@kainino0x
Copy link
Contributor

WebGPU needs cross-links between multiple documents in the same repository (the WebGPU spec, the shading language spec WGSL, and I'd also like to be able to write our explainer in bikeshed to use cross-links to those two specs).

These specs aren't published so they're not in the global database yet - but it would also be nice if we could e.g. ref a term from WebGPU in the same commit where it's defined in WGSL.

One way to solve this would be with a build step that generates anchors.bsdata from a spec. Then for a full build we could do something like:

  • build wgsl/index.bs, ignoring link errors, and generating wgsl/index.anchors.bsdata
  • cp wgsl/index.anchors.bsdata spec/anchors.bsdata
  • build spec/index.bs, generating spec/index.anchors.bsdata
  • cp spec/index.anchors.bsdata wgsl/anchors.bsdata
  • rebuild wgsl/index.bs without ignoring link errors
  • cat spec/index.anchors.bsdata wgsl/index.anchors.bsdata > explainer/anchors.bsdata
  • build explainer/index.bs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants