vrchat-community / creator-companion

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

[BUG 2.1.3] Packages without com.vrchat.worlds explicitly defined in vpmDependencies, attempt to force update sdk packages. #354

Closed techanon closed 8 months ago

techanon commented 11 months ago

Describe the bug

Given a user package that does not have the com.vrchat.worlds defined in the vpmDependencies, When attempting to update or add the user package to a project, Then it attempts to update the SDK/Worlds packages to the latest viable version (does try to resolve it so it matches the requirements of all the other packages as well).

The expected behaviour would be to leave the SDK/Worlds packages as the current imported version so long as it matches the required version ranges, rather than force update due to the dependency not being explicitly defined.

To Reproduce

  1. Create/Have custom user package, do not provide the com.vrchat.worlds dependency.
  2. Have project with a non-latest SDK/Worlds package.
  3. Attempt to add the package via VCC project management.

Expected:

Expected behavior

Expected: package added without worlds updated.

Actual: Get prompt about worlds package update (including the beta if show prerelease is enabled if it satisfies all version matches)

Screenshots

No response

Related Product

VCC (VRChat Creator Companion)

Product Version

2.1.3

OS

Windows 10

Additional context

Alternative scenario that might be related: have two packages involved. Package B depends on package A depends on the world SDK. Package B has no world SDK version defined, but package A does. Attempting upgrade with package B attempts to force update world SDK up to the latest version satisfied by package A's dependecy.

orels1 commented 10 months ago

@techanon can you check if this is still an issue in 2.1.5? There have been some issues with things mutating the package-lock incorrectly, and it might have had a lot of knock-on effects like this one.

techanon commented 8 months ago

As of VCC 2.2.3, the primary issue is no longer manifest. I was able to add a package which did not specify the worlds version and the tool did not try to update the worlds or SDK as the expected condition states. 👍🏼

As for the alternative scenario, I was able to add the Package B (dependency on Package A) to the project without the worlds or SDK being upgraded, as I would expect.

This issue is resolved.