Skip to content

feat(new)!: generate main.cc for bin and lib for library#1250

Merged
ken-matsui merged 1 commit intomainfrom
improve-new
Nov 25, 2025
Merged

feat(new)!: generate main.cc for bin and lib for library#1250
ken-matsui merged 1 commit intomainfrom
improve-new

Conversation

@ken-matsui
Copy link
Member

No description provided.

@chatgpt-codex-connector
Copy link

💡 Codex Review

cabin/src/Cmd/New.cc

Lines 67 to 69 in 20e9b9b

namespace {1} {{
void hello_world();
}} // namespace {1}

P1 Badge Hyphenated package names generate uncompilable library code

The new library template writes namespace {1} directly into the generated header/implementation and the implementation now includes that header. Package names validated by validatePackageName are allowed to contain dashes, so running cabin new --lib my-lib will emit namespace my-lib { ... }, which is ill‑formed C++ and causes the generated project to fail to compile. Previously the default lib.cc stub compiled even for hyphenated names because it didn’t reference the namespace; this change introduces a compile-time failure for a valid input.

ℹ️ 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".

@ken-matsui ken-matsui changed the title chore!(new): generate main.cc for bin and lib for library feat(new)!: generate main.cc for bin and lib for library Nov 24, 2025
@ken-matsui
Copy link
Member Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Delightful!

ℹ️ 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".

@ken-matsui ken-matsui enabled auto-merge (squash) November 25, 2025 01:57
@ken-matsui ken-matsui merged commit c3d3ffd into main Nov 25, 2025
26 checks passed
@ken-matsui ken-matsui deleted the improve-new branch November 25, 2025 02:24
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