Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 30, 2025

Closes #1011

cargo run does not accept "." as a positional argument (unlike go run .). The current code produces cargo run . which fails.

Changes

  • Remove "." from the args array in RustAppHostingExtension.cs
  • Update test assertions in AddRustAppTests.cs to expect correct args

Before: cargo run . [--args]
After: cargo run [--args]

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

Cargo uses the working directory (already set correctly) to find Cargo.toml. If a different manifest location is needed, --manifest-path should be used instead.

Original prompt

This section details on the original issue you should resolve

<issue_title>Remove stray "." argument passed to cargo run in RustAppHostingExtension.cs</issue_title>
<issue_description>In src/CommunityToolkit.Aspire.Hosting.Rust/RustAppHostingExtension.cs the code invokes cargo with an extra "." argument (e.g. cargo run .). cargo run does not accept "." as a positional argument and this causes cargo to fail.

Suggested fix: Remove the stray "." so arguments become cargo run <args> or use --manifest-path if intended</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Remove stray '.' argument from cargo run in RustAppHostingExtension.cs Remove stray "." argument passed to cargo run in RustAppHostingExtension.cs Nov 30, 2025
Copilot AI requested a review from aaronpowell November 30, 2025 23:48
Copilot finished work on behalf of aaronpowell November 30, 2025 23:48
@aaronpowell aaronpowell marked this pull request as ready for review December 1, 2025 00:31
@aaronpowell aaronpowell requested a review from Alirexaa as a code owner December 1, 2025 00:31
Copilot AI review requested due to automatic review settings December 1, 2025 00:31
Copilot finished reviewing on behalf of aaronpowell December 1, 2025 00:32
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

Code Coverage

Package Line Rate Branch Rate Complexity Health
CommunityToolkit.Aspire.GoFeatureFlag 100% 97% 74
CommunityToolkit.Aspire.Hosting.ActiveMQ 78% 40% 108
CommunityToolkit.Aspire.Hosting.ActiveMQ.MassTransit 1% 0% 14
CommunityToolkit.Aspire.Hosting.Adminer 74% 50% 20
CommunityToolkit.Aspire.Hosting.Azure.Dapr 29% 7% 124
CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis 61% 34% 76
CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder 100% 100% 22
CommunityToolkit.Aspire.Hosting.Bun 96% 83% 28
CommunityToolkit.Aspire.Hosting.Dapr 60% 37% 840
CommunityToolkit.Aspire.Hosting.DbGate 94% 50% 18
CommunityToolkit.Aspire.Hosting.Deno 98% 85% 44
CommunityToolkit.Aspire.Hosting.Flagd 79% 100% 32
CommunityToolkit.Aspire.Hosting.GoFeatureFlag 88% 73% 36
CommunityToolkit.Aspire.Hosting.Golang 51% 40% 88
CommunityToolkit.Aspire.Hosting.Java 70% 75% 130
CommunityToolkit.Aspire.Hosting.JavaScript.Extensions 97% 85% 200
CommunityToolkit.Aspire.Hosting.k6 58% 12% 20
CommunityToolkit.Aspire.Hosting.Keycloak.Extensions 100% 100% 22
CommunityToolkit.Aspire.Hosting.KurrentDB 71% 75% 34
CommunityToolkit.Aspire.Hosting.LavinMQ 74% 50% 26
CommunityToolkit.Aspire.Hosting.LavinMQ.MassTransit 1% 0% 14
CommunityToolkit.Aspire.Hosting.MailPit 85% 50% 22
CommunityToolkit.Aspire.Hosting.McpInspector 75% 39% 154
CommunityToolkit.Aspire.Hosting.Meilisearch 71% 57% 58
CommunityToolkit.Aspire.Hosting.Minio 88% 75% 56
CommunityToolkit.Aspire.Hosting.MongoDB.Extensions 96% 83% 36
CommunityToolkit.Aspire.Hosting.MySql.Extensions 100% 88% 78
CommunityToolkit.Aspire.Hosting.Ngrok 52% 35% 82
CommunityToolkit.Aspire.Hosting.Ollama 65% 69% 260
CommunityToolkit.Aspire.Hosting.OpenTelemetryCollector 78% 61% 77
CommunityToolkit.Aspire.Hosting.PapercutSmtp 81% 50% 18
CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions 99% 89% 84
CommunityToolkit.Aspire.Hosting.Python.Extensions 45% 29% 100
CommunityToolkit.Aspire.Hosting.RavenDB 62% 48% 148
CommunityToolkit.Aspire.Hosting.Redis.Extensions 100% 71% 48
CommunityToolkit.Aspire.Hosting.Rust 94% 83% 16
CommunityToolkit.Aspire.Hosting.Solr 72% 100% 22
CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects 51% 48% 192
CommunityToolkit.Aspire.Hosting.Sqlite 89% 89% 52
CommunityToolkit.Aspire.Hosting.SqlServer.Extensions 100% 87% 78
CommunityToolkit.Aspire.Hosting.SurrealDb 55% 40% 256
CommunityToolkit.Aspire.KurrentDB 94% 92% 54
CommunityToolkit.Aspire.MassTransit.RabbitMQ 100% 100% 30
CommunityToolkit.Aspire.Meilisearch 97% 92% 68
CommunityToolkit.Aspire.Microsoft.Data.Sqlite 89% 85% 52
CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite 61% 58% 114
CommunityToolkit.Aspire.Minio.Client 90% 85% 112
CommunityToolkit.Aspire.OllamaSharp 77% 71% 132
CommunityToolkit.Aspire.RavenDB.Client 60% 53% 237
CommunityToolkit.Aspire.SurrealDb 79% 63% 78
Summary 68% (7216 / 10642) 56% (2056 / 3690) 4684

Minimum allowed line rate is 60%

Copilot AI temporarily deployed to azure-artifacts December 1, 2025 00:36 Inactive
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 fixes a bug where the Rust integration was passing an invalid "." argument to cargo run, causing the command to fail. The fix removes the unnecessary argument, allowing cargo to correctly use the working directory.

  • Removes the stray "." argument from the cargo run command in RustAppHostingExtension.cs
  • Updates test assertions in AddRustAppTests.cs to verify the corrected command arguments

Reviewed changes

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

File Description
src/CommunityToolkit.Aspire.Hosting.Rust/RustAppHostingExtension.cs Removed the invalid "." argument from both conditional branches of the args array construction
tests/CommunityToolkit.Aspire.Hosting.Rust.Tests/AddRustAppTests.cs Updated test assertions to expect only "run" argument (without ".") in both test methods

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@Alirexaa
Copy link
Member

Alirexaa commented Dec 1, 2025

It's very odd how this test passed in cargo run ..

public async Task ResourceStartsAndRespondsOk()
{
var appName = "rust-app";
var rns = fixture.App.Services.GetRequiredService<ResourceNotificationService>();
_ = await rns.WaitForResourceHealthyAsync(appName).WaitAsync(TimeSpan.FromMinutes(5));
var httpClient = fixture.CreateHttpClient(appName);
var response = await httpClient.GetAsync("/ping");
Assert.Equal(HttpStatusCode.OK, response.StatusCode);

@Alirexaa
Copy link
Member

Alirexaa commented Dec 1, 2025

Manually tested and cargo run . works (actix-api starts successfully) but its ignore any passed arguments.

@Alirexaa Alirexaa merged commit fb97364 into main Dec 1, 2025
216 of 217 checks passed
@Alirexaa Alirexaa deleted the copilot/remove-stray-dot-argument branch December 1, 2025 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove stray "." argument passed to cargo run in RustAppHostingExtension.cs

3 participants