Open anatawa12 opened 4 months ago
Hey You pretty much described the plan we had. While there is no finalized path for it just yet, this was the general idea for when the switchover happens:
There is also a potential of introducing the version
int in the settings file to make tracking such changes a little easier on the developer side.
If you have any concerns with that approach, I'd love to hear them.
I think final migration path is no problem and introducing version field might also be good it was introduced much before actual change.
However, I have concerns about the current behavior if VCC with settings.json without userProjects field as described before. It will erase all projects in vcc.litedb. This behavior will remove projects unexpectedly by using legacy vcc or vpm cli. As a countermeasure to this problem, I think VCC should detect absence of userProjects field and should not clear projects in vcc.litedb.
I see, I suppose that's reasonable. We generally see pretty high adoption of current versions, but in case of unexpected bugs its not uncommon for people to use older versions.
I think the best approach would be to roll this out in stages.
version: 1
to the settings file alongside this so that the VCC could alter the logic going forwardvcc-backup.litedb
userProjects
keyThis way we could instruct people who are using really outdated VCC/other tool versions that enforce parity between settings and litedb to update and "restore" their litedb from a backup
Just to note that this isn't the final plan by any means, more of a proposal
Hello, I'm a developer of several compatible vpm clients.
In the current VCC (v2.3.1), projects does not exist in the
settings.json
will be removed fromvcc.litedb
and projects do exist insettings.json
are added tovcc.litedb
.According to this comment by orels1 and VCC 2.2.0 release note, this migration will be removed in the future version of VCC.
However, Current mechanism for syncing projects between
settings.json
andvcc.litedb
will cause several problems when the sync is removed, so I want to discuss and suggest about this.The problems
The current VCC and VPM CLI's mechanism for syncing projects between
settings.json
andvcc.litedb
is like as follows:userProjects
field insettings.json
is null or field does not exist, it will be initialized as an empty array.userProjects
, it will be removed from vcc.litedb.userProjects
, if the project does not exist in vcc.litedb, it will be added to vcc.litedb.However, this would cause problems when the sync is removed:
userProjects
field ofsettings.json
after migration deletion, all projects invcc.litedb
will be removed when an older version of VPM CLI or ALCOM is used.userProjects
field ofsettings.json
and just stop updating them, some newly added projects invcc.litedb
will be removed and removed projects will be added again when an older version of VPM CLI or ALCOM is used.In addition, the lack of information about after migration deletion makes it difficult to prepare for the future. For example, I can imagine a tool that adds projects to VCC (Tool A). For current VCC Compatibility, Tool A should add a project to both
settings.json
andvcc.litedb
. On the other hand, if the migration is removed, Tool A might be better to add a project only tovcc.litedb
. However, there is no way to know whether the migration is removed or not.The solutions
To solve these problems, I suggest the following solutions:
userProjects
field insettings.json
is absent or null, it should be kept as it is and do not migrate projects. This should fix both problems 1 and 2 if the older version of VPM CLI, ALCOM and VCC follow this rule.userProject
field is absent insettings.json
, it should mean migration is removed so tools that manage project should only seevcc.litedb
.How do you think about this? I don't know how VRChat thinks of compatibility with older versions, but I want to keep the compatibility as much as possible so that users can use the tools they like. That's why I opened issue here.