-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 dogfood support #1944
Update dogfood support #1944
Conversation
I've been using -dogfood and then running a cmd from there (because powershell is not my thing) (Edit: You need to run build\dogfood.cmd to get the powershell interactive behavior.) |
See #1820 |
I do prefer it this way |
$scriptContents = @" | ||
@echo off | ||
title SDK Build ($RepoRoot) | ||
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 |
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.
I believe we used to have nix .sh files you could source. We should recover that too
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.
I think sourcing build.sh - dogfood
should work, right? So perhaps we don't need to generate separate shell scripts.
This looks like it is just making the overall process needlessly more complicated. As of today, it should be a one step process ( |
@tannergooding I don't think So unless I'm missing something, I think that generating the scripts ends up being less complicated than the process we have today. |
There's a -noexit that causes powershell to stay alive in build\dogfood.cmd. What I do is run build\dogfood.cmd, then run cmd from inside the unexited powershell. There was a bug in -dogfood that I fixed in #1820 that may not be in all branches. (Edit: Updated to reflect that you currently need to use build\dogfood.cmd, not build -dogfood) |
854c1f7
to
c052a32
Compare
This is my understanding: "build/dogfood.cmd" simply translates to "build/build.ps1 -dogfood" "build/build.ps1 -dogfood" is what we need to fix. |
…DIR environment variable This makes it possible to work with the same copy of the repo from both Linux and Windows by using a different artifacts directory for one of them.
c052a32
to
7cec5e7
Compare
I've made some changes based on discussions we've had. This PR now does the following:
@tannergooding @nguerrera @livarcocc @peterhuene @wli3 @johnbeisner |
$Host.UI.RawUI.WindowTitle = "SDK Test ($RepoRoot) ($configuration)" | ||
& $properties[0] $properties[1..($properties.Length-1)] | ||
} | ||
exit 0 |
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.
Should the sh have the same early return here?
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.
I've added this now. Turns out previously sourcing the script didn't work because it had an exit at the end. I've disabled that if you pass --dogfood
.
@jaredpar, will having a flag that ignores other flags (such as build/restore/test) conflict with repo API? |
The actual repo API isn't set. For example I can't give any concrete guidance like
But we do understand the rough concepts that will be involved. In particular we will need to be able to separate the restore, build, publish and test phases of a repository. Each of those needs to be executable as an individual action. The guidance I would give is avoid making it hard to separate those back out in the near future. |
a163705
to
ebd660f
Compare
ebd660f
to
0148435
Compare
@dotnet-bot test OSX10.12 Debug |
EDIT: This PR has changed somewhat, see #1944 (comment) for a more up-to-date description
This adds scripts that are created when you run the main build script that will set up a "build" or "test" environment.
The "build" environment basically just sets you up so that the version of
dotnet
on the path is the "Stage 0" one that would be used by the build script.The "test" environment is set up to use the "Stage 1" versions of the SDK assets when you build. So if you want to manually repro a test scenario, or to experiment with local changes, then you can do that in the test environment.
We had scripts like this before we moved to repo toolset. It looks like the
-dogfood
argument to the build script was supposed to do something similar, but that didn't work in my workflow because it doesn't set the environment variables in the calling process.With this PR, the "build" environment script is generated as
artifacts\sdk-build-env.bat
and the test environment script (for the Debug configuration) is generated asartifacts\Debug\sdk-test-env.bat
. That way there's less duplication of path logic, etc (though it is still duplicated betweenbuild.ps1
and theTestContext
code).@tannergooding @nguerrera @livarcocc @wli3 @peterhuene @johnbeisner