Repository navigation
fix: skip invalid dependency names and versions - #431
Merged
Merged
Conversation
Registry packuments can declare dependency names or versions that do not follow the Unity package rules. Unity's Package Manager validates these entries, logs a warning, and skips them. openupm-cli instead crashed with an unclassified assertion when building package specs and dependency graphs. Validate dependency names and versions while resolving a packument version, warn for each invalid entry, and keep resolving the remaining dependencies. This fixes both 'add' and 'deps --deep' for packages such as com.github.kou-yeung.webglinput, which declares com.unity.ugui@1.0.0~. Dependency versions must now be exact semantic versions, so tag values such as 'latest' or 'stable' in a package's dependencies are skipped with a warning, matching Unity's behavior.
Errors without a specific message were reduced to 'A fatal error occurred.' even with --verbose, which made CLI failures hard to diagnose. Print the error stack and its causes in verbose mode, while keeping the generic message for normal output.
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 2, 2026
## [4.5.3](4.5.2...4.5.3) (2026-11-02) ### Bug Fixes * skip invalid dependency names and versions ([#431](#431)) ([7dc8147](7dc8147))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AssertionErrorfrommakePackageSpec.--verbosemode so future CLI failures are diagnosable.Why
A published package declares
"com.unity.ugui": "1.0.0~", which is not a valid semantic version.openupm addandopenupm deps --deepfailed withA fatal error occurred.even though Unity installs the package normally. See openupm/openupm#7149.Behavior changes
addanddeps --deepsucceed for the reported package.latestorstable, and URL values, in a package's dependencies are skipped with a warning, matching Unity.--verbose.Validation
npm run buildnpm run test:unitnpm run test:integrationaddanddeps --deepsucceed and emit one warning.