Reject internal package version drift, dependency cycles, and runtime-to-integration reverse dependencies before launching the external UPM consumer validation.
1.3 KiB
1.3 KiB
UPM Consumer Validation
Validate-UpmConsumer.ps1 verifies the package graph from outside the main Unity
project. It performs five checks:
- Every dependency on another local
com.cneicy.*package must use that package's currentpackage.jsonversion. - The local package graph must be acyclic.
- A normal package must not depend on a
*-integration-*package. Integration packages may depend on each other, and starter packages may aggregate them. - A temporary Unity project is created under
Temp/UpmConsumerValidation, all local packages are installed throughfile:UPM dependencies, package tests are enabled, and Unity must load every package and asmdef. - The same temporary UPM consumer project runs all package EditMode tests.
Run with the Unity version declared by this repository:
./Tools/UpmConsumerValidation/Validate-UpmConsumer.ps1
Run only the package graph checks without starting Unity:
./Tools/UpmConsumerValidation/Validate-UpmConsumer.ps1 -GraphOnly
Use -UnityEditorPath when the matching editor is not installed in a standard
location. Pass -KeepProject to retain the temporary project, reports, and Unity logs for
investigation. -SkipTests is only for a quick package-resolution diagnostic and is not the
release validation path.