Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 20, 2025

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

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
    }
  ]
};
Original prompt

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)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add ability to specify emitters per table Add per-table emitter configuration for spec-dashboard Nov 21, 2025
Copilot AI requested a review from JoshLove-msft November 21, 2025 00:11
Copilot finished work on behalf of JoshLove-msft November 21, 2025 00:11
@JoshLove-msft JoshLove-msft marked this pull request as ready for review November 21, 2025 00:45
@github-actions
Copy link
Contributor

No changes needing a change description found.

@JoshLove-msft JoshLove-msft added this pull request to the merge queue Nov 21, 2025
Merged via the queue into main with commit 190b9c2 Nov 21, 2025
22 of 23 checks passed
@JoshLove-msft JoshLove-msft deleted the copilot/add-emitter-names-support branch November 21, 2025 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ability to specify emitters per table

4 participants