vrchat-community / creator-companion

The Entry Point for Making Things in VRChat
https://vrchat.com/home/download
54 stars 371 forks source link

[BUG] Packages with `localPath` (Av3Emulator) canot be installed with VCC 2.1.5 #368

Closed anatawa12 closed 9 months ago

anatawa12 commented 9 months ago

Describe the bug

Packages with localPath in package manifest (e.g. Av3Emulator) canot be installed with VCC 2.1.5

To Reproduce

  1. Create project with Avatars template
  2. Remove cache file for Av3Emulator
  3. try to install Av3Emulator from curated repository
  4. The following error occurs
2023-10-15 00:05:23.334 +09:00 [INF] Looking for Legacy Packages to Upgrade by Scanning Folders within lyuma.av3emulator
2023-10-15 00:05:27.947 +09:00 [ERR] Could not copy package C:\Program Files (x86)\VRChat Creator Companion\Packages\lyuma.av3emulator: Source directory does not exist or could not be found: C:\Program Files (x86)\VRChat Creator Companion\Packages\lyuma.av3emulator
2023-10-15 00:05:29.541 +09:00 [INF] Looking for Legacy Packages to Upgrade by Scanning Folders within lyuma.av3emulator
2023-10-15 00:05:29.553 +09:00 [INF] Added package lyuma.av3emulator to project D:\UnityProjects\New Avatars Test 3
2023-10-15 00:05:29.563 +09:00 [INF] Package lyuma.av3emulator@3.2.3 added successfully

Expected behavior

Installs Av3Emulator

Screenshots

No Screenshots~

Related Product

VCC (VRChat Creator Companion)

Product Version

VCC 2.1.5, Resolver 0.1.25

OS

Windows 11

Additional context

It might be possible to install any folder to unity project.

We can workaround this issue by installing the package with older version of VCC / resolver

orels1 commented 9 months ago

Good catch, although having localpath in the package is the intended way to indicate that the package shouldn't be fetched from the remote location.

We should improve documentation around that as I am struggling to find it documented anywhere, which makes me wonder how AV3 Emulator even ended up with that key in their json. We only really used it for automated testing to allow packages to be loaded from local listings of local folders

orels1 commented 9 months ago

However, the fact that the package creator can, in that way, force any folder to be copied into the unity project is not a good thing to have, so I think we should just change how this is handled in the newer versions of the VCC

anatawa12 commented 9 months ago

I think the reason why av3emu use localPath is that package maker adds that property. If you want creators not to use localpath, I think it's better to not include in package maker-created packages.

jameskitt616 commented 9 months ago

Same Issue exists for poiyomi, if you try to add it in vcc 2.5.1 https://poiyomi.github.io/vpm/

orels1 commented 9 months ago

This will be addressed in the next release

momo-the-monster commented 9 months ago

Fixed in VCC 2.1.6!