Skip to content

[docs] Document Go options merging and numeric unions - #1968

Closed
aspire-repo-bot[bot] wants to merge 1 commit into
release/17.0from
docs/pr-21188-40727797240-1-437893c33a6162cf
Closed

aspire-repo-bot[bot] wants to merge 1 commit into
release/17.0from
docs/pr-21188-40727797240-1-437893c33a6162cf

Conversation

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#21188

Author: @sebastienros reviewed; PR author mention: see source PR.

Targeting release/17.0 based on the source PR milestone 17.0 (target_resolution: exact_match).

Why

The source PR fixes a Go AppHost panic when merging options structs that hold callbacks, and makes number unions accept any Go numeric type. These are user-visible Go SDK behaviors (signals: polyglot_code_generator_changed, pr_body_has_cli_flag_mention).

Changes

  • Updated (existing page): src/frontend/src/content/docs/app-host/go-apphost-conventions.mdx — explains how multiple options structs merge and that numeric parameters in unions accept any Go numeric type.

Generated by PR Documentation Check for #21188 · copilot · auto · 20.1 AIC · ⌖ 1.03 AIC · ⊞ 7.1K · ◷

@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1968. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1968 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

Copy link
Copy Markdown
Member

docs-pr-reviewer report — [partial — phase A: key claims evaluated; phase B: not run (docs site was not served in this automated run)]

Recommendation: approve

Source used: microsoft/aspire#21188 (merged 2026-10-28)
PR status: draft, mergeable, bot-authored, opened 2026-10-28 — not stale.

Phase A — claims

  • ✅ source PR merged ('Fix Go AppHost panic on callback options and accept Go numbers in unions'); merge semantics and numeric-union behavior described match.

Phase B — doc-tester

Not run; rendering of the changed pages is not browser-checked.

🤖 Posted by aspire.dev - squad (AI Agent)

@IEvangelist
David Pine (IEvangelist) marked this pull request as ready for review November 13, 2026 14:56
Copilot AI balanced review requested due to automatic review settings November 13, 2026 14:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The new Go options-merging and numeric-union guarantees cannot be verified against microsoft/aspire release/17.0 because its sources are unavailable locally and network and dependency restrictions block source retrieval and runtime validation.

No open issues 🎉

What changed in this PR

Updates the Go AppHost conventions guide to document SDK behavior introduced by microsoft/aspire#21188 for Aspire 17.0.

Changes:

  • Explains options-struct merging, including recursive merges and replacement of callbacks and cancellation tokens.
  • Clarifies that numeric union parameters accept any Go numeric type and serialize as JSON numbers.
File Description
src/​frontend/​src/​content/​docs/​app-host/​go-apphost-conventions.mdx Adds guidance on options merging and numeric union arguments.

Review effort: Balanced

@sebastienros

Copy link
Copy Markdown
Contributor

Closing because the content is inaccurate for 17.0:

  • The merge description says a field set in a later struct replaces the earlier one. In deepUpdate (base.go), any value from the later struct wins, including nil. So passing {Port: 8080} then {Name: "web"} clears Port. A reader would assume the opposite.
  • Nested structs merge only when both sides are non-nil.
  • The WithField numeric-union example no longer applies: [release/17.0] Allow structured Kubernetes manifest field values aspire#22107 changed value to any on release/17.0.
    Recommending multiple options structs is the wrong guidance given these semantics. A conventions update on typed option values (for example aspire.HttpEndpointPort(8080)) would be a better follow-up.

@sebastienros
Sébastien Ros (sebastienros) deleted the docs/pr-21188-40727797240-1-437893c33a6162cf branch November 13, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-from-code Copilot initiated issue from dotnet/aspire repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants