-
Notifications
You must be signed in to change notification settings - Fork 514
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
[spritekit] Update for Xcode 9 beta 1, 2 & 3 #2331
Conversation
VincentDondain
commented
Jul 17, 2017
- Added Quaternion support to XI runtime (simd_quatf).
- Added Quaternion support to XI runtime (simd_quatf).
Build failure |
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 am not sure if changing parameter names is considered a breaking change (question for @spouliot) but if we allow it, we should also include the unit of measure in the new parameter name
Make.config
Outdated
@@ -60,7 +60,7 @@ MIN_MONO_URL=https://bosstoragemirror.blob.core.windows.net/wrench/mono-2017-04/ | |||
# Minimum Visual Studio version | |||
MIN_VISUAL_STUDIO_URL=https://bosstoragemirror.blob.core.windows.net/wrench/monodevelop-lion-dogfood-vNext/8f/8f1c13cb983138ee63bd53e09908ea5e737988cd/VisualStudioForMac-Preview-7.0.0.2728.dmg | |||
MIN_VISUAL_STUDIO_VERSION=7.0.0.2728 | |||
MAX_VISUAL_STUDIO_VERSION=7.2.99 | |||
MAX_VISUAL_STUDIO_VERSION=7.3.99 |
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.
Why is this required? I think we should keep the same as 15.3 unless we require this
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.
The message says that we can bump whenever we test with a more recent version and it works (:
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.
Yeah, I completely agree when you are not in a release branch but I think that message is more intended for master
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.
It's already not the same version as the d15.3 branch, I really think it doesn't matter: https://github.com/xamarin/xamarin-macios/blob/d15-3/Make.config#L63
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.
Yeah, I think you changed that in the first Xcode9 bump 24cd73a#diff-f682ea58f8badb13b9f8ed17cda4deb7R63 but yeah I think it does not matter much at this point unless we really want to be close to dev 15.3
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.
The change itself is fine, but should go in a different PR, it has nothing to do with sprite kit 😄
src/spritekit.cs
Outdated
@@ -1954,28 +1991,28 @@ partial interface SKAction : NSCoding, NSCopying { | |||
|
|||
// These are in a category | |||
[Static, Export ("moveByX:y:duration:")] | |||
SKAction MoveBy (nfloat deltaX, nfloat deltaY, double sec); | |||
SKAction MoveBy (nfloat deltaX, nfloat deltaY, double duration); |
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 is this a breaking change? I am in favor of the change if we can allow it but @VincentDondain I would use durationInSeconds
instead if seconds is the unit of measure of duration
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.
Mmh API diff considers this a breaking change. I don't really understand why it would be one...
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.
Because you can do
var action = MoveBy (deltaX: 1, deltaY: 2, sec: 100);
If anyone had the above code you will break them
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.
But I still consider this is a good one, it really helps to better understand the API and even more if we add the measurement unit to the parameter name
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.
Aaaaaah you're right, I didn't think about that, I never name anything explicitly in C# :P
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.
It's a breakage change and it's less clear than (already less than perfect) sec
, please keep the existing name.
src/spritekit.cs
Outdated
|
||
[Static, Export ("moveBy:duration:")] | ||
SKAction MoveBy (CGVector delta, double duration); | ||
|
||
[Static, Export ("moveTo:duration:")] | ||
SKAction MoveTo (CGPoint location, double sec); | ||
SKAction MoveTo (CGPoint location, double duration); |
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.
same as above
src/spritekit.cs
Outdated
|
||
[Static, Export ("moveToX:duration:")] | ||
SKAction MoveToX (nfloat x, double sec); | ||
SKAction MoveToX (nfloat x, double duration); |
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.
same as above
src/spritekit.cs
Outdated
|
||
[Static, Export ("moveToY:duration:")] | ||
SKAction MoveToY (nfloat y, double sec); | ||
SKAction MoveToY (nfloat y, double duration); |
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.
same as above
src/spritekit.cs
Outdated
|
||
[iOS (8,0), Mac(10,10)] | ||
[Static, Export ("reachTo:rootNode:velocity:")] | ||
SKAction ReachTo (CGPoint position, SKNode rootNode, nfloat velocity); | ||
|
||
[iOS (8,0), Mac(10,10)] | ||
[Static, Export ("reachToNode:rootNode:duration:")] | ||
SKAction ReachToNode (SKNode node, SKNode rootNode, double sec); | ||
SKAction ReachToNode (SKNode node, SKNode rootNode, double duration); |
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.
same as above
src/spritekit.cs
Outdated
|
||
[iOS (8,0), Mac(10,10)] | ||
[Static, Export ("reachToNode:rootNode:velocity:")] | ||
SKAction ReachToNode (SKNode node, SKNode rootNode, nfloat velocity); | ||
|
||
[iOS (8,0), Mac (10,10)] // this method is missing the NS_AVAILABLE macro, but it shows up in the 10.10 sdk, but not the 10.9 sdk. | ||
[Static, Export ("strengthTo:duration:")] | ||
SKAction StrengthTo (float /* float, not CGFloat */ strength, double sec); | ||
SKAction StrengthTo (float /* float, not CGFloat */ strength, double duration); |
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.
same as above
src/spritekit.cs
Outdated
|
||
[iOS (8,0), Mac (10,10)] // this method is missing the NS_AVAILABLE macro, but it shows up in the 10.10 sdk, but not the 10.9 sdk. | ||
[Static, Export ("strengthBy:duration:")] | ||
SKAction StrengthBy (float /* float, not CGFloat */ strength, double sec); | ||
SKAction StrengthBy (float /* float, not CGFloat */ strength, double duration); |
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.
same as above
src/spritekit.cs
Outdated
@@ -2150,7 +2187,7 @@ partial interface SKAction : NSCoding, NSCopying { | |||
[iOS (8,0), Mac(10,10)] | |||
[Static] | |||
[Export ("falloffTo:duration:")] | |||
SKAction FalloffTo (float falloff, double sec); | |||
SKAction FalloffTo (float falloff, double duration); |
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.
same as above
src/spritekit.cs
Outdated
void Render (CGRect viewport, IMTLRenderCommandEncoder renderCommandEncoder, MTLRenderPassDescriptor renderPassDescriptor, IMTLCommandQueue commandQueue); | ||
|
||
[Export ("updateAtTime:")] | ||
void UpdateAtTime (double currentTime); |
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.
Maybe just Update
?
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.
Agreed. 👍
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.
Please do not mix new bindings with other changes. If needed they should be in separate PR.
Also make sure the tests are run on devices before committing (simd stuff can behave differently).
runtime/bindings-generator.cs
Outdated
Comment = " // void func (Quaternion)", | ||
Prefix = "simd__", | ||
Variants = Variants.NonStret, | ||
Parameters = new ParameterData[] { |
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.
minor: space before []
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.
👍 Copied it from code above :P
src/spritekit.cs
Outdated
@@ -1954,28 +1991,28 @@ partial interface SKAction : NSCoding, NSCopying { | |||
|
|||
// These are in a category | |||
[Static, Export ("moveByX:y:duration:")] | |||
SKAction MoveBy (nfloat deltaX, nfloat deltaY, double sec); | |||
SKAction MoveBy (nfloat deltaX, nfloat deltaY, double duration); |
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.
It's a breakage change and it's less clear than (already less than perfect) sec
, please keep the existing name.
Vector3 V3; | ||
|
||
using (var obj = new SKTransformNode ()) | ||
{ |
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.
minor: should be on the previous line
public void RotationMatrix () | ||
{ | ||
using (var obj = new SKTransformNode ()) | ||
{ |
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.
same
Quaternion Q; | ||
|
||
using (var obj = new SKTransformNode ()) | ||
{ |
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.
same (the IDE should set it up properly, double check your settings and file a bug if set to mono style).
Make.config
Outdated
@@ -60,7 +60,7 @@ MIN_MONO_URL=https://bosstoragemirror.blob.core.windows.net/wrench/mono-2017-04/ | |||
# Minimum Visual Studio version | |||
MIN_VISUAL_STUDIO_URL=https://bosstoragemirror.blob.core.windows.net/wrench/monodevelop-lion-dogfood-vNext/8f/8f1c13cb983138ee63bd53e09908ea5e737988cd/VisualStudioForMac-Preview-7.0.0.2728.dmg | |||
MIN_VISUAL_STUDIO_VERSION=7.0.0.2728 | |||
MAX_VISUAL_STUDIO_VERSION=7.2.99 | |||
MAX_VISUAL_STUDIO_VERSION=7.3.99 |
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.
The change itself is fine, but should go in a different PR, it has nothing to do with sprite kit 😄
public void VersionCheck () | ||
{ | ||
if (!TestRuntime.CheckXcodeVersion (9,0)) | ||
Assert.Inconclusive ("Requires Xcode9+"); |
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.
minor (for next time): there's a one-liner for this:
TestRuntime.AssertXcodeVersion (9,0);
Asserts.AreEqual (Vector3.Zero, obj.EulerAngles, "1 EulerAngles"); | ||
V3 = new Vector3 (1, 2, 3); | ||
obj.EulerAngles = V3; | ||
Assert.AreEqual (-2.14159298f, obj.EulerAngles.X, "#x1"); |
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.
You're setting a vector of [1,2,3] and getting something back that looks like random numbers. Are you sure the test isn't finding a bug somewhere?
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.
Same values as native Swift example.
using (var obj = new SKTransformNode ()) | ||
{ | ||
obj.RotationMatrix = Matrix3.Zero; | ||
Asserts.AreEqual (Matrix3.Identity, obj.RotationMatrix, "RotationMatrix"); |
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: setting Matrix3.Zero
, and getting back Matrix3.Identity
. This doesn't look random, but it still looks strange (so I'd test with Xcode, and added a comment about it).
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.
Tested with Xcode already (found that weird too), same behavior. I'll add a comment that it does the same thing with native code.
Build failure |
Build failure |
1 similar comment
Build failure |
introspection and monotouch tests ran on device, both pass. |
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.
Minor stuff, but 👍 once fixed
src/spritekit.cs
Outdated
[BaseType (typeof(NSObject))] | ||
[DisableDefaultCtor] | ||
interface SKRenderer | ||
{ |
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.
Minor: Brace should be on the above line
src/spritekit.cs
Outdated
[TV (11,0), Watch (4,0), Mac (13,0), iOS (11,0)] | ||
[BaseType (typeof(SKNode))] | ||
interface SKTransformNode | ||
{ |
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.
Minor: Brace should be on the above line
Build failure |
Unrelated test failure: https://bugzilla.xamarin.com/show_bug.cgi?id=55719 |