Closed TCROC closed 3 years ago
Hello. Depends to Assemby Definition implementation.
What does that mean? I'm pretty sure its a bug. Unity doesn't throw any errors, but consulo does.
Consulo not analyze asmdef. Packages do not have dependencies to Project code. Maybe simple fix - it will add Assemby-CSharp dependency to emb. packages
That sounds like a good fix :)
That sounds like a good fix :)
But Assemby-Csharp(main library) depends to all packages. And now we see recursion in dependencies.
Need understand what Unity add to it. maybe just binaries.
Ah I see what you are saying. Embedded packages normally only occur when we are doing development on the package(s). Because consulo doesn't have asmdef support, what if we just add Embedded packages to Assemby-Csharp? Would that be a better fix?
Emmbedded packages already added to Assemby-CSharp as dependency. In your example, Plugins directory is part main source code, but Package depends to it. Maybe unity just ignore package, and work as one scope. Need analyze project files what unity generate
Yes I agree. I think Unity ignores that Package for Embedded packages and works as one scope. I agree with that.
I'm not sure. I tested with your project. Unity generate VS C# project with this settings for Package(not global scope)
<Compile Include="Packages\com.consulo.bug\Scripts\BrokenEmbeddedPackageScript.cs" />
<Compile Include="Packages\com.consulo.bug\Scripts\Testing.cs" />
<None Include="Packages\com.consulo.bug\consulo.bug.asmdef" />
then Unity dependencies
and
<Reference Include="Newtonsoft.Json">
<HintPath>W:/_github.com/TCROC/ConsuloBug/Assets/Plugins/Newtonsoft.Json.dll</HintPath>
</Reference>
but no code. need more testing . strange
We will be able to do that once we add in asmdef support. That will be the correct way of doing it. But until then, the workaround is to work as one scope. At least that is my current understanding of the situation.
We will be able to do that once we add in asmdef support. That will be the correct way of doing it. But until then, the workaround is to work as one scope. At least that is my current understanding of the situation.
Tested. It's only create dependencies to binaries inside Main sources (to packages). Funny. I will try to fix what, asmdef impl not needed
Test new build
This still has some issues:
The plugin dlls are loading in along with the System.Net.Http that you fixed in the other issue, but Unity.UI, TMPro, and other external libraries are not loading in.
Green Checkmark = working as expected Red X = not working as expected
Added project packages as dependencies to embedded packages. Few min and update ill be arrive
Sounds good. Just let me know when to pull it down :)
build. Need jenkins notifier for github commits
Yay! It appears to be working! :)
I'm going to test it out in our main project quick to verify and if it works I'll close the issue
Ok I think it is resolved. I found this one small issue that is a rare:
In this case, PlayFabMirror depends on PlayFab. PlayFab does not offer their sdk as a UPM as can be seen here. So it has to be installed to the main project. Sometimes we want to build UPM packages to extend that. However, in order to reference that without asmdef support, would have the circular dependency. The only solution that I see to this one is to add support for asmdef files as is being tracked by this issue https://github.com/consulo/consulo-unity3d/issues/186. So for now, I think this is the best solution without asmdef files and this can be closed.
Thanks for fixing it :)
Embedded packages are not correctly loading references to Unity Libraries, Plugins, or external UPM Packages.
Here is the example repo: https://github.com/TCROC/ConsuloBug
The working normal script looks like this as expected:
The broken embedded script looks like this:
OS: Ubuntu 18.04 Unity Version: 2019.4.14f1 Unity Consulo Plugin Version: 2.4.0
Consulo About