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

Document (sometimes) required metadata for implementation report and CR deadline #2765

Closed
wants to merge 3 commits into from

Conversation

svgeesus
Copy link
Contributor

This PR would fix #2644 and #2645. Links to pubrules in cases where this is required.

Contributing requires the html to be generated. This has a bunch of fatal errors, which I didn't introduce, so I used -f.

chris@SuperNomad:/mnt/c/Users/chris/Documents/GitHub/mybikeshed/docs$ bikeshed -f spec
FATAL ERROR: Found unmatched text macro [LOGO]. Correct the macro, or escape it with a leading backslash.
FATAL ERROR: Found unmatched text macro [WORKSTATUS]. Correct the macro, or escape it with a leading backslash.
FATAL ERROR: Found unmatched text macro [FOO]. Correct the macro, or escape it with a leading backslash.
FATAL ERROR: Found unmatched text macro [BAZ]. Correct the macro, or escape it with a leading backslash.
FATAL ERROR: Found unmatched text macro [H1]. Correct the macro, or escape it with a leading backslash.
FATAL ERROR: Found unmatched text macro [LATEST]. Correct the macro, or escape it with a leading backslash.
FATAL ERROR: Found unmatched text macro [ABSTRACTATTR]. Correct the macro, or escape it with a leading backslash.
FATAL ERROR: Found unmatched text macro [DEADLINE]. Correct the macro, or escape it with a leading backslash.
LINE 4114: Dfn has no linking text:
<dfn bs-line-number="4114"><code bs-line-number="4114" bs-autolink-syntax="``" bs-opaque=""></code></dfn>
LINE 4117: Dfn has no linking text:
<dfn bs-line-number="4117"><code bs-line-number="4117" bs-autolink-syntax="`&lt;p bs-line-number=-1&gt;Bikeshed is a spec-generating tool that takes in lightly-decorated Markdown and spits out a full spec, with cross-spec autolinking, automatic generation of indexes/ToC/etc, and many other features.&lt;/p&gt;
`" bs-opaque=""></code></dfn>
LINE 4120: Multiple elements have the same ID 'macro-13-january-2024'.
Deduping, but this ID may not be stable across revisions.
LINE 4120: Multiple local 'dfn' <dfn>s for 'macro' have the same linking text '13 january 2024'.
LINE ~4124: No 'dfn' refs found for '[date]'.
[=[DATE]=]
 ✔  Successfully generated, but fatal errors were suppressed

@svgeesus
Copy link
Contributor Author

@tabatkins could you review this PR please? Closes a couple of issues.

Copy link

@ferdnyc ferdnyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, the HTML generation seems to have drastically affected how macros are documented, since many of them ended up getting replaced when they shouldn't be (or, aren't intended to be).

Comment on lines -6048 to +6056
<p><dfn class="dfn-paneled" data-dfn-for="macro" data-dfn-type="dfn" data-export id="macro-title"><code>[TITLE]</code></dfn> gives the spec’s full title, as extracted from either the H1 or the spec metadata.</p>
<p><dfn data-dfn-for="macro" data-dfn-type="dfn" data-export id="macro-bikeshed-documentation"><code>Bikeshed Documentation</code><a class="self-link" href="#macro-bikeshed-documentation"></a></dfn> gives the spec’s full title, as extracted from either the H1 or the spec metadata.</p>
<li data-md>
<p><dfn class="dfn-paneled" data-dfn-for="macro" data-dfn-type="dfn" data-export id="macro-h1"><code>[H1]</code></dfn> gives the desired document heading, in case the in-page title is supposed to be different from the <code>&lt;title></code> element value.</p>
<p><dfn data-dfn-for="macro" data-dfn-type="dfn" data-export id="macro-h1"><code>[H1]</code><a class="self-link" href="#macro-h1"></a></dfn> gives the desired document heading, in case the in-page title is supposed to be different from the <code>&lt;title></code> element value.</p>
<li data-md>
<p><dfn class="dfn-paneled" data-dfn-for="macro" data-dfn-type="dfn" data-export id="macro-shortname"><code>[SHORTNAME]</code></dfn> gives the document’s shortname, like "css-cascade".</p>
<p><dfn data-dfn-for="macro" data-dfn-type="dfn" data-export id="macro-bikeshed"><code>bikeshed</code><a class="self-link" href="#macro-bikeshed"></a></dfn> gives the document’s shortname, like "css-cascade".</p>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The HTML-generation process seems to have gone very wrong here — the newly-generated HTML is actually replacing the macros, instead of documenting them. It seems strings surrounded by [ and ] are getting replaced even when inside <code>, where previously they were left alone.

Comment on lines 4434 to +4436
<p>With the above code, you can use <code>[FOO]</code> and <code>[BAZ]</code> macros inside the include file,
and they’ll be substituted with "bar" and "qux qux qux", respectively.
(Remember that you can mark text macros as optional by appending a <code>?</code>, like <code>[FOO?]</code>,
(Remember that you can mark text macros as optional by appending a <code>?</code>, like <code></code>,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same problem here, with (ostensible) macros now being replaced inside literals — though, interestingly, [FOO] and [BAZ] above still weren't replaced.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even more confounding, there's nothing different about those two uses. The source for this paragraph, in index.bs, is:

With the above code, you can use `[FOO]` and `[BAZ]` macros inside the include file,
and they'll be substituted with "bar" and "qux qux qux", respectively.
(Remember that you can mark text macros as optional by appending a `?`, like `[FOO?]`,
in which case they'll be replaced with the empty string if Bikeshed can't find a definition.)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the difference is that FOO and BAZ are undefined macros, whereas all of the ones that were replaced were defined. (Even if, as in the case of FOO?, they were defined to be the empty string.)

Comment on lines -3710 to +3714
<p><dfn class="dfn-paneled" data-dfn-for="metadata" data-dfn-type="dfn" data-export id="metadata-local-boilerplate">Local Boilerplate</dfn> tells Bikeshed which boilerplate include files to look for relative to the specification (as opposed to inside the Bikeshed source). Its value is a comma-separated list of include file basename and <a data-link-type="dfn" href="#boolish" id="ref-for-boolish⑨">boolish</a> value, e.g. <code>Local Boilerplate: footer yes</code> to look for <code>footer.include</code> and <code>footer-[STATUS].include</code> next to the specification. This also works for default includes that aren’t quite boilerplate like <a href="#default-metadata">defaults.include</a>, <a href="#computed-metadata">computed-metadata.include</a>, and <a href="#echidna-hooks">bs-extensions.include</a>.</p>
<p><dfn class="dfn-paneled" data-dfn-for="metadata" data-dfn-type="dfn" data-export id="metadata-local-boilerplate">Local Boilerplate</dfn> tells Bikeshed which boilerplate include files to look for relative to the specification (as opposed to inside the Bikeshed source). Its value is a comma-separated list of include file basename and <a data-link-type="dfn" href="#boolish" id="ref-for-boolish⑨">boolish</a> value, e.g. <code>Local Boilerplate: footer yes</code> to look for <code>footer.include</code> and <code>footer-LS.include</code> next to the specification. This also works for default includes that aren’t quite boilerplate like <a href="#default-metadata">defaults.include</a>, <a href="#computed-metadata">computed-metadata.include</a>, and <a href="#echidna-hooks">bs-extensions.include</a>.</p>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another undesirable macro-inside-code-element replacement.

Comment on lines -3664 to +3668
and it populates the <code>[REPOSITORY]</code> and <code>[REPOSITORYURL]</code> text macros accordingly.
and it populates the <code>speced/bikeshed</code> and <code>https://github.com/speced/bikeshed</code> text macros accordingly.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here again.

@ferdnyc
Copy link

ferdnyc commented Jan 25, 2024

I wonder if #2721 is responsible for the change in behavior here?

@ferdnyc
Copy link

ferdnyc commented Jan 25, 2024

I have a fix for the macro-reference issues in #2773 that will allow the docs to be regenerated correctly, and without -f. Once that's merged you should be able to resolve any conflicts that arise in docs/index.bs, then run bikeshed in that directory to cleanly update the HTML version.

@tabatkins
Copy link
Collaborator

Uh, none of these problems are reproduced in the current version of Bikeshed. I have to assume that Chris's version is substantially behind?

@tabatkins tabatkins closed this in d5dfd1a Jan 25, 2024
@tabatkins
Copy link
Collaborator

Okay, committed the index.bs changes (and regened index.html myself). Thanks, @svgeesus !

@svgeesus svgeesus deleted the required-metadata branch January 29, 2024 18:23
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

Successfully merging this pull request may close these issues.

CR requires Deadline now?
3 participants