Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update IDE execution spec for Aspire v1 release #2631

Merged
merged 3 commits into from
Mar 6, 2024

Conversation

karolz-ms
Copy link
Member

@karolz-ms karolz-ms commented Mar 5, 2024

Main changes include:

  1. Added ability to specify multiple launch configurations (Visual Studio Aspire v1 will support only one).
  2. Clarified how errors should be reported
  3. Clarified how DCP will specify the version of the protocol it is using to talk to IDE endpoint.
Microsoft Reviewers: Open in CodeFlow

1. Add support for varied/multiple launch configurations
2. Specify how IDE should report errors
3. Specify how requests will be versioned
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-engineering-systems infrastructure helix infra engineering repo stuff label Mar 5, 2024
@karolz-ms
Copy link
Member Author

@rafaelldi please review/comment, any feedback would be very appreciated

@karolz-ms karolz-ms added area-tooling area-orchestrator and removed area-engineering-systems infrastructure helix infra engineering repo stuff labels Mar 5, 2024
@karolz-ms
Copy link
Member Author

@vijayrkn FYI

@rafaelldi
Copy link

Thanks for mentioning me!

@@ -71,13 +78,7 @@ The payload is best explained using an example:
"args": [

Choose a reason for hiding this comment

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

Should these args now apply to all projects from the launch_configurations list (same with the env property)?

Choose a reason for hiding this comment

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

In Aspire version 1 release only a single launch configuration instance, of type project, can be used as part of a run session request

Oh, I see that there will be only one project per request in this list.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, the idea is that env and args apply to all configurations that are part of the request and form a "baseline" of sorts. If that is not desired for certain configuration(s), these properties could be overridden on the individual configuration level. We do not have this scenario today, but I could imagine a need like that emerging in future.

| `type` | Launch configuration type indicator; must be `project`. | Required |
| `project_path` | Path to the project file for the program that is being launched. | Required |
| `mode` | Specifies the launch mode. Currently supported modes are `Debug` (run the project under the debugger) and `NoDebug` (run the project without debugging). | Optional, defaults to `Debug`. |
| `launch_profile` | Invocation arguments for the program (modeled as array of strings). | Optional |

Choose a reason for hiding this comment

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

As far as I understand, this property is now unused (as well as disable_launch_profile). For example, if you start an Aspire host project with dotnet run, it will run every project with the --no-launch-profile option. This is because if you run the project with launch_profile received, you will have conflicting ports because Aspire uses the port from the profile in the proxy. So, how to work with these properties correctly?

Copy link
Member Author

Choose a reason for hiding this comment

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

The invocation via dotnet run does not really use this protocol today, so it is not applicable.

For Visual Studio, dotnet watch (work pending), and presumably Rider, the property reflects the launch profile the user requested in the app model. It is the launch profile for the service program, which is distinct from the launch profile for the application host program. It is up to the IDE/CLI to apply the requested launch profile to the service program, and it is up to the developer to ensure that application host launch profile and the service(s) launch profile(s) do not conflict.

Not sure if I fully understand the question; hope this helps anyway.

Choose a reason for hiding this comment

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

Yes, thank you!

@karolz-ms karolz-ms merged commit ac6af18 into main Mar 6, 2024
8 checks passed
@karolz-ms karolz-ms deleted the dev/karolz/ide-protocol-update branch March 6, 2024 18:42
@karolz-ms
Copy link
Member Author

Thanks @rafaelldi and @BillHiebert !

@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants