fix(chat): fallback to legacy parser if autoparser generation fails#124
Merged
Conversation
marksverdhei
added a commit
that referenced
this pull request
Jun 16, 2026
…125) PR #124 added an autoparser-failure fallback in common_chat_templates_apply_jinja() that calls common_chat_templates_apply_legacy(), but that static function is defined later in chat.cpp with no forward declaration, so the file fails to compile: error: 'common_chat_templates_apply_legacy' was not declared in this scope Add the forward declaration. The break reached ht because the full C++ build (build-cpu) is workflow_dispatch-only, so push CI did not catch it. Co-authored-by: marksverdhei <mark.sverdhei@gmail.com>
marksverdhei
added a commit
that referenced
this pull request
Jun 16, 2026
build-cpu's push trigger was branches:[master] only — an upstream leftover never retargeted to this fork's default branch (ht). So a merge to ht never re-ran the compile check on the branch itself. PR #124 landed a non-compiling commit on ht: build-cpu ran on its PR and failed every job, but ht has no branch protection so the red PR was merged, and nothing re-flagged the break on ht afterward (the red was only on the PR). Adding ht to push.branches gives the default branch the same compile-on-push coverage master already has, so a broken main is visible on the branch. (pull_request already covers PRs to ht. The stronger prevention — a ruleset requiring build-cpu before merge — is a repo-settings decision and is left to the maintainer, since ht intentionally runs without branch protection.) Co-authored-by: marksverdhei <mark.sverdhei@gmail.com>
marksverdhei
added a commit
that referenced
this pull request
Jun 18, 2026
…125) PR #124 added an autoparser-failure fallback in common_chat_templates_apply_jinja() that calls common_chat_templates_apply_legacy(), but that static function is defined later in chat.cpp with no forward declaration, so the file fails to compile: error: 'common_chat_templates_apply_legacy' was not declared in this scope Add the forward declaration. The break reached ht because the full C++ build (build-cpu) is workflow_dispatch-only, so push CI did not catch it. Co-authored-by: marksverdhei <mark.sverdhei@gmail.com>
marksverdhei
added a commit
that referenced
this pull request
Jun 18, 2026
build-cpu's push trigger was branches:[master] only — an upstream leftover never retargeted to this fork's default branch (ht). So a merge to ht never re-ran the compile check on the branch itself. PR #124 landed a non-compiling commit on ht: build-cpu ran on its PR and failed every job, but ht has no branch protection so the red PR was merged, and nothing re-flagged the break on ht afterward (the red was only on the PR). Adding ht to push.branches gives the default branch the same compile-on-push coverage master already has, so a broken main is visible on the branch. (pull_request already covers PRs to ht. The stronger prevention — a ruleset requiring build-cpu before merge — is a repo-settings decision and is left to the maintainer, since ht intentionally runs without branch protection.) Co-authored-by: marksverdhei <mark.sverdhei@gmail.com>
marksverdhei
added a commit
that referenced
this pull request
Jun 21, 2026
…125) PR #124 added an autoparser-failure fallback in common_chat_templates_apply_jinja() that calls common_chat_templates_apply_legacy(), but that static function is defined later in chat.cpp with no forward declaration, so the file fails to compile: error: 'common_chat_templates_apply_legacy' was not declared in this scope Add the forward declaration. The break reached ht because the full C++ build (build-cpu) is workflow_dispatch-only, so push CI did not catch it. Co-authored-by: marksverdhei <mark.sverdhei@gmail.com>
marksverdhei
added a commit
that referenced
this pull request
Jun 21, 2026
build-cpu's push trigger was branches:[master] only — an upstream leftover never retargeted to this fork's default branch (ht). So a merge to ht never re-ran the compile check on the branch itself. PR #124 landed a non-compiling commit on ht: build-cpu ran on its PR and failed every job, but ht has no branch protection so the red PR was merged, and nothing re-flagged the break on ht afterward (the red was only on the PR). Adding ht to push.branches gives the default branch the same compile-on-push coverage master already has, so a broken main is visible on the branch. (pull_request already covers PRs to ht. The stronger prevention — a ruleset requiring build-cpu before merge — is a repo-settings decision and is left to the maintainer, since ht intentionally runs without branch protection.) Co-authored-by: marksverdhei <mark.sverdhei@gmail.com>
marksverdhei
added a commit
that referenced
this pull request
Jun 27, 2026
…125) PR #124 added an autoparser-failure fallback in common_chat_templates_apply_jinja() that calls common_chat_templates_apply_legacy(), but that static function is defined later in chat.cpp with no forward declaration, so the file fails to compile: error: 'common_chat_templates_apply_legacy' was not declared in this scope Add the forward declaration. The break reached ht because the full C++ build (build-cpu) is workflow_dispatch-only, so push CI did not catch it. Co-authored-by: marksverdhei <mark.sverdhei@gmail.com>
marksverdhei
added a commit
that referenced
this pull request
Jun 27, 2026
build-cpu's push trigger was branches:[master] only — an upstream leftover never retargeted to this fork's default branch (ht). So a merge to ht never re-ran the compile check on the branch itself. PR #124 landed a non-compiling commit on ht: build-cpu ran on its PR and failed every job, but ht has no branch protection so the red PR was merged, and nothing re-flagged the break on ht afterward (the red was only on the PR). Adding ht to push.branches gives the default branch the same compile-on-push coverage master already has, so a broken main is visible on the branch. (pull_request already covers PRs to ht. The stronger prevention — a ruleset requiring build-cpu before merge — is a repo-settings decision and is left to the maintainer, since ht intentionally runs without branch protection.) Co-authored-by: marksverdhei <mark.sverdhei@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #120 (which had merge conflicts). Fixes #117.