Open anatawa12 opened 1 year ago
We're planning to implement this in one of the upcoming releases. The files will use the following format:
<id>-<first 8 characters of a guid>.json
for jsons with an id specifiedid
field - a pure <guid>.json
is usedWe decided to go with the id + guid chunk approach because some listings (e.g. vrlabs generated listings) use the same id with different URLs. Which is not fully supported by VCC, but can work, and this means that duplicate ids won't collide while keeping the readability.
There will be an open beta for this change to ensure anything that interacts with these files - can update.
This will be targeting version 2.4.0.
Will it be migrated for existing repos? (I think it's not necessary)
@anatawa12 yes, it will auto migrate existing jsons when they're used (old ones will simply get deleted and the new ones will get created on first save). So you dont have a bunch of old stuff sticking around for no reason.
There will also be an open beta for both CLI and VCC to make sure this goes smoothly.
This is available in the VCC 2.4.0-beta.1 as well as the new CLI
VCC: https://github.com/vrchat-community/creator-companion/releases/tag/2.4.0-beta.1
CLI: dotnet tool install -g VRChat.VPM.CLI --version 0.1.28-beta.1
It looks migration feature is broken.
it looks Path in settings.json is not updated and old file is not removed.
Steps to reproduce (A)
<uuid>.json
in settings.json and three of <id>-<random>.json
in Repos
directory.Steps to reproduce (B)
VCCUserDataPortable
directory with keeping local cached repository in Repos directory<id>.json
and the others have <uuid>.json
) and three of <id>-<random>.json
in Repos
directory.Also, there are one problem with checking new behavior.
It looks "Copy Live Settings and Data" does not copy Repos direcotry. This prevent us from checking migrating .json file name. I copied %LOCALAPPDATA%\VRChatCreatorCompanion
to VCCUserDataPortable
and modified settings.json
manually to workaround this problem.
I found that with CLI version of VCC, it looks path in settings.json
is successfully migrated and original file looks removed.
Thanks for checking. Manually copying files and updating setting.json is how this was tested, since as you mentioned - the "Copy Live Settings and Data" doesn't copy the cache.
VCC currently looks specifically for the old UUID pattern, so any other pattern will not be migrated (this is on purpose, since people can technically add repos from any local json files via CLI).
Unfortunately I am unable to reproduce neither of your scenarios on 2 different machines (they do not produce <uuid>.json
files for me).
I also did what we did initially to test the migration (which is what you pointed out as well), copied all the contents of VRChatCreatorCompanion
from AppData and into VCCUserDataPortable
and then updated paths in settings.json
and launched the 2.4.0 beta VCC. And it worked correctly as well.
Could you provide some more details? Which particular repositories do not get updated? Do they have a proper ID field?
Here are some steps for reference, maybe you can point to where am I testing differently to what you're doing.
LIVE VCC Repos Folder
BETA VCC Repos Folder before launching (exact copy of LIVE)
BETA VCC Settings file after changing paths to point to portable install
BETA VCC Repos Folder after launching and going to any Manage Project page or to Settings -> Packages
BETA VCC Settings file afterwards
Testing was done on 2 Windows 11 machines on 22H2 and 23H2 updates
VCC currently looks specifically for the old UUID pattern, so any other pattern will not be migrated (this is on purpose, since people can technically add repos from any local json files via CLI).
I think that's fine, but UUID pattern files still not migrated in my environment.
Could you provide some more details?
First of all, this is the video shows How I did tested the behavior and log file for the launch. Is there anything bad I did?
20241013T145816-1b6a778aa9ff4dab84d64f39d7c67103-log.txt
https://github.com/user-attachments/assets/2fa4dac9-f6d9-4609-a6ef-63f743cfdd67
Which particular repositories do not get updated?
All repositories with <uuid>.json
are not get updated.
In addition,Three of <id>-<8 hex random>.json
will be generated for both repositories with <uuid>.json
(generated with older VCC or older vrc-get) or <id>.json
(generated with newer vrc-get).
Do they have a proper ID field?
Yes, at least for two of <uuid>.json
@anatawa12 sorry just got to your video
In your footage you missed one more \\Repos
As you can see your path before the <guid>.json
ends in ...\\VCCUserDataPortable
, while it should be ...\\VCCUserDataPortable\\Repos
Like you can see in my picture
There seems to be some logic missing for updating the path if the cache file is non existent (or just points to the wrong place like in the cause you shown), but that's a bit of a different issue. I'll add handling for that in the meantime though.
Oh sorry. That's my mistake and with fixed path it looks no problems with migration process
Thank you for confirming!
The issue with setting.json entries not being updated with the new paths if the paths were incorrect will also be fixed in 2.4.0 public release
Is your feature request related to a problem? Please describe. When we see
VRChatCreatorCompanion/Repos
folder, there're many<uuid>.json
in that folder. That's not good for understanding which json is for which repo.Describe the solution you'd like I want VCC to create file with repo id at the time we installed the repository if it's good name for file name.
Describe alternatives you've considered Use
<url>.json
but url will have slashes so it's not good for file name.Additional context Add any other context or screenshots about the feature request here.
In my own vpm client, this is implemented. In my client, if the id matches the regex
[0-9a-zA-Z._-]+
, try to create<id>.json
and if it's not possible (e.g. already exists), fallback to<uuid>.json
. As far as I know, wide range of vpm-resolver supports non uuid json name in settings.json.