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

Split Windows RuntimePlatform into UWP and WinRT #748

Merged
merged 3 commits into from Feb 17, 2017

Conversation

Projects
None yet
5 participants
@hartez
Member

hartez commented Feb 6, 2017

Description of Change

Splits the Windows option for RuntimePlatform into separate WinRT and UWP values, allowing for separate OnPlatform values for each platform (and distinguishing between the two anywhere else it might be called for).

Also added long-overdue UWP option to PlatformAffected.

Bugs Fixed

None

API Changes

Anywhere which previously checked for a Device.RuntimePlatform of Windows will now need to check WinRT and UWP individually.

Behavioral Changes

Device.RuntimePlatform now returns WinRT on WinRT and UWP on UWP.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense
@StephaneDelcroix

This comment has been minimized.

Show comment
Hide comment
@StephaneDelcroix

StephaneDelcroix Feb 7, 2017

Member

When was the new RuntimePlatform released ? Are we breaking any stable release with that ?

Also note that this is breaking xmlns declarations if you're using native views in xaml...

Member

StephaneDelcroix commented Feb 7, 2017

When was the new RuntimePlatform released ? Are we breaking any stable release with that ?

Also note that this is breaking xmlns declarations if you're using native views in xaml...

@hartez

This comment has been minimized.

Show comment
Hide comment
@hartez

hartez Feb 7, 2017

Member

@StephaneDelcroix The new RuntimePlatform is from 2.3.4.184-pre1, so we're not breaking anything stable.

Member

hartez commented Feb 7, 2017

@StephaneDelcroix The new RuntimePlatform is from 2.3.4.184-pre1, so we're not breaking anything stable.

@hartez

This comment has been minimized.

Show comment
Hide comment
@hartez

hartez Feb 7, 2017

Member

@StephaneDelcroix I added a special case to make the xmlns declarations backward compatible.

Member

hartez commented Feb 7, 2017

@StephaneDelcroix I added a special case to make the xmlns declarations backward compatible.

@StephaneDelcroix

If you tested the Xaml targetPlatform change, then 👍 (there's no test for that on windows)

@@ -269,7 +269,14 @@ static IList<string> PrefixesToIgnore(IList<KeyValuePair<string, string>> xmlns)
continue;
try {
if (targetPlatform != Device.RuntimePlatform)
{
// Special case for Windows backward compatibility
if (targetPlatform == "Windows" &&

This comment has been minimized.

@StephaneDelcroix

StephaneDelcroix Feb 8, 2017

Member

I'd prefer this being written like this

if (targetPlatform != Device.RuntimePlatform && (targetPlatform != "Windows" || (Device.RuntimePlatform != Device.UWP && Device.RuntimePlatform != Device.WinRT)))
    prefixes.Add(prefix);
@StephaneDelcroix

StephaneDelcroix Feb 8, 2017

Member

I'd prefer this being written like this

if (targetPlatform != Device.RuntimePlatform && (targetPlatform != "Windows" || (Device.RuntimePlatform != Device.UWP && Device.RuntimePlatform != Device.WinRT)))
    prefixes.Add(prefix);

@rmarinho rmarinho merged commit caa8882 into master Feb 17, 2017

6 checks passed

Android-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: UI Tests :: OSX Test Cloud Package - Run Android 6.0.1 : Tests passed: 352, i…
Details
OSX-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: OSX Debug : Running
Details
Windows-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: Windows Debug : Tests passed: 3739, ignored: 10
Details
iOS10-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified iOS10 : Tests passed: 34…
Details
iOS8-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified IOS8 : Tests passed: 349…
Details
iOS9-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified iOS9 : Tests passed: 351…
Details

@hartez hartez deleted the windows-distinct-platforms branch May 16, 2017

@samhouts samhouts added D-15.4 and removed cla-not-required labels Oct 10, 2017

@samhouts samhouts added this to the 2.3.5 milestone Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment