mob-sakai / UpmGitExtension

This package extends the UI of Unity Package Manager (UPM) for the packages installed from git repository.
MIT License
773 stars 80 forks source link

Support 2023.2 #139

Closed mob-sakai closed 11 months ago

mob-sakai commented 1 year ago
Packages/dev/Editor/Coffee.UpmGitExtension/GitPackageDataBase.cs(267,45): error CS1503: Argument 1: cannot convert from 'System.Collections.Generic.IEnumerable<UnityEditor.PackageManager.UI.Internal.IPackage>' to 'System.Collections.Generic.IList<UnityEditor.PackageManager.UI.Internal.IPackage>'
BarionLP commented 11 months ago

any progress on this? I can help if you want

mob-sakai commented 11 months ago

Hi @BarionLP , I think the following 3 steps:

Step 1: Prepare the project for version 3.x

In preparation for Step 3, the project involves disruptive changes. This is an opportune moment to reconsider the project's directory structure (moving from a package on the root to a Unity project on the root). The elimination of submodules will lower the barrier for pull requests, providing overall benefits for the sustained development of this project.

The branch strategy will be updated as follows:

The following branches will be deprecated:

Step 2: Fix compile errors

As mentioned in this issue, it is imperative to rectify the compile errors.

Step 3: Modify the approach for obtaining repository metadata

Starting from Unity version 2022.3.11f1, nodejs is no longer built into the editor. (#138) Therefore, one of the following options is necessary:

mob-sakai commented 11 months ago

Please share ideas or methods for addressing Step 2 and Step 3. :+1:

BarionLP commented 11 months ago

sounds like a lot of refactoring...

I'd recommend rewriting the js part in .net so everything runs in the same framework (usually makes things easier...) I might be missing something but I don't think you need a standalone app for that

mob-sakai commented 11 months ago

To construct repository metadata, it is necessary to sequentially execute a series of asynchronous git commands (such as clone, listing refs, checkout, etc.).

In UnityEditor, handling the execution state of editor scripts becomes challenging due to domain reloads triggered by compilation, changes in play mode, and the termination of the editor. In other words, one needs to consider which command has been executed, whether the last command is still running, and whether the output of the command has been processed.

In a standalone scenario, you can use semaphores to determine if all processes have completed. If the processing is successful, generate the metadata file, and post-process, such as updating the package list by watching it. Resuming the watch even after a domain reload ensures the continuous retrieval of accurate metadata.

mob-sakai commented 11 months ago

I'd recommend rewriting the js part in .net so everything runs in the same framework (usually makes things easier...)

I agree. :+1: It would be more maintainable to rewrite in .NET. This generally simplifies things and enhances maintainability compared to implementing in multiple frameworks.

mob-sakai commented 11 months ago

I have resolved the compilation errors and the issue with the Node.js runtime. :+1: However, there is another problem: the UI has undergone significant updates in 2023.2...

image
mob-sakai commented 11 months ago

I fixed it.

image
mob-sakai commented 11 months ago

Step 1: Prepare the project for version 3.x

Step 2: Fix compile errors

Step 3: Modify the approach for obtaining repository metadata

mob-sakai commented 11 months ago

Fixed version v2.1.0 has been released!