You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"title": "Fix Module Import Alias to Use `Exports` Class",
16
+
"description": "**Files:**\n- `src/Sharpy.Compiler/CodeGen/RoslynEmitter.cs` (lines 261-347 `GenerateImportUsings`)\n\n**Problem:**\nWhen importing a Sharpy module (not a .NET namespace), the generated using alias points to the wrong class:\n- Current: `using utils_helpers = Utils.Helpers.Helpers;`\n- Expected: `using utils_helpers = Utils.Helpers.Exports;`\n\nThe current code extracts the last segment of the namespace (`Helpers`) as the class name, but Sharpy modules expose their members via a class named `Exports`.\n\n",
"description": "**Files:**\n- `src/Sharpy.Compiler/CodeGen/RoslynEmitter.cs` (lines 495-622 `GenerateModuleClass`, lines 2164-2259 `GenerateModuleLevelField`)\n\n**Problem:**\nSharpy allows variable redefinition at module level that changes the type:\n```python\nx: int = 1\nx: auto = \"hello\" # Redefines x as string\n```\n\nCurrently generates invalid C# with duplicate field declarations:\n```csharp\npublic static int X = 1;\npublic static string X = \"hello\"; // CS0102: Duplicate definition\n```\n\n**Fix Approach:**\n1. Add `_",
"description": "**Files:**\n- `src/Sharpy.Compiler/CodeGen/RoslynEmitter.cs` (lines 193-220 `GenerateProjectNamespace`)\n- `src/Sharpy.Compiler/ProjectCompiler.cs` (namespace generation logic)\n\n**Problem:**\nFor deeply nested packages like `level1/level2/level3/__init__.spy`, the namespace is generated incorrectly:\n- Current: `TestProject.Level1.Level2.Level3.Level3` (duplicated segment)\n- Expected: `TestProject.Level1.Level2.Level3.Init`\n\nThe import alias also has issues:\n- Current: `using level1_level2_level3 = ",
49
+
"files": [
50
+
"src/Sharpy.Compiler/CodeGen/RoslynEmitter.cs",
51
+
"src/Sharpy.Compiler/ProjectCompiler.cs"
52
+
],
53
+
"status": "pending",
54
+
"executions": [],
55
+
"dependencies": [],
56
+
"is_critical": false,
57
+
"human_question": null,
58
+
"human_answer": null,
59
+
"notes": []
60
+
},
61
+
{
62
+
"id": "0.1.10.CG4",
63
+
"phase": "0.1.10",
64
+
"title": "Fix `__init__.spy` Class Name for Packages",
65
+
"description": "**Files:**\n- `src/Sharpy.Compiler/CodeGen/RoslynEmitter.cs` (lines 625-655 `GetModuleClassName`)\n\n**Problem:**\nPackage `__init__.spy` files generate a class named `Init`, but the import system expects `Exports`:\n- Generated: `namespace TestProject.Mypackage { public static class Init { ... } }`\n- Import expects: `using mypackage = TestProject.Mypackage.Exports;`\n\n**Fix Approach:**\n1. In `GetModuleClassName()`:\n - If the filename is `__init__`, return `\"Exports\"` instead of `\"Init\"`\n - This m",
66
+
"files": [
67
+
"src/Sharpy.Compiler/CodeGen/RoslynEmitter.cs"
68
+
],
69
+
"status": "pending",
70
+
"executions": [],
71
+
"dependencies": [],
72
+
"is_critical": false,
73
+
"human_question": null,
74
+
"human_answer": null,
75
+
"notes": []
76
+
},
77
+
{
78
+
"id": "0.1.10.CG5",
79
+
"phase": "0.1.10",
80
+
"title": "Handle Re-export Syntax in `__init__.spy`",
81
+
"description": "**Files:**\n- `src/Sharpy.Compiler/Parser/Parser.cs` (import/export parsing)\n- `src/Sharpy.Compiler/CodeGen/RoslynEmitter.cs` (re-export code generation)\n\n**Problem:**\nThe test `PackageInit_WithReExports_ExportsModuleMembers` fails with parser errors:\n```\nParser error at line 3, column 6: Expected identifier, got Dot\n```\n\nThis suggests the re-export syntax in `__init__.spy` is not being parsed correctly. The syntax likely involves:\n```python\nfrom .basic import BasicOperation\nfrom .advanced import",
0 commit comments