Enable polyglot package tagging for hosting integrations - #1574
Enable polyglot package tagging for hosting integrations#1574sebastienros wants to merge 2 commits into
Conversation
Enable the bundled Aspire integration analyzer for hosting packages and apply the analyzer's polyglot opt-out contract to NuGet package metadata. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Clarify that Aspire.Hosting supplies the enabled analyzer through build-transitive assets. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Implementation detail: This was verified on |
There was a problem hiding this comment.
🟡 Changes recommended
polyglot tagging can be applied even when the analyzer may not actually be present for projects lacking a direct Aspire.Hosting reference, risking incorrect package metadata.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates shared build metadata so CommunityToolkit.Aspire.Hosting.* NuGet packages can be discovered by Polyglot AppHosts by advertising the polyglot package tag when the Aspire integration analyzers are enabled and the project hasn’t opted out.
Changes:
- Enables
EnableAspireIntegrationAnalyzersby default forCommunityToolkit.Aspire.Hosting.*projects undersrc/. - Appends
polyglottoPackageTagswhen analyzers are enabled andIsAspirePolyglotCompatibleis notfalse. - Removes the central package version entry for
Aspire.Hosting.Integration.Analyzers(and its now-removed explicit reference).
File summaries
| File | Description |
|---|---|
| src/Directory.Build.targets | Conditionally appends the polyglot tag to package metadata for compatible hosting integrations. |
| src/Directory.Build.props | Automatically enables Aspire integration analyzers for hosting integration projects and removes the explicit analyzer package reference. |
| Directory.Packages.props | Removes the central package version entry for the analyzer package that is no longer explicitly referenced. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Fixes: #1573
Polyglot AppHosts only discover NuGet integrations marked with the
polyglottag. Community Toolkit hosting integrations already expose[AspireExport]APIs, but their packages do not currently advertise that compatibility.This enables the bundled Aspire integration analyzer for
CommunityToolkit.Aspire.Hosting.*projects and applies its opt-out contract to package metadata. Compatible projects receivepolyglotunless they setIsAspirePolyglotCompatibletofalse; projects without export coverage fail withASPIREEXPORT017. The redundant explicit analyzer package reference is removed becauseAspire.Hostingsupplies the analyzer whenEnableAspireIntegrationAnalyzersis enabled.PR Checklist
Other information
The full solution builds with .NET SDK 10.0.400 with zero
ASPIREEXPORTdiagnostics. A negative test using an unsupportedEncoding?export parameter producedASPIREEXPORT004for each target framework. All 78 source projects were packed and their.nuspecmetadata inspected: 62 compatible packages containpolyglot, while the other 16 do not.Packages that receive the polyglot tag (62)
CommunityToolkit.Aspire.Hosting.ActiveMQCommunityToolkit.Aspire.Hosting.AdminerCommunityToolkit.Aspire.Hosting.Azure.DaprCommunityToolkit.Aspire.Hosting.Azure.Dapr.RedisCommunityToolkit.Aspire.Hosting.Azure.DataApiBuilderCommunityToolkit.Aspire.Hosting.Azure.ExtensionsCommunityToolkit.Aspire.Hosting.Bitwarden.SecretManagerCommunityToolkit.Aspire.Hosting.BunCommunityToolkit.Aspire.Hosting.DaprCommunityToolkit.Aspire.Hosting.DbGateCommunityToolkit.Aspire.Hosting.DbxCommunityToolkit.Aspire.Hosting.DenoCommunityToolkit.Aspire.Hosting.DuckDBCommunityToolkit.Aspire.Hosting.Elasticsearch.ExtensionsCommunityToolkit.Aspire.Hosting.FlagdCommunityToolkit.Aspire.Hosting.FlociCommunityToolkit.Aspire.Hosting.FlywayCommunityToolkit.Aspire.Hosting.GoFeatureFlagCommunityToolkit.Aspire.Hosting.GolangCommunityToolkit.Aspire.Hosting.JavaCommunityToolkit.Aspire.Hosting.JavaScript.ExtensionsCommunityToolkit.Aspire.Hosting.K3sCommunityToolkit.Aspire.Hosting.Keycloak.ExtensionsCommunityToolkit.Aspire.Hosting.KindCommunityToolkit.Aspire.Hosting.KurrentDBCommunityToolkit.Aspire.Hosting.LavinMQCommunityToolkit.Aspire.Hosting.ListmonkCommunityToolkit.Aspire.Hosting.LogtoCommunityToolkit.Aspire.Hosting.MailPitCommunityToolkit.Aspire.Hosting.McpInspectorCommunityToolkit.Aspire.Hosting.MeilisearchCommunityToolkit.Aspire.Hosting.MinioCommunityToolkit.Aspire.Hosting.MongoDB.ExtensionsCommunityToolkit.Aspire.Hosting.MosquittoCommunityToolkit.Aspire.Hosting.MySql.ExtensionsCommunityToolkit.Aspire.Hosting.NgrokCommunityToolkit.Aspire.Hosting.OllamaCommunityToolkit.Aspire.Hosting.OpenTelemetryCollectorCommunityToolkit.Aspire.Hosting.PapercutSmtpCommunityToolkit.Aspire.Hosting.PerlCommunityToolkit.Aspire.Hosting.PostaCommunityToolkit.Aspire.Hosting.PostgreSQL.ExtensionsCommunityToolkit.Aspire.Hosting.PowerShellCommunityToolkit.Aspire.Hosting.Python.ExtensionsCommunityToolkit.Aspire.Hosting.RavenDBCommunityToolkit.Aspire.Hosting.RedPandaCommunityToolkit.Aspire.Hosting.Redis.ExtensionsCommunityToolkit.Aspire.Hosting.RustCommunityToolkit.Aspire.Hosting.RustFsCommunityToolkit.Aspire.Hosting.SeaweedFSCommunityToolkit.Aspire.Hosting.SftpCommunityToolkit.Aspire.Hosting.SolrCommunityToolkit.Aspire.Hosting.SqlDatabaseProjectsCommunityToolkit.Aspire.Hosting.SqlServer.ExtensionsCommunityToolkit.Aspire.Hosting.SqliteCommunityToolkit.Aspire.Hosting.SquadCommunityToolkit.Aspire.Hosting.StableDiffusionCppCommunityToolkit.Aspire.Hosting.StripeCommunityToolkit.Aspire.Hosting.SurrealDbCommunityToolkit.Aspire.Hosting.UmamiCommunityToolkit.Aspire.Hosting.ZitadelCommunityToolkit.Aspire.Hosting.k6Packages that do not receive the polyglot tag (16)
CommunityToolkit.Aspire.Bitwarden.SecretManagerCommunityToolkit.Aspire.DuckDB.NET.DataCommunityToolkit.Aspire.GoFeatureFlagCommunityToolkit.Aspire.KurrentDBCommunityToolkit.Aspire.Logto.ClientCommunityToolkit.Aspire.MassTransit.RabbitMQCommunityToolkit.Aspire.MeilisearchCommunityToolkit.Aspire.Microsoft.Data.SqliteCommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.SqliteCommunityToolkit.Aspire.Minio.ClientCommunityToolkit.Aspire.OllamaSharpCommunityToolkit.Aspire.PostaCommunityToolkit.Aspire.RavenDB.ClientCommunityToolkit.Aspire.SeaweedFS.ClientCommunityToolkit.Aspire.SftpCommunityToolkit.Aspire.SurrealDb