-
Notifications
You must be signed in to change notification settings - Fork 520
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
[msbuild] Provide the correct value for the operating system for tvOS and watchOS to a few tasks. Fixes #6200. #7226
Changes from all commits
ce33c84
11a3b8c
8982a4c
ab00a42
e5c2a12
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,10 @@ namespace Xamarin.MacDev.Tasks { | |
|
||
public abstract class MetalTaskBase { | ||
|
||
protected abstract string OperatingSystem { | ||
get; | ||
protected virtual string OperatingSystem { | ||
get { | ||
throw new NotImplementedException (); | ||
} | ||
} | ||
|
||
protected abstract string DevicePlatformBinDir { | ||
|
@@ -82,6 +84,7 @@ public void CheckToolBinDir (string taskName, string binDirToCheck) | |
RedirectStandardError = true, | ||
}; | ||
psi.EnvironmentVariables.Add ("DEVELOPER_DIR", Configuration.xcode_root); | ||
psi.EnvironmentVariables.Remove ("XCODE_DEVELOPER_DIR_PATH"); // VSfM sets XCODE_DEVELOPER_DIR_PATH, which confuses the command-line tools if it doesn't match xcode-select, so just unset it. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that change is not mentioned in the commit message There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't that cause problems in VSM? We need to make sure it resets it if needed or maybe tell the VSM team to not set it at all. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This problem occurs when running tests from within VSfM, and those tests inherit VSfM's environment, and this variable causes trouble when running Apple's command line tools if it doesn't match what xcode-select says - it will never be a problem for VSfM because that environment is not affected by this change. It's already filed here: #3931 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PR description has been updated. |
||
var proc = Process.Start (psi); | ||
|
||
string output = proc.StandardOutput.ReadToEnd (); | ||
|
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.
That block is repeated 3 times (not DRY)
Can it be moved into a (new) base type ? or an helper method ?
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.
Actually it's not repeated 3 times, only 2 (and one version is different from the others). In any case I've moved the duplicated code into a helper method.
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.
Good point - but now you have to explain why this one is different ;-) and not shared
Curious minds must know :)
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.
Also, can we use c# 8? Switch expressions!
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.
@spouliot it's the mac value that's different (
osx
vsmacosx
). It was that way before my changes, and I didn't want to change anything, so I kept it that way.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.
ah, I thought (jumped) to the default case, i.e.
String.Empty
vsException
, and overlooked the mac string :)