Open thestonefox opened 2 years ago
If you install the Tilia packages before installing any other package that uses the Unity version of Mono Cecil then it works as expected.
Packages/manifest.json
to include Tilia scoped registry
"scopedRegistries": [ { "name": "npmjs", "url": "https://registry.npmjs.org/", "scopes": [ "io.extendreality" ] } ],
Packages/manifest.json
e.g. add "io.extendreality.tilia.camerarigs.trackedalias.unity": "1.9.0",
"com.unity.nuget.mono-cecil": "1.10.1"
to Packageds/manifest.json
This is not ideal as it means any tilia package added after the Unity Mono Cecil has been added will cause the issue
This workaround still fails when running a build
Another way of recreating is:
"com.unity.nuget.mono-cecil": "1.10.1"
to Packages/manifest.json
Packages/manifest.json
to include Tilia scoped registry
"scopedRegistries": [ { "name": "npmjs", "url": "https://registry.npmjs.org/", "scopes": [ "io.extendreality" ] } ],
"io.extendreality.malimbe": "9.7.0"
to Packages/manifest.json
FodyWeaver.xml
file to Assets
<?xml version="1.0" encoding="utf-8"?>
* Create a test c# script in the `Assets` directory to use the weaver
using Malimbe.PropertySerializationAttribute; using UnityEngine;
public class NewBehaviourScript : MonoBehaviour { [Serialized] public string MyProp { get; set; } }
* This will create the same infinite loop error
An infinite import loop has been detected. The following Assets were imported multiple times, but no changes to them have been detected. Please check if any custom code is trying to import them: Assets/Test.cs - (Force Reimport)(modified date 2022-03-24T09:43:45.2738359Z)
I've raised a BountySource for this one as it's beyond me
git clone https://github.com/ExtendRealityLtd/Malimbe.git
Sources/Malimbe.sln
in Visual Studio to access the Malimbe code projectRelease
build in Visual Studio and the output will go to Sources/UnityPackaging/bin/Release
package.json
file from the root directory into the Sources/UnityPackaging/bin/Release
directory"io.extendreality.malimbe": "file://<path-to-project>/Sources/UnityPackaging/bin/Release",
I've raised a bug with Unity on this issue as well just on the off chance its an issue with Unity and not a problem with Malimbe 🤞
Not sure if its possible to pack the FodyHelpers and it's version of Mono.Cecil away so it doesn't create a clash
using something like: https://github.com/peters/ILRepack.MSBuild.Task
I have tried this but couldn't get it to work, maybe someone else would have better luck?
@bddckr I know you don't have the time these days, but I'm totally stumped on this one. I've tried everything within my limited knowledge to try get it to work from updating Fody to 6.6.0 (which then has additional issues as things like AssemblyName has been removed since 3.5.5)
to including the latest version of Mono Cecil in Malimbe, but no matter what I do, it just falls over in some area.
Totally understand if you don't have time to view or reply, but I thought it would be worth asking the question anyway 😄
A potential solution I think could be to merge the Mono Cecil dlls into the relevant dlls that rely upon it, then technically Mono Cecil won't need to be included with Malimbe.
Need to investigate if this is feasible and possible and what dlls actually rely on Mono Cecil
If a solution isn't found then the only alternative will be to remove Malimbe from all Tilia packages and Zinnia.
I'm in the process of removing Malimeb from Zinnia
This is the branch that will become the final pull request:
https://github.com/ExtendRealityLtd/Zinnia.Unity/tree/feat/remove-malimbe
Malimbe also needs removing from all Tilia packages
I cannot work out why this issue is occurring, so I'm going to just remove the dependency as its more trouble than its worth.
This is still a going concern in Malimbe but no longer an issue for Zinnia or Tilia packages as now Malimbe has been removed as a dependency
Environment
"com.unity.nuget.mono-cecil": "1.10.1"
Not Recreatable in:
Steps to reproduce
"com.unity.nuget.mono-cecil": "1.10.1"
toPackages/manifest.json
Packages/manifest.json
to include Tilia scoped registry"scopedRegistries": [ { "name": "npmjs", "url": "https://registry.npmjs.org/", "scopes": [ "io.extendreality" ] } ],
Packages/manifest.json
e.g. add"io.extendreality.tilia.camerarigs.trackedalias.unity": "1.9.0",
The problem is compounded when using a Unity package like
"com.unity.netcode.gameobjects": "1.0.0-pre.6",
as it has a dependency on the Unity version of Mono Cecil and will always pull in that third party dependency.Expected behavior
All packages should install correctly
Current behavior
The Malimbe version of Mono Cecil is older than the current Unity installed version and therefore throws a bunch of errors then gets stuck in an infinite loop trying to import assets