Skip to content

[asl reference] replace console splicing by generated console macros - #1919

Open
Roman-Manevich wants to merge 4 commits into
masterfrom
asl-reference-console-macros
Open

[asl reference] replace console splicing by generated console macros#1919
Roman-Manevich wants to merge 4 commits into
masterfrom
asl-reference-console-macros

Conversation

@Roman-Manevich

@Roman-Manevich Roman-Manevich commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Previously, console output was spliced directly into .tex files by manually running doclint.py -cm. Changes to referenced ASL tests could therefore leave the documented output stale. This change generates console output automatically as part of the document build.

Replace inline generated console output with \RenderConsoleFor:

  • The makefile now regenerates console output automatically during PDF and HTML builds.
  • Added HeVeA-compatible output files.
  • Migrated existing console examples.
  • Fixed bug with multiline \ASLListing spellchecking.
  • Removed obsolete extended-macro code.
  • Fixed HTML ASL Reference builds by using the correct dune build-tree path for aslref. Previous attempts to build aslref defaulted to a path that might not exist. asllib/doc/Makefile now builds aslref automatically.

@Roman-Manevich
Roman-Manevich requested a review from hrutvik July 15, 2026 22:51
@Roman-Manevich
Roman-Manevich marked this pull request as ready for review July 15, 2026 22:52
Comment thread asllib/doc/doclint.py
Comment thread asllib/doc/Makefile
@@ -1,8 +1,10 @@
ASLREF=../../_build/install/default/bin/aslref
ASLREF=../../_build/default/asllib/aslref.exe

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could something like dune show location aslref work here instead?

@Roman-Manevich Roman-Manevich Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

dune show location aslref points to public install path (./../_build/install/default/bin/aslref), but we need the path created by the makefile rule for $(ASLREF). I don't know how to make it point to the right path.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

How about dune show location ../aslref.exe?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That returns _build/default/asllib/aslref.exe

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not sure I understand - that can be prefixed by ../../ to get the right result can't it?

Comment thread asllib/doc/Makefile
Comment thread asllib/doc/ASLmacros.tex
Comment thread asllib/doc/ASLmacros.tex Outdated
Comment thread asllib/doc/extended_macros.py Outdated
@Roman-Manevich
Roman-Manevich force-pushed the asl-reference-console-macros branch from 47f22df to 0425492 Compare July 22, 2026 00:03
@Roman-Manevich
Roman-Manevich requested a review from hrutvik July 22, 2026 00:03
@Roman-Manevich
Roman-Manevich force-pushed the asl-reference-console-macros branch from 0425492 to 182bfa2 Compare July 22, 2026 00:38
Comment thread asllib/doc/Makefile
BIBTEX=bibtex

GENERATED_MACROS_TEX=generated_macros.tex
# Empty file marking successful generation of every file in generated_console_output/.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm a bit surprised by this - is a .PHONY target in the Makefile not sufficient to model this?

@Roman-Manevich Roman-Manevich Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The command generates one file per \RenderConsoleFor macro invocation. There are currently 27 of those files (HeVeA needs those files seprately). A .PHONY target would regenerate them and rebuild the document every time. The stamp gives you incremental builds.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Was this comment supposed to be on the other thread?

Comment thread asllib/doc/extended_macros.py Outdated
@Roman-Manevich
Roman-Manevich force-pushed the asl-reference-console-macros branch from 182bfa2 to 1e026c0 Compare August 4, 2026 11:18
@Roman-Manevich
Roman-Manevich requested a review from hrutvik August 4, 2026 11:19
@Roman-Manevich Roman-Manevich self-assigned this Aug 4, 2026
@Roman-Manevich
Roman-Manevich requested a review from maranget August 4, 2026 11:21

@HadrienRenaud HadrienRenaud left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks ok to me.

Can we document what was the problem with the previous build system in the PR please?

I wanted to try and put as much things into make, but it doesn't seem possible because we don't know the command line arguments. Makes you want to add some metadata to your ASL test files...

I did not check the .tex files.

Comment thread asllib/doc/Makefile
Comment thread asllib/doc/extended_macros.py Outdated
Comment thread asllib/doc/Makefile Outdated
@Roman-Manevich
Roman-Manevich force-pushed the asl-reference-console-macros branch from 1e026c0 to 461d0ba Compare August 4, 2026 22:09
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.

3 participants