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

Add support for codified VUs #2081

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add support for codified VUs #2081

wants to merge 1 commit into from

Conversation

ShabbyX
Copy link
Contributor

@ShabbyX ShabbyX commented Mar 16, 2023

The following is implemented in this change:

  • Codified VU parsing
  • Codified VU reformatting in source (reflow.py)
  • Codified VU formatting for build either in code or english
  • Codified VU type checking
  • Codified VU customization for build with/without extensions/versions
    • Removes the need for ifdef
  • Unit tests

@ShabbyX
Copy link
Contributor Author

ShabbyX commented Mar 16, 2023

One limitation I couldn't work around is the inability to get source location information during asciidoctor AST traversal. I backported the relevant feature to asciidoctor v2.0 here asciidoctor/asciidoctor#4417, and when landed and a new version released, needs an update in the docker image.

In the meantime, I've made sure to output enough information so the offending VU (that's failing build) can be identified.

@ShabbyX ShabbyX force-pushed the codified-vus branch 6 times, most recently from 652a0a9 to 1090955 Compare March 20, 2023 20:19
@ShabbyX
Copy link
Contributor Author

ShabbyX commented Mar 21, 2023

One limitation I couldn't work around is the inability to get source location information during asciidoctor AST traversal. I backported the relevant feature to asciidoctor v2.0 here asciidoctor/asciidoctor#4417, and when landed and a new version released, needs an update in the docker image.

In the meantime, I've made sure to output enough information so the offending VU (that's failing build) can be identified.

Found a solution for this, so source location information is now present too: https://github.com/asciidoctor/asciidoctor-extensions-lab/blob/main/lib/enable-sourcemap-preprocessor.rb

I did notice sometimes it's off by a few lines though 🤔

I also reworked this to use Registry instead of EntityDatabase. That makes it work better with autogen in VVL which relies on Registry from Vulkan-Headers and doesn't know about EntityDatabase. At the same time, this fixes some lack-of-info issues that made some type-checking impossible.

@ShabbyX ShabbyX force-pushed the codified-vus branch 5 times, most recently from 8e8dcc1 to 3a85a6b Compare March 24, 2023 21:04
@ShabbyX
Copy link
Contributor Author

ShabbyX commented Mar 24, 2023

Fixed some bugs + added comment support

@oddhack, I want to disable two-line headers (that look like this:

This is a header
================

asciidoctor's control for that is Asciidoctor::Compliance.underline_style_section_titles). Do we use that anywhere I didn't find?

It turns out that feature makes line number tracking messed up in asciidoctor.

@oddhack
Copy link
Contributor

oddhack commented Mar 25, 2023

asciidoctor's control for that is Asciidoctor::Compliance.underline_style_section_titles). Do we use that anywhere I didn't find?

The style guide says to use only the single-line '== Title' form although I do not know that the other form is never used anywhere. Easiest way to find out is generate HTML with and without this control and compare them, probably.

The following is implemented in this change:

- Codified VU parsing
- Codified VU reformatting in source (reflow.py)
- Codified VU formatting for build either in code or english
- Codified VU type checking
- Codified VU customization for build with/without extensions/versions
  * Removes the need for ifdef
- Unit tests
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.

2 participants