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

argumentdef can no longer define a variable (>= 5.0.0) #3012

Open
kainino0x opened this issue Jan 21, 2025 · 2 comments
Open

argumentdef can no longer define a variable (>= 5.0.0) #3012

kainino0x opened this issue Jan 21, 2025 · 2 comments

Comments

@kainino0x
Copy link
Contributor

In WebGPU we use this pattern to define a variable and an argumentdef entry at the same time:

<pre class=argumentdef for="GPU/requestAdapter(options)">
    |options|: Criteria used to select the adapter.
</pre>

This doesn't work anymore with Bikeshed 5.0.0:

LINE 2271: Can't find the '|options|' argument of method 'GPU/requestAdapter(options)' in the argumentdef block.

Should Bikeshed support this or should we find an alternate pattern for WebGPU? (I like argumentdef because it shows optional/nullable, but otherwise would be perfectly happy to use <dl dfn-type=argument>.)

@tabatkins
Copy link
Collaborator

Ah, that looks like an unintentional regression. I can run the parser over those bits.

Tho, what is the value of marking that as a var? At least in the example you provided here, it's not used in the argumentdef block, so it'll just be a "global" variable. (And if I ever add some auto-detection of var bounds when there's no algorithm attribute, it'll become an error since it's a variable that's never referenced a second time.)

@kainino0x
Copy link
Contributor Author

kainino0x commented Jan 22, 2025

It's kind of awkwardly displayed but it's used in the next block (the red one below the green one). It's also awkward because it's not possible to click on a var that's also a dfn, but once you find one of the other usages, it's possible to highlight them.

https://gpuweb.github.io/gpuweb/#dom-gpu-requestadapter

Image

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