vrchat-community / creator-companion

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

[BUG] VCC 2.2.1 thinks the -beta and non-beta tags on SDK versions are not the same. #390

Open BluWizard10 opened 7 months ago

BluWizard10 commented 7 months ago

Describe the bug

The semver system completely ignores taking -beta and -alpha versioning in the SDK versions into account, causing a semver requirement to ignore the tag completely. This bug makes a glorious return for the worst.

To Reproduce

  1. Try upgrading Gesture Manager to v3.8.8 with SDK 3.5.0-beta.1 installed, since GM v3.8.8 looks for 3.5.x.
  2. You will see it wants to downgrade to SDK v3.4.2, essentially breaking the project.
  3. Try to profit.

Expected behavior

It should have accepted the -beta tag on v3.5.0-beta.1 instead of assuming it should exactly be v3.5.0.

Screenshots

No response

Related Product

VCC (VRChat Creator Companion)

Product Version

2.2.1

OS

Windows 10

Additional context

No response

BluWizard10 commented 7 months ago

CreatorCompanion_hMOKH32D7h

anatawa12 commented 7 months ago

vcc might forget to set includePrereleases of Ranhe.IsSatisfied when resolving packages?

https://github.com/adamreeve/semver.net/blob/8d1b68cff7b733d67dd0b9d2e1422aeb0defbaab/src/SemanticVersioning/Range.cs#L41

I think this is an old bug in VCC but I could not find another issue (I forgot to create issue)

BluWizard10 commented 7 months ago

vcc might forget to set includePrereleases of Ranhe.IsSatisfied when resolving packages?

https://github.com/adamreeve/semver.net/blob/8d1b68cff7b733d67dd0b9d2e1422aeb0defbaab/src/SemanticVersioning/Range.cs#L41

I think this is an old bug in VCC but I could not find another issue (I forgot to create issue)

This might have made a return in the latest VCC releases.

uhKayla commented 7 months ago

This happens with packages that use the 3.5.x versioning as their package requirement. It seems that pre-release suffixes are completely ignored, or it expects the version number to be =>3.5.0 image

BluWizard10 commented 7 months ago

This happens with packages that use the 3.5.x versioning as their package requirement. It seems that pre-release suffixes are completely ignored, or it expects the version number to be =>3.5.0 image

This is exactly what I was afraid of. And it seems 3.5.0 got the -beta tag removed because of it. How funny...

uhKayla commented 7 months ago

The update republishing a package causes 3.5.0 to appear as prod when published without the -beta.1 tag, VRCC needs an update to fix this. image

This image was taken with preview packages DISABLED in CC

meronmks commented 7 months ago

I'm a little concerned that if beta.1 is removed, it would be possible to accidentally include a Unity 2022 compatible SDK with VCC 2.1.4, etc.?

anatawa12 commented 7 months ago

vcc might forget to set includePrereleases of Ranhe.IsSatisfied when resolving packages?

https://github.com/adamreeve/semver.net/blob/8d1b68cff7b733d67dd0b9d2e1422aeb0defbaab/src/SemanticVersioning/Range.cs#L41

I think this is an old bug in VCC but I could not find another issue (I forgot to create issue)

Sorry, I forget I was seeing semver.net v3.0.0-beta.

The origin of this issue is upstream issue adamreeve/semver.net#54 reported by momo and fixed by me in (adamreeve/semver.net/pull/55) and already released as v3.0.0-beta2. I think upgrading semver.net embedded in VCC to 3.0.0-beta2 will fix this problem.