-
Notifications
You must be signed in to change notification settings - Fork 5k
Add dotnet to the path for copilot agent #115912
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.
Pull Request Overview
This PR aims to ensure the local .dotnet
SDK folder is available on the PATH so Copilot agent commands like dotnet build
work out of the box.
- Introduce a new GitHub Actions step to prepend
.dotnet
toPATH
. - Place this step right after restoring the solution.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
/ba-g build will not run on workflow yml |
Testing this with https://github.com/dotnet/runtime/actions/runs/15198503683 |
Ok, I had to make one other change, but that is working now: https://github.com/dotnet/runtime/actions/runs/15198557123/job/42748196524 |
Can I get a review here? I think this should be a notable improvement. We can iterate more as we decide what we want to put in this workflow vs allow copilot to figure out on its own. |
/ba-g build analysis doesn't validate workflows |
@@ -17,5 +17,11 @@ jobs: | |||
steps: | |||
- uses: actions/checkout@v4.2.2 | |||
|
|||
- name: Install dependencies | |||
run: sudo ./eng/common/native/install-dependencies.sh |
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.
jfyi I'm not sure this script is enough; the helix docker images install a lot more https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/main/src/ubuntu/25.04/helix/Dockerfile
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.
IMO if we are missing anything we need for local dev we should improve the script that we tell contributors to run rather than duplicate a bunch of custom logic with dubious origin that's accumulated over time. I see a lot of things in that dockerfile that look specific to helix.
If we need steps that a specific to local testing of runtime, let's create a common script that we put in eng and update the contribution docs to mention it. Those can create single runtime script that invokes the common arcade provided one.
I think we should do that as problems arise so that we keep a minimal accurate set of contribution pre-requisites that's documented.
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.
Yet another place we describe these is here https://github.com/dotnet/runtime/tree/main/.devcontainer which I think drives the codespaces feature. @ellismg -- any idea if we can dedup these steps with copilot agent?
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.
Tracking improvements as part of #115946 will merge this so we can continue experimenting.
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.
LGTM, thanks!
Putting
.dotnet
folder on the path to give copilot agent better chance at having basic commands just work. Much of our product supportsdotnet build
on individual project thanks to @ViktorHofer's work, and these commands will always work for iterating on projects. I chatted with @CarnaViire and she'll cover other steps in the doc.I'm not entirely sure if this is the right way to make a persistent env variable for the copilot agent to use. Couldn't find mention in the docs. Figure we can try it and see!