Skip to content

api: draft build-mode API#541

Closed
timbray wants to merge 1 commit into
mainfrom
dfa-api-draft
Closed

api: draft build-mode API#541
timbray wants to merge 1 commit into
mainfrom
dfa-api-draft

Conversation

@timbray

@timbray timbray commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Open for comments, please pile on.

Signed-off-by: Tim Bray <tbray@textuality.com>
@timbray

timbray commented Jun 14, 2026

Copy link
Copy Markdown
Owner Author

Hey @jsmorph you still around? Check the changes in this draft, also #530. I've got a much bigger PR cooking that will actually implement this, including the DFA conversion. Turns out this is going to change the requirements for the LiveStorage type because unless I'm missing something it's gong to have to remember the BuildMode for each pattern and restore them in the same order they were applied. Which is enough of a semantic change that maybe we need a new OrderedLiveStorage type or suchlike. Anyhow, would appreciate your thoughts on the matter before I dive in and start changing things.

@timbray

timbray commented Jun 14, 2026

Copy link
Copy Markdown
Owner Author

Further thoughts. I think we do need a LivePatterns2 class that stores either pairs of patterns/BuildMode or something logically equivalent then a Pruner2 which differs only in using a LivePatterns2. Then SetMatcherBuildMode() will check whether the current Matcher is either a coreMatcher or Pruner2 and refuse to proceed if otherwise.

@timbray

timbray commented Jun 15, 2026

Copy link
Copy Markdown
Owner Author

Hah, cancel the concern. The WithPatternStorage() option is not implemented, and the docs say so. So we can just change the implementation.

@timbray

timbray commented Jun 16, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #543

@timbray timbray closed this Jun 16, 2026
@timbray timbray deleted the dfa-api-draft branch June 16, 2026 02:03
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