Skip to content

Fix Compilation error in MessageStore.h#260

Closed
Karthick-Somasundaresan wants to merge 1 commit into
R4_4from
fix/compilation_error
Closed

Fix Compilation error in MessageStore.h#260
Karthick-Somasundaresan wants to merge 1 commit into
R4_4from
fix/compilation_error

Conversation

@Karthick-Somasundaresan
Copy link
Copy Markdown
Contributor

Probable fix for compilation error encountered during IMessageControl.h
Error message:
MessageStore.h(56): parse error: can't insert namespace 'WPEFramework' into non-namespace block 'Metadata'

Probable fix for compilation error encountered during IMessageControl.h
MessageStore.h(56): parse error: can't insert namespace 'WPEFramework'
into non-namespace block 'Metadata'
@github-actions
Copy link
Copy Markdown

LuaGenerator Results

View Results

No changes detected.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a CppParser issue where parser state (especially the current namespace/class block and pending annotation flags) leaked across file boundaries when processing translation units that span multiple files via #include. This caused parse errors like "can't insert namespace 'WPEFramework' into non-namespace block 'Metadata'" in MessageStore.h. The fix injects a synthetic @GLOBAL token at every @FILE: boundary and adds a handler that resets the parse context to the global namespace and clears all pending annotation flags.

Changes:

  • Emit a @GLOBAL marker token alongside each @FILE: marker during preprocessing.
  • Add a parser branch for @GLOBAL that resets current_block to [global_namespace] and clears all pending state (omit/stub/json/event/template/etc.) before parsing continues in the new file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copy link
Copy Markdown
Contributor

@sebaszm sebaszm left a comment

Choose a reason for hiding this comment

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

While this seems good direction, proper stubgen:include has been implemented in the meantime (inserts in-place), so this no longer needed and in fact could break parsing in certain conditions.

@github-actions github-actions Bot locked and limited conversation to collaborators Jun 2, 2026
@Karthick-Somasundaresan Karthick-Somasundaresan deleted the fix/compilation_error branch June 2, 2026 09:37
@Karthick-Somasundaresan
Copy link
Copy Markdown
Contributor Author

A better fix was found and updated.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants