Skip to content

Commit 4bda8b7

Browse files
dmealingclaude
andcommitted
chore: genericize the remaining adopter package prefix in the C# port
A first pass matched only the `::api` and bare-value forms and missed `::common` and `::reporting` in two C# files. Both now use the `acme::` convention already used by the neighbouring tests in the same directory. Build succeeds with 0 errors and the affected test passes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent dd251ca commit 4bda8b7

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

server/csharp/MetaObjects.Codegen.Tests/Issue205ValueObjectEnumTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class Issue205ValueObjectEnumTests
1919
// a cross-package extends, and that value object owned (jsonb) by an entity so it is
2020
// emitted as a POCO.
2121
private const string ProvidedEnum = """
22-
{ "metadata.root": { "package": "p3::common", "children": [
22+
{ "metadata.root": { "package": "acme::common", "children": [
2323
{ "field.enum": { "name": "ContactMethod", "abstract": true, "@provided": true, "@values": ["Phone","Email","Fax"] } }
2424
]}}
2525
""";
@@ -33,7 +33,7 @@ public class Issue205ValueObjectEnumTests
3333
{ "identity.primary": { "@fields": "id" } }
3434
]}},
3535
{ "object.value": { "name": "ContactInfo", "children": [
36-
{ "field.enum": { "name": "contactMethod", "@required": true, "extends": "p3::common::ContactMethod" } }
36+
{ "field.enum": { "name": "contactMethod", "@required": true, "extends": "acme::common::ContactMethod" } }
3737
]}}
3838
]}}
3939
""";
@@ -56,7 +56,7 @@ private static MetaRoot Load()
5656
{
5757
OutDir = "/tmp",
5858
Namespace = "Acme.Generated",
59-
PackageNamespaces = new() { ["p3::common"] = "Acme.DataEnums" },
59+
PackageNamespaces = new() { ["acme::common"] = "Acme.DataEnums" },
6060
},
6161
};
6262

server/csharp/MetaObjects.Codegen/Generators/CallableGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected override EmittedFile GenerateOne(MetaObject entity, GenContext ctx)
6767
var hasArgs = argsObject is not null;
6868
var ctxType = ctx.Config.ContextTypeName;
6969
// Use the resolved args VO's C# type name — @parameterRef (and source.ParameterRef)
70-
// can be a package-qualified FQN ("p3::reporting::FooArgs"), and the "::" separator
70+
// can be a package-qualified FQN ("acme::reporting::FooArgs"), and the "::" separator
7171
// is invalid in a C# parameter type (CS7000). Pascal(Name) yields the emitted type.
7272
var argsType = hasArgs ? CSharpNaming.Pascal(argsObject!.Name) : null;
7373
var signature = hasArgs ? $"{ctxType} db, {argsType} args" : $"{ctxType} db";

0 commit comments

Comments
 (0)