Skip to content
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

Merged
merged 3 commits into from
Oct 6, 2018
Merged

Incremental compiler compatibility fixes #52

merged 3 commits into from
Oct 6, 2018

Conversation

apkd
Copy link
Contributor

@apkd apkd commented Oct 4, 2018

#29

Based on the issue above. These two fixes should improve compatibility with the new compiler.

@codecov-io
Copy link

codecov-io commented Oct 4, 2018

Codecov Report

Merging #52 into mirror will increase coverage by 0.3%.
The diff coverage is n/a.

Impacted file tree graph

@@           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
Impacted Files Coverage Δ
Mirror/Runtime/ClientScene.cs 0% <0%> (ø) ⬆️
...Transport/TelepathyWebsocketsMultiplexTransport.cs 0% <0%> (ø) ⬆️
Mirror/Runtime/Messages.cs 0% <0%> (ø) ⬆️
Mirror/Runtime/NetworkAnimator.cs 0% <0%> (ø) ⬆️
Mirror/Runtime/Transport/LLAPITransport.cs 0% <0%> (ø) ⬆️
Mirror/Runtime/NetworkServer.cs 0% <0%> (ø) ⬆️
Mirror/Runtime/NetworkClient.cs 0% <0%> (ø) ⬆️
Mirror/Runtime/Transport/TelepathyTransport.cs 0% <0%> (ø) ⬆️
Mirror/Runtime/UNetwork.cs 0% <0%> (ø) ⬆️
Mirror/Runtime/NetworkTime.cs 0% <0%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c95648b...c6faad1. Read the comment docs.

@@ -1444,7 +1444,7 @@ static void SetupTargetTypes()

gameObjectInequality = ResolveMethod(unityObjectType, "op_Inequality");

UBehaviourIsServer = ResolveMethod(NetworkBehaviourType, "get_isServer");
UBehaviourIsServer = ResolveMethod(NetworkBehaviourType, "get_isServer");
Copy link
Collaborator

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?

Copy link
Contributor Author

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)

Copy link
Collaborator

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 :)

Copy link
Contributor Author

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
Copy link
Collaborator

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

Copy link
Contributor Author

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

Copy link
Contributor Author

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)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@miwarnec miwarnec merged commit b531b4d into MirrorNetworking:mirror Oct 6, 2018
@miwarnec
Copy link
Collaborator

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants