Skip to content

[FEATURE] Give DirectiveNode logger info, migrate logging directives - #1383

Merged
jaapio merged 2 commits into
mainfrom
task/directive-logger-info
Sep 4, 2026
Merged

[FEATURE] Give DirectiveNode logger info, migrate logging directives#1383
jaapio merged 2 commits into
mainfrom
task/directive-logger-info

Conversation

@linawolf

@linawolf linawolf commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

[FEATURE] Give DirectiveNode logger info, migrate logging directives

Part of the #1373 directive migration: TestLoggerDirective,
SectionauthorDirective, ConfigurationBlockDirective, and
TabsDirective/TabDirective couldn't move to the #[Directive] model
because they need live parser access to log a warning with file/line
context, which createNode() doesn't have -- one of the blockers found
in #1378. DirectiveNode now carries that context, captured once its
content is fully parsed (matching what the old dispatch would have
seen -- captured earlier gave a wrong line number), removing the
blocker for this class of directive.

TabsDirective and TabDirective are migrated together: migrating
TabDirective alone previously broke tabs_html, since TabsDirective
inspects its children's concrete type and only resolves correctly
once both are on the compile-time model together.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01PP4LkejR5PSubbhNmF4RkT
Signed-off-by: lina.wolf

@linawolf
linawolf force-pushed the task/directive-logger-info branch from fd037ad to 471caa5 Compare September 3, 2026 14:47

@jaapio jaapio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we create an object for the logger info? I'm not sure what is in there. The filename and location? What else?

@linawolf

linawolf commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@jaapio done

lina.wolf and others added 2 commits September 4, 2026 16:54
Part of the #1373 directive migration: TestLoggerDirective,
SectionauthorDirective, ConfigurationBlockDirective, and
TabsDirective/TabDirective couldn't move to the #[Directive] model
because they need live parser access to log a warning with file/line
context, which createNode() doesn't have -- one of the blockers found
in #1378. DirectiveNode now carries that context, captured once its
content is fully parsed (matching what the old dispatch would have
seen -- captured earlier gave a wrong line number), removing the
blocker for this class of directive.

TabsDirective and TabDirective are migrated together: migrating
TabDirective alone previously broke tabs_html, since TabsDirective
inspects its children's concrete type and only resolves correctly
once both are on the compile-time model together.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PP4LkejR5PSubbhNmF4RkT
Signed-off-by: lina.wolf
A directive's structure is fixed (file, line, current line) but was
still passed around as a loosely-typed array. A dedicated object
makes that structure explicit and self-documenting.

Signed-off-by: lina.wolf
Assisted-by: Claude Sonnet 5 <noreply@anthropic.com>
@jaapio
jaapio force-pushed the task/directive-logger-info branch from df09251 to 275bf39 Compare September 4, 2026 14:54
@jaapio
jaapio enabled auto-merge September 4, 2026 14:54
@jaapio

jaapio commented Sep 4, 2026

Copy link
Copy Markdown
Member

Thanks this is nice!

@jaapio
jaapio merged commit 4611b8a into main Sep 4, 2026
58 checks passed
@jaapio
jaapio deleted the task/directive-logger-info branch September 4, 2026 14:58
linawolf pushed a commit that referenced this pull request Sep 5, 2026
Continues the #1373 migration now that #1383 landed. Migrates the
directives that don't hit #1378's known ordering hazards -- Card
Group/Grid, Accordion, Table, LaTeXMain.

Card, AccordionItem, CardHeader/Image/Footer, and ListTable turned
out to be blocked by two ordering hazards #1378 didn't cover; filed
as a comment there rather than migrated.

Stacked on #1388: this batch needed a directive's `:class:` option
applied generically the way the old dispatch's postProcessNode()
always did, which #1388 fixes underneath this branch.

Signed-off-by: linawolf
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PP4LkejR5PSubbhNmF4RkT
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