The Creator Companion 2.5.0 update introduces multiple new keys, including
onboardingCompleted
and
enabledRepos
, these new keys are missing from the current Package Resolver Tool release (0.1.29) and no "beta" has been made available.
The
Resolver
class provided within the same package executes several methods that lead to
Settings.Load()
and internal calls to
Settings.SanitizeUserRepos()
(which performs
Settings.Save()
within
Settings.Load()
)
Additionally, while not exactly documented and not part of the "public API" (and thus could be broken at any time), the package contains full functionality to add/remove repositories from VCC, as well as add/remove packages, when said functionality is utilized,
Settings.Load()
and
Settings.Save()
may be used as well.
This results the
settings.json
file being written with an older version of the data structure, removing the newer keys from the file.
Updating the package will address the data structure mismatch for now, but this issue will come up again with future updates to the data structure, and projects using older packages will persistently be an issue (more-so than VCC being downgraded, which would cause similar issues).
There are several ways to tackle this this:
  1. Split the newer properties to a separate class/file
Downside: Same issue arises if either file contains new properties in the future.
  1. Migrate to a file-name versioned "settings.json" i.e. "settings-v2.json"
Downside: Older packages may reference outdated data within older-versioned files (i.e. repositories list may no longer match)
  1. Use one of various ways to preserve keys that aren't present in the "current" data structure.
Downside: Does not address older package versions that do not contain this functionality, so this may need to be combined with #2.
Also posted on GitHub with additional context and reproduction steps https://github.com/vrchat-community/creator-companion/issues/598