Repository navigation
Fix Aspire.Hosting analyzer hookup - #15338
Jose Perez Rodriguez (joperezr) merged 8 commits into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15338Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15338" |
There was a problem hiding this comment.
Pull request overview
Updates the Aspire.Hosting integration analyzer wiring and export surface so analyzer validation aligns with runtime behavior and polyglot codegen expectations.
Changes:
- Fix global MSBuild analyzer hookup for Aspire.Hosting* projects and add targeted analyzer regression tests.
- Extend analyzer/type compatibility (assembly-exported external types, instance members on exported types, ValueTask/ValueTask, arrays).
- Adjust/export disambiguation and polyglot surface (union-based
withEnvironment, export ID collisions, add[AspireExportIgnore], update snapshots).
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts | Updates TS generated surface (notably consolidating env APIs into union-based withEnvironment). |
| tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/HostingContainerResourceCapabilities.verified.txt | Updates TS capability snapshot to reflect removed/renamed capabilities. |
| tests/Aspire.Hosting.CodeGeneration.Rust.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.rs | Updates Rust generated surface to match consolidated env APIs/capabilities. |
| tests/Aspire.Hosting.CodeGeneration.Python.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.py | Updates Python generated surface to match consolidated env APIs/capabilities. |
| tests/Aspire.Hosting.CodeGeneration.Python.Tests/Snapshots/HostingContainerResourceCapabilities.verified.txt | Updates Python capability snapshot (adds/renames capabilities). |
| tests/Aspire.Hosting.CodeGeneration.Java.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.java | Updates Java generated surface to match consolidated env APIs/capabilities. |
| tests/Aspire.Hosting.CodeGeneration.Go.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.go | Updates Go generated surface to match consolidated env APIs/capabilities. |
| tests/Aspire.Hosting.Analyzers.Tests/AspireExportAnalyzerTests.cs | Adds analyzer regression tests for new compatibility rules. |
| src/Shared/IConfigurationExtensions.cs | Marks internal IConfiguration helpers with [AspireExportIgnore] for polyglot export coverage. |
| src/Directory.Build.targets | Fixes analyzer project reference hookup for Aspire.Hosting* projects. |
| src/Aspire.Hosting/Utils/ExtensionUtils.cs | Marks debug inspection helper with [AspireExportIgnore]. |
| src/Aspire.Hosting/ResourceBuilderExtensions.cs | Consolidates env export into union-based withEnvironment, disambiguates export IDs, adds/ignores specific exports. |
| src/Aspire.Hosting/Publishing/PublishingExtensions.cs | Marks .NET convenience wrappers with [AspireExportIgnore]. |
| src/Aspire.Hosting/ProjectResourceBuilderExtensions.cs | Sets RunSyncOnBackgroundThread for sync callback exports. |
| src/Aspire.Hosting/ExecutableResourceExtensions.cs | Marks model inspection helper with [AspireExportIgnore]. |
| src/Aspire.Hosting/ExecutableResourceBuilderExtensions.cs | Sets RunSyncOnBackgroundThread for sync callback exports. |
| src/Aspire.Hosting/EmulatorResourceExtensions.cs | Marks model inspection helper with [AspireExportIgnore]. |
| src/Aspire.Hosting/ContainerResourceExtensions.cs | Marks model inspection helpers with [AspireExportIgnore]. |
| src/Aspire.Hosting/ContainerResourceBuilderExtensions.cs | Disambiguates capability IDs for parameter-based build arg/secret exports. |
| src/Aspire.Hosting/ContainerExecutableResourceExtensions.cs | Marks model inspection helper with [AspireExportIgnore]. |
| src/Aspire.Hosting/ConnectionStringBuilderExtensions.cs | Sets RunSyncOnBackgroundThread for sync callback export. |
| src/Aspire.Hosting/ConnectionPropertiesExtensions.cs | Marks internal helper with [AspireExportIgnore] and fixes formatting. |
| src/Aspire.Hosting/Aspire.Hosting.csproj | Removes local analyzer reference in favor of global MSBuild wiring. |
| src/Aspire.Hosting/ApplicationModel/ResourceExtensions.cs | Marks model/annotation inspection helpers with [AspireExportIgnore]. |
| src/Aspire.Hosting/ApplicationModel/ProjectResourceExtensions.cs | Marks model/metadata inspection helpers with [AspireExportIgnore]. |
| src/Aspire.Hosting/ApplicationModel/DistributedApplicationModelExtensions.cs | Marks model inspection helpers with [AspireExportIgnore]. |
| src/Aspire.Hosting.RemoteHost/Ats/AtsMarshaller.cs | Adds special handling for object parameters (union inputs) during JSON unmarshalling. |
| src/Aspire.Hosting.Integration.Analyzers/AspireExportAnalyzer.cs | Extends analyzer rules for assembly-exported external types, instance members on exported types, ValueTask, arrays, and union validation. |
| src/Aspire.Hosting.Analyzers/Infrastructure/WellKnownTypeData.cs | Adds ValueTask/ValueTask well-known type entries. |
| playground/polyglot/TypeScript/Aspire.Hosting/ValidationAppHost/apphost.ts | Updates validation app host usage to the consolidated withEnvironment API. |
| playground/polyglot/TypeScript/Aspire.Hosting.SqlServer/aspire.config.json | Adds polyglot playground config for SqlServer scenario. |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
a592d16 to
c175e08
Compare
Co-authored-by: Copilot <[email protected]>
|
The transient CI rerun workflow requested reruns for the following jobs after analyzing the failed attempt.
|
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
The transient CI rerun workflow requested reruns for the following jobs after analyzing the failed attempt.
|
Co-authored-by: Copilot <[email protected]>
|
The transient CI rerun workflow requested reruns for the following jobs after analyzing the failed attempt.
|
21c3afc to
d0cfe94
Compare
Co-authored-by: Copilot <[email protected]>
|
Re-running the failed jobs in the CI workflow for this pull request because 2 jobs were identified as retry-safe transient failures in the CI run attempt.
|
|
🎬 CLI E2E Test Recordings — 52 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #23256973279 |
8e4a4b4
into
release/13.2
* Fix Aspire.Hosting analyzer hookup Co-authored-by: Copilot <[email protected]> * Fix analyzer export after rebase Co-authored-by: Copilot <[email protected]> * Remove global namespace qualifiers Co-authored-by: Copilot <[email protected]> * Refresh codegen snapshots Co-authored-by: Copilot <[email protected]> * Fix TypeScript capability assertions Co-authored-by: Copilot <[email protected]> * Fix shared configuration export ignore Co-authored-by: Copilot <[email protected]> * Address analyzer review feedback Co-authored-by: Copilot <[email protected]> * Refresh container capability snapshot Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
Description
Aspire.Hostinganalyzer hookup so the shared analyzer wiring validates bothAspire.HostingandAspire.Hosting.*projects.ValueTask/ValueTask<T>, arrays of assembly-exported external types, and type-level[AspireExportIgnore].src/Directory.Build.targets, restoring thewithReferencecapability ID, consolidating ignore coverage onto types where appropriate, and refreshing the affected codegen snapshots and regression tests.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: