Skip to content

Commit 02ca04d

Browse files
authored
Merge branch 'feature/v3' into eng/parallel-code-gen
2 parents b0658dd + e3c1be2 commit 02ca04d

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/CADL.Extension/Emitter.Csharp/src/emitter.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,14 @@ export async function $onEmit(context: EmitContext<NetEmitterOptions>) {
171171
const newProjectOption = options["new-project"]
172172
? "--new-project"
173173
: "";
174+
175+
const debugFlag = options.debug ?? false ? " --debug" : "";
176+
174177
const command = `dotnet --roll-forward Major ${resolvePath(
175178
options.csharpGeneratorPath
176179
)} --project-path ${outputFolder} ${newProjectOption} --clear-output-folder ${
177180
options["clear-output-folder"]
178-
}`;
181+
}${debugFlag}`;
179182
console.info(command);
180183

181184
try {

src/CADL.Extension/Emitter.Csharp/src/options.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export type NetEmitterOptions = {
1818
"clear-output-folder"?: boolean;
1919
"save-inputs"?: boolean;
2020
"model-namespace"?: boolean;
21+
debug?: boolean;
2122
} & DpgEmitterOptions;
2223

2324
export const NetEmitterOptionsSchema: JSONSchemaType<NetEmitterOptions> = {
@@ -46,7 +47,8 @@ export const NetEmitterOptionsSchema: JSONSchemaType<NetEmitterOptions> = {
4647
"model-namespace": { type: "boolean", nullable: true },
4748
"generate-protocol-methods": { type: "boolean", nullable: true },
4849
"generate-convenience-methods": { type: "boolean", nullable: true },
49-
"package-name": { type: "string", nullable: true }
50+
"package-name": { type: "string", nullable: true },
51+
debug: { type: "boolean", nullable: true }
5052
},
5153
required: []
5254
};
@@ -61,7 +63,8 @@ const defaultOptions = {
6163
"save-inputs": false,
6264
"generate-protocol-methods": true,
6365
"generate-convenience-methods": true,
64-
"package-name": undefined
66+
"package-name": undefined,
67+
debug: undefined
6568
};
6669

6770
export function resolveOptions(context: EmitContext<NetEmitterOptions>) {

0 commit comments

Comments
 (0)