ExtendRealityLtd / Malimbe

[Obsolete - No longer maintained] A collection of tools to simplify writing public API components for the Unity software.
MIT License
51 stars 11 forks source link

Expose Cecil to Editor #70

Closed hawkwood closed 2 years ago

hawkwood commented 2 years ago

Is your feature request related to a problem?

Some other packages require Cecil for weaving, but installing NuGet version conflicts with this one.

Describe the solution you'd like

A solution is to expose this version to Unity Editor so that other packages can use it rather than the NuGet version.

Describe alternatives you've considered

I tried removing Cecil from this package and using NuGet version overall but I could not get it to work.

Additional context

Please expose all 4 Cecil DLLs by changing the import settings to checking the Editor box under "Include Platforms"

thestonefox commented 2 years ago

This isn't actually going to fix the issue, if you include another unity package that has a dependency on their version of Mono.Cecil then it will give errors surrounding duplicate errors. If you remove the unity mono.cecil package manually then unity will just auto bring it back if another package depends on it.

There is a new issue open that is attempting to fundamentally address this issue on all levels so I'll close this one

https://github.com/ExtendRealityLtd/Malimbe/issues/72

hawkwood commented 2 years ago

The other package in my case is Photon Fusion which requires Cecil to be manually installed through package manager. This solution is exactly what I need as I already implemented it by moving Malimbe out to packages folder, and updating the AsmDef. I had additional steps to take in the Fusion AsmDefs, but it is working.

thestonefox commented 2 years ago

Yeah for any package that wants you to install Mono Cecil manually then this would work for, but it can't be the solution for Malimbe because any package that just references Mono Cecil via its package,json will always try and re-import it if you remove the package manually from the cache and then will always clash.