Skip to content

fix(discover): map jinja and jinja2 in userconfig language table - #2568

Merged
DeusData merged 2 commits into
DeusData:mainfrom
Totopo27:fix/gh-2563-extra-extensions-jinja2
Oct 20, 2026
Merged

DeusData merged 2 commits into
DeusData:mainfrom
Totopo27:fix/gh-2563-extra-extensions-jinja2

Conversation

@Totopo27

@Totopo27 Totopo27 commented Oct 9, 2026 •

Copy link
Copy Markdown

What does this PR do?

Add jinja and jinja2 aliases to LANG_NAME_TABLE in src/discover/userconfig.c.

Resolves #2563.

Configuring "extra_extensions": {".html": "jinja2"} in .codebase-memory.json was previously ignored because lang_from_string() had no entry for Jinja2, returning CBM_LANG_COUNT even though CBM_LANG_JINJA2 and its grammar were present in the build.

Checklist

  • Every commit is signed off (git commit -s) — required, CI rejects unsigned commits (DCO, see CONTRIBUTING.md)
  • Tests pass locally (make -f Makefile.cbm test)
  • Lint passes (make -f Makefile.cbm lint-ci)
  • New behavior is covered by a test (reproduce-first for bug fixes)

Signed-off-by: Totopo27 <35828647+Totopo27@users.noreply.github.com>
@Totopo27
Totopo27 requested a review from DeusData as a code owner October 9, 2026 00:35
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Thanks for opening this — it has been seen, and it is queued.

This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence.

Current review status: working through a backlog. 0.9.1-rc.1 is out, so the release freeze that held reviews is over — but it left a large queue of open pull requests behind it, and we are reading through them oldest-first. The background is in discussion #1144.

What that means for this PR, concretely:

  • It will not be closed for inactivity. No stale bot touches pull requests here.
  • It may still sit a while before a human reads it. That is on us, not on you.
  • Older PRs are read first, so a recent one is not being skipped — it is behind a queue.

Things that will genuinely speed it up whenever review does happen:

  • Keep it rebased on main — the tree is moving quickly right now, and a conflicting branch cannot be reviewed as the diff you intended.
  • Get CI green, or say which failures you believe are pre-existing.
  • Keep the change to one claim. Bundled features and refactors get split before they get merged, which costs you a round trip.
  • Every commit needs a sign-off (git commit -s) — CI enforces DCO.

If this fixes a bug, a reproduction we can run is worth more than a description of the symptom.

Thanks for contributing, and sorry in advance for the wait.

@DeusData DeusData added bug Something isn't working parsing/quality Graph extraction bugs, false positives, missing edges labels Oct 19, 2026
@DeusData

Copy link
Copy Markdown
Owner

Thanks for the focused jinja/jinja2 configuration alias fix and the link to #2563. I have read the description; this is queued for review with the local test and lint results still marked incomplete.

@Totopo27

Copy link
Copy Markdown
Author

Updated the checklist in the PR description to reflect the passing test and lint runs. Thanks for queuing the review!

@DeusData
DeusData merged commit 8fafd8a into DeusData:main Oct 20, 2026
27 checks passed
@DeusData

Copy link
Copy Markdown
Owner

Thank you, @Totopo27! This is exactly the right fix: lang_from_string() had no name for the Jinja2 grammar that was already built in, so an extra_extensions mapping like {".html": "jinja2"} was silently dropped. We verified it end to end on the Flask repository and on the reproduction from #2563: with this change, mapped .html files are parsed with the Jinja2 grammar exactly like native .jinja2 files, the "jinja" alias lines up with the existing .jinja extension, and indexes without a config are unchanged. Thanks also for extending the existing userconfig test rather than adding a parallel one, and for updating the checklist. Merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working parsing/quality Graph extraction bugs, false positives, missing edges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

extra_extensions silently ignores jinja2 — Flask/Jinja .html templates cannot use the vendored Jinja2 grammar

2 participants