Skip to content

Put generated code in target namespace - #329

Merged
virtuald merged 2 commits into
mainfrom
use-better-ns
Aug 30, 2026
Merged

Put generated code in target namespace#329
virtuald merged 2 commits into
mainfrom
use-better-ns

Conversation

@virtuald

@virtuald virtuald commented Aug 27, 2026

Copy link
Copy Markdown
Member

🤖 sez:

This branch scopes generated pybind11 helpers to their declaration namespaces, placing reusable
trampolines and template binders under target::semiwrap_generated and translation-unit-local helpers
in target-scoped anonymous namespaces while preserving initialization order and behavior. It also
removes generated binding metadata in favor of optional TemplateData.namespace overrides, restores
incremental generation, and adds inline_code_namespace inference/overrides so header-level inline code
executes in the correct target namespace.

This would make #323 largely irrelevant -- which is good because there was a compilation penalty there.

@virtuald

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 914f07de2e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/semiwrap/autowrap/cxxparser.py
@virtuald

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 8755000b01

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@virtuald
virtuald force-pushed the use-better-ns branch 2 times, most recently from fc11fa8 to 812e7f1 Compare August 29, 2026 05:22
@virtuald
virtuald merged commit 8c14fe9 into main Aug 30, 2026
28 checks passed
@virtuald
virtuald deleted the use-better-ns branch August 30, 2026 20:20
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