-
Notifications
You must be signed in to change notification settings - Fork 695
Fix arg annotations when running in IDE mode #7711
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
tests/Aspire.Hosting.Tests/Dcp/DcpExecutorTests.cs:158
- Slicing exe.Spec.Args without verifying its initialization can lead to a null reference exception when executionType is not IDE. Please ensure that exe.Spec.Args is non-null before attempting to slice it.
var callArgs = executionType == ExecutionType.IDE ? exe.Spec.Args : exe.Spec.Args![^(expectedArgs?.Length ?? 0)..];
tests/Aspire.Hosting.Tests/Dcp/DcpExecutorTests.cs:121
- [nitpick] The parameter 'executionType' is being compared to ExecutionType.IDE, which may be of a different type than string. Consider aligning the types (for example, by using an enum consistently) to improve clarity and avoid potential type conversion issues.
if (executionType == ExecutionType.IDE)
@captainsafia I think this change removes the need for #7683. Can probably revert it after merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not an expert but LGTM overall -- it does appear that the double --port
fix can be reverted with this change set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just that one question
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
/backport to release/9.1 |
Started backporting to release/9.1: https://github.com/dotnet/aspire/actions/runs/13444068467 |
/backport to release/9.1 |
Started backporting to release/9.1: https://github.com/dotnet/aspire/actions/runs/13446883474 |
Description
Apply behavior from https://github.com/dotnet/aspire/blob/main/docs/specs/IDE-execution.md#launch-profile-processing-project-launch-configuration when displaying args in the dashboard.
Two changes:
project.Spec.Args
is left as null. That wasn't happening but appears to have special behavior according to the IDE execution spec. Maybe something along the toolchain automatically converts an empty array to null?Checklist
<remarks />
and<code />
elements on your triple slash comments?breaking-change
template):doc-idea
template):