Skip to content

Conversation

@radical
Copy link
Member

@radical radical commented Jun 25, 2025

This reverts commit 6ab1e17.

Build broke - #10029

/home/runner/work/aspire/aspire/src/Aspire.Cli/Backchannel/ExtensionBackchannel.cs(187,27): error IL3050: Using member 'StreamJsonRpc.JsonRpc.Attach(Stream, Object)' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. This code uses a formatter/serializer that hasn't been hardened to avoid dynamic code.

/home/runner/work/aspire/aspire/src/Aspire.Cli/Backchannel/ExtensionBackchannel.cs(187,27): error IL2026: Using member 'StreamJsonRpc.JsonRpc.Attach(Stream, Object)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. This code uses a formatter/serializer that hasn't been hardened to avoid dynamic code.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR reverts commit 6ab1e17 in order to restore the previous implementation after the build broke. Key changes include the removal of extension–related interaction services and configuration constants, reverting templating return types from TemplateResult to int, and undoing modifications in various resources and dependency registrations.

Reviewed Changes

Copilot reviewed 53 out of 55 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/Aspire.Cli.Tests/TestServices/TestConsoleInteractionService.cs Removed the unused OpenNewProject method in line with interface changes.
src/Shared/KnownConfigNames.cs Removed extension configuration constants no longer needed.
src/Aspire.Cli/Templating/* Reverted return types and method signatures to use int exit codes.
src/Aspire.Cli/Program.cs Updated dependency registrations and locale override handling reverting prior extension service calls.
src/Aspire.Cli/Interaction/* Removed extension interaction–related methods to match interface updates.
extension/* Removed TLS and certificate–related code in the extension to align with network-based RPC server usage.
Files not reviewed (1)
  • src/Aspire.Cli/Resources/ErrorStrings.Designer.cs: Language not supported
Comments suppressed due to low confidence (3)

src/Shared/KnownConfigNames.cs:32

  • Confirm that all references to the removed extension configuration constants (such as ExtensionEndpoint, ExtensionPromptEnabled, etc.) have been updated or eliminated across the codebase.
    public const string CliLocaleOverride = "ASPIRE_CLI_LOCALE_OVERRIDE";

src/Aspire.Cli/Program.cs:96

  • Verify that removing the AddInteractionServices method and directly registering ConsoleInteractionService does not inadvertently remove any essential support previously provided by the extension interaction services.
        builder.Services.AddSingleton<IInteractionService, ConsoleInteractionService>();

extension/src/utils/vsc.ts:38

  • Since the default parameter for showErrorMessage was removed from isWorkspaceOpen, ensure that all calls to this function have been updated to no longer pass any argument.
export function isWorkspaceOpen(): boolean {

@JamesNK JamesNK merged commit aab8668 into dotnet:main Jun 25, 2025
497 of 499 checks passed
@mitchdenny
Copy link
Member

@adamint looks like you'll need to merge this in again once the AOT thing is solved.

@davidfowl
Copy link
Member

I think it’s a one liner. @eerhardt is OOF but there’s an alternative way take a look at the original apt pr

eerhardt added a commit to eerhardt/aspire that referenced this pull request Jun 25, 2025
adamint added a commit that referenced this pull request Jun 25, 2025
* Reapply "Initial extension interaction service (#9927)" (#10030)

This reverts commit aab8668.

* Update ExtensionBackchannel to be AOT compatible

Reuse the same Json source generation context. Add ExtensionBackchannel types to it.

Need to suppress a RDC warning due to EventHandlers on the Rpc Target object needing to call MakeGenericMethod, but we aren't using EventHandlers so it can be suppressed.

* Fix new AOT warnings:

Remove Exception from the wire payload since it can't be safely STJ serialized using the source generator.

Enable Configuration Binder source generator in the Aspire.Cli.

* untrack generated files

* subclass OperationCanceledException for ExtensionInteractionService

---------

Co-authored-by: Adam Ratzman <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Jul 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants