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

Generic Writer Extension methods cause IL errors #1066

Closed
James-Frowen opened this issue Apr 7, 2022 · 1 comment
Closed

Generic Writer Extension methods cause IL errors #1066

James-Frowen opened this issue Apr 7, 2022 · 1 comment
Labels
bug Something isn't working released Weaver

Comments

@James-Frowen
Copy link
Member

Weaver tries to add functions like generic methods to Writer<T>

static void WriteGameAsset<T>(this NetworkWriter writer, T asset) { ... }
Writer<!!0>.Write = new Action<NetworkWriter, !!0>(SerializationExtensions.WriteGameAsset);

Fix

Weaver should ignore these methods

Quick workaround

add [WeaverIgnore] manually to the method

@James-Frowen James-Frowen added bug Something isn't working Weaver labels Apr 7, 2022
James-Frowen added a commit that referenced this issue Jul 7, 2022
generic extension methods should be ignored by weaver.

fixes: #1066
github-actions bot pushed a commit that referenced this issue Jul 16, 2022
## [123.3.2](v123.3.1...v123.3.2) (2022-07-16)

### Bug Fixes

* fixing warning created from id generator ([eaee748](eaee748))
* **Weaver:** fixing extension methods for unity2021 ([7f35778](7f35778))
* **Weaver:** fixing generic check on extension methods ([fddf9ea](fddf9ea)), closes [#1066](#1066)
* **Weaver:** fixing WeaverDiagnosticsTimer for when directory is not found ([eb880d5](eb880d5))

### Performance Improvements

* avoiding call to find NetworkIdentity ([7947e9e](7947e9e))
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 123.3.2 🎉

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
bug Something isn't working released Weaver
Projects
None yet
Development

No branches or pull requests

1 participant