Commit 190b9c2
Add per-table emitter configuration for spec-dashboard (#9054)
Some languages like C# require different emitters for management plane
vs data plane scenarios. Currently, `emitterNames` is only configurable
globally in `CoverageFromAzureStorageOptions`, preventing mixed-emitter
table configurations.
## Changes
- Added optional `emitterNames?: string[]` field to `TableDefinition`
interface
- Modified `splitManifestByTables()` to propagate table-specific emitter
names through the pipeline
- Updated `getCoverageSummaries()` to:
- Collect union of global and table-specific emitters
- Load all required reports in single batch
- Filter reports per table using table-specific emitters when present,
falling back to global `options.emitterNames` otherwise
- Refactored `loadReports()` to accept emitter names as parameter
## Example
```typescript
const options: CoverageFromAzureStorageOptions = {
storageAccountName: "account",
containerName: "coverage",
manifestContainerName: "manifests",
emitterNames: ["@typespec/default"],
tables: [
{
name: "Management Plane",
packageName: "my-package",
prefixes: ["mgmt_"],
emitterNames: ["@azure-tools/typespec-csharp-mgmt"] // Override for mgmt scenarios
},
{
name: "Data Plane",
packageName: "my-package",
prefixes: ["dataplane_"],
emitterNames: ["@azure-tools/typespec-csharp"] // Override for data plane
}
]
};
```
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>Add ability to specify emitters per table</issue_title>
> <issue_description>In some languages, like C#, we have different
emitters for mgmt vs data plane scenarios. We should be able to specify
the emitterNames in the TableDefinitions in
CoverageFromAzureStorageOptions. If a table has emitter names we use
that, otherwise fall back to global defaults.</issue_description>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> </comments>
>
</details>
- Fixes #9053
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/microsoft/typespec/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: JoshLove-msft <[email protected]>
Co-authored-by: jolov <[email protected]>
Co-authored-by: Timothee Guerin <[email protected]>1 parent 99a775b commit 190b9c2
2 files changed
+110
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
227 | 289 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
73 | | - | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | | - | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | | - | |
| 87 | + | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
| |||
109 | 112 | | |
110 | 113 | | |
111 | 114 | | |
| 115 | + | |
112 | 116 | | |
113 | 117 | | |
114 | 118 | | |
| |||
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
| 136 | + | |
132 | 137 | | |
133 | 138 | | |
134 | 139 | | |
| |||
145 | 150 | | |
146 | 151 | | |
147 | 152 | | |
| 153 | + | |
148 | 154 | | |
149 | 155 | | |
150 | 156 | | |
| |||
156 | 162 | | |
157 | 163 | | |
158 | 164 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | 165 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
| |||
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
| 184 | + | |
182 | 185 | | |
183 | 186 | | |
184 | 187 | | |
185 | 188 | | |
186 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
187 | 217 | | |
188 | 218 | | |
189 | | - | |
| 219 | + | |
190 | 220 | | |
191 | 221 | | |
192 | 222 | | |
| |||
230 | 260 | | |
231 | 261 | | |
232 | 262 | | |
| 263 | + | |
233 | 264 | | |
234 | 265 | | |
235 | 266 | | |
236 | 267 | | |
237 | 268 | | |
238 | 269 | | |
239 | 270 | | |
240 | | - | |
| 271 | + | |
241 | 272 | | |
242 | 273 | | |
243 | 274 | | |
| |||
0 commit comments