c-next 0.1.21 → 0.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c-next",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "A safer C for embedded systems development. Transpiles to clean, readable C.",
5
5
  "main": "src/index.ts",
6
6
  "bin": {
@@ -363,6 +363,17 @@ class Pipeline {
363
363
  // The preprocessor expands/removes #include directives, so we need the original
364
364
  const originalContent = readFileSync(file.path, "utf-8");
365
365
 
366
+ // Issue #328: Skip headers generated by C-Next Transpiler
367
+ // During incremental migration, generated .h files may be discovered via #include
368
+ // recursion from C++ files. These headers contain the same symbols as their .cnx
369
+ // source files, so including them would cause false symbol conflicts.
370
+ if (originalContent.includes("Generated by C-Next Transpiler")) {
371
+ if (this.config.debugMode) {
372
+ console.log(`[DEBUG] Skipping C-Next generated header: ${file.path}`);
373
+ }
374
+ return;
375
+ }
376
+
366
377
  // Issue #321: Recursively process #include directives in headers
367
378
  // This ensures symbols from nested headers (like Arduino's extern HardwareSerial Serial)
368
379
  // are properly collected even when included transitively