Skip to content

Implement on-demand source processing#31

Draft
Vladyslav-Kuksiuk wants to merge 5 commits into
improve-error-messagesfrom
make-fragmentation-on-embedding
Draft

Implement on-demand source processing#31
Vladyslav-Kuksiuk wants to merge 5 commits into
improve-error-messagesfrom
make-fragmentation-on-embedding

Conversation

@Vladyslav-Kuksiuk
Copy link
Copy Markdown
Collaborator

[WIP]

This PR changes the source-processing flow from eager preprocessing to on-demand source resolution.

Previous flow:

  1. All source code files were scanned up front.
  2. Each source file was split into fragments, cleaned from fragment marker comments, normalized, and written into build/fragments.
  3. Target documents were scanned and embedded snippets were read from those prepared fragment files.

New flow:

  1. Target documents are scanned first.
  2. Source files are processed only when they are referenced by an <embed-code> instruction.
  3. Named fragments are resolved directly from source and cached in memory per source file.

Additional cleanup:

  • Removed code-includes / code-excludes configuration, as it doesn't make sense.

@Vladyslav-Kuksiuk Vladyslav-Kuksiuk self-assigned this May 13, 2026
@Vladyslav-Kuksiuk Vladyslav-Kuksiuk changed the title Make fragmentation in-memory Make fragmentation in demand May 13, 2026
@Vladyslav-Kuksiuk Vladyslav-Kuksiuk changed the title Make fragmentation in demand Make fragmentation on demand May 13, 2026
@Vladyslav-Kuksiuk Vladyslav-Kuksiuk changed the title Make fragmentation on demand Implement on-demand source processing May 13, 2026
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.

1 participant