-
-
Notifications
You must be signed in to change notification settings - Fork 776
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
Incremental compiler compatibility fixes #52
Conversation
Codecov Report
@@ Coverage Diff @@
## mirror #52 +/- ##
========================================
+ Coverage 3.86% 4.16% +0.3%
========================================
Files 32 34 +2
Lines 6604 6716 +112
Branches 1054 1056 +2
========================================
+ Hits 255 280 +25
- Misses 6344 6431 +87
Partials 5 5
Continue to review full report at Codecov.
|
Mirror/Weaver/Weaver.cs
Outdated
@@ -1444,7 +1444,7 @@ static void SetupTargetTypes() | |||
|
|||
gameObjectInequality = ResolveMethod(unityObjectType, "op_Inequality"); | |||
|
|||
UBehaviourIsServer = ResolveMethod(NetworkBehaviourType, "get_isServer"); | |||
UBehaviourIsServer = ResolveMethod(NetworkBehaviourType, "get_isServer"); |
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.
Can you remove the unnecessary whitespaces please?
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 whitespace was removed in this commit (automatic formatting, I figured I'd leave that in)
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.
Can you still remove it for this pull request and then maybe add another one just for that later?
keeping it simple and stupid :)
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.
Sure, here you go
@@ -2036,7 +2036,8 @@ void ProcessSyncVars() | |||
fieldModuleName != Weaver.m_UnityAssemblyDefinition.MainModule.Name && | |||
fieldModuleName != Weaver.m_UNetAssemblyDefinition.MainModule.Name && | |||
fieldModuleName != Weaver.corLib.Name && | |||
fieldModuleName != "System.Runtime.dll" // this is only for Metro, built-in types are not in corlib on metro | |||
fieldModuleName != "System.Runtime.dll" && // this is only for Metro, built-in types are not in corlib on metro | |||
fieldModuleName != "netstandard.dll" // handle built-in types when weaving new C#7 compiler assemblies |
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.
Can you give an example of a type in netstandard.dll that is needed? I haven't tried that Unity version yet
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.
In my case:
[SyncVar]
public string DisplayName;
[SyncVar]
public bool IsAlive;
Results in System.String
and System.Boolean
being referenced from netstandard.dll
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'm not an expert on the topic, but you can refer to the comment here for an explanation why this occurs
dotnet/standard#146 (comment)
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.
Thanks!
🎉 This PR is included in version 1.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
#29
Based on the issue above. These two fixes should improve compatibility with the new compiler.