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

Updated Tomlyn dll with latest version (0.16.2) #34

Merged
merged 4 commits into from
Aug 29, 2023

Conversation

Gilford92
Copy link

Updated Tomlyn dll with latest version (0.16.2)
Updates from Unity to the file "UpgradePackagesManager.cs" due to new api

Updates from Unity due to new api
@jespersmith
Copy link
Contributor

Is there any technical reason to not prefix the DLL with a hash? I did that to avoid conflicts in the past, best to keep doing it if it doesn't break the the entities package.

if(hasVerified)
{
try
{
verifiedVersion = SemVer.Parse(info.versions.verified);
verifiedVersion = SemVer.Parse(info.versions.recommended);
Copy link
Contributor

Choose a reason for hiding this comment

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

Breaks Unity 2021/2022.

Copy link
Author

Choose a reason for hiding this comment

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

Added precompiled check to avoid issues with previous versions of Unity

@jespersmith
Copy link
Contributor

I've to make some changes to maintain compatibilty with older versions of Unity that we use internally

@@ -11,9 +11,9 @@
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [
"860BB79D.Tomlyn.dll",
Copy link
Contributor

@StephenHodgson StephenHodgson Aug 21, 2023

Choose a reason for hiding this comment

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

does changing the name also recrecate collision from #25 & #16 ?

Copy link
Author

Choose a reason for hiding this comment

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

No idea, but as said in the previous comment I need to make this change otherwise the Entities package will not work.

Is there a way to test if #16 is not a problem anymore?

@Gilford92
Copy link
Author

Is there any technical reason to not prefix the DLL with a hash? I did that to avoid conflicts in the past, best to keep doing it if it doesn't break the the entities package.

Unfortunately this is necessary to make the Entities package work. If I don't rename it the exception cited in the linked issue will be back and you cannot use Halodi with Entities package.

You can simply test it in this way:

  • Create a new project with halodi package
  • Rename Tomlyn.dll to 860BB79D.Tomlyn.dll
  • Download the Entities package from Unity package manager
  • You are gonna see the exception cited in the issue

I think this is happening because of the reply in this report
https://issuetracker.unity3d.com/issues/warnings-are-logged-for-editor-only-assemblies-when-building-project

Basically when there are "multiple assemblies with the same name in a project, we'll automatically pick up the highest version available in the project". So I think that because Tomlyn.dll in Entities package and the one in Halodi will have a different name, Unity tries to import both of them causing conflicts between these 2. But this is my supposition.

@StephenHodgson
Copy link
Contributor

StephenHodgson commented Aug 27, 2023

Sounds like Unity needs to pull Tomlyn out into its own package like they did with Newtonsoft

@jespersmith
Copy link
Contributor

Thanks for the changes, I'll merge it. If Tomlyn still breaks, an old comment of mine would be the solution

Not sure how to fix the Tomlyn issue. I can unpack Tomlyn and make an assembly reference instead, which would solve this warning. Not sure about the disadvantages.

@jespersmith jespersmith merged commit c53ed7b into 1x-technologies:main Aug 29, 2023
@Gilford92 Gilford92 deleted the update-tomlyn-dll branch August 29, 2023 09:59
hybridherbst added a commit to needle-tools/package-credentials that referenced this pull request Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants