[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 |
| 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.
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.
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.
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.
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.
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.
The change itself is fine, but should go in a different PR, it has nothing to do with sprite kit 😄
| // 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.
@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.
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.
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.
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.
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.
It's a breakage change and it's less clear than (already less than perfect) sec, please keep the existing name.
|
|
||
| [Static, Export ("moveTo:duration:")] | ||
| SKAction MoveTo (CGPoint location, double sec); | ||
| SKAction MoveTo (CGPoint location, double duration); |
|
|
||
| [Static, Export ("moveToX:duration:")] | ||
| SKAction MoveToX (nfloat x, double sec); | ||
| SKAction MoveToX (nfloat x, double duration); |
|
|
||
| [Static, Export ("moveToY:duration:")] | ||
| SKAction MoveToY (nfloat y, double sec); | ||
| SKAction MoveToY (nfloat y, double duration); |
| [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); |
| [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); |
| [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); |
| [Static] | ||
| [Export ("falloffTo:duration:")] | ||
| SKAction FalloffTo (float falloff, double sec); | ||
| SKAction FalloffTo (float falloff, double duration); |
| void Render (CGRect viewport, IMTLRenderCommandEncoder renderCommandEncoder, MTLRenderPassDescriptor renderPassDescriptor, IMTLCommandQueue commandQueue); | ||
|
|
||
| [Export ("updateAtTime:")] | ||
| void UpdateAtTime (double currentTime); |
spouliot
left a comment
There was a problem hiding this comment.
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).
| Comment = " // void func (Quaternion)", | ||
| Prefix = "simd__", | ||
| Variants = Variants.NonStret, | ||
| Parameters = new ParameterData[] { |
There was a problem hiding this comment.
👍 Copied it from code above :P
| // 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.
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.
minor: should be on the previous line
| public void RotationMatrix () | ||
| { | ||
| using (var obj = new SKTransformNode ()) | ||
| { |
| Quaternion Q; | ||
|
|
||
| using (var obj = new SKTransformNode ()) | ||
| { |
There was a problem hiding this comment.
same (the IDE should set it up properly, double check your settings and file a bug if set to mono style).
| 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.
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.
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.
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.
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.
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.
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. |
dalexsoto
left a comment
There was a problem hiding this comment.
Minor stuff, but 👍 once fixed
| [BaseType (typeof(NSObject))] | ||
| [DisableDefaultCtor] | ||
| interface SKRenderer | ||
| { |
There was a problem hiding this comment.
Minor: Brace should be on the above line
| [TV (11,0), Watch (4,0), Mac (13,0), iOS (11,0)] | ||
| [BaseType (typeof(SKNode))] | ||
| interface SKTransformNode | ||
| { |
There was a problem hiding this comment.
Minor: Brace should be on the above line
|
Build failure |
|
Unrelated test failure: https://bugzilla.xamarin.com/show_bug.cgi?id=55719 |