Skip to content

Conversation

@coder7695
Copy link
Contributor

The code generation fuzzer target helped identify issue #8793 in TsCodeGenerator.

The PR solves the TSCodeGenerator issue by using parser_.empty_namespace_ in the GenerateEntry() method of idl_gen_ts.cpp.
The destructor of Parser class handles object deletion and also handle empty_namespace deletion which is added to the namespaces_ collection.

  ~Parser() {
    for (auto it = namespaces_.begin(); it != namespaces_.end(); ++it) {
      delete *it;
    }
  }

The PR also adds code generation fuzzer target to fuzz code generation for various languages. Also implements TODO items in the parser fuzzer.

@github-actions github-actions bot added c++ codegen Involving generating code from schema javascript typescript labels Nov 19, 2025
bjornharrtell
bjornharrtell previously approved these changes Nov 25, 2025
Copy link
Collaborator

@bjornharrtell bjornharrtell left a comment

Choose a reason for hiding this comment

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

Seems sensible to me. @aardappel consider for merge?

@bjornharrtell bjornharrtell enabled auto-merge (squash) November 27, 2025 15:49
@bjornharrtell bjornharrtell merged commit 2b107e2 into google:master Nov 27, 2025
50 checks passed
@jtdavis777 jtdavis777 linked an issue Dec 3, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ codegen Involving generating code from schema javascript typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TsCodeGenerator crashes when testing empty namespace

2 participants