Fix dev UI showing == Any when dependency version isn't installed#404
Open
Goober5000 wants to merge 1 commit intoKnossosNET:mainfrom
Open
Fix dev UI showing == Any when dependency version isn't installed#404Goober5000 wants to merge 1 commit intoKnossosNET:mainfrom
Goober5000 wants to merge 1 commit intoKnossosNET:mainfrom
Conversation
In the package manager dev UI, opening a mod whose dependency targets
a version that isn't currently installed showed the operator as '=='
and the version as 'Any', regardless of what the JSON specified.
The operator-detection block in EditorDependencyItem's constructor was
nested inside `if (currentVersion != null)`, so when the requested
version wasn't found in the installed list, the version dropdown
correctly fell back to 'Any' but the operator type incorrectly stayed
at its default 0 ('==').
Move the operator detection out of that conditional so it always runs,
and surface the requested version as its own dropdown entry when it
isn't installed -- mirroring what the missing-mod branch already does.
Extract the operator detection and operator stripping into two private
static helpers shared by both branches.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
668fe17 to
7374f33
Compare
wookieejedi
approved these changes
May 11, 2026
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.
In the package manager dev UI, opening a mod whose dependency targets
a version that isn't currently installed showed the operator as '=='
and the version as 'Any', regardless of what the JSON specified.
The operator-detection block in EditorDependencyItem's constructor was
nested inside
if (currentVersion != null), so when the requestedversion wasn't found in the installed list, the version dropdown
correctly fell back to 'Any' but the operator type incorrectly stayed
at its default 0 ('==').
Move the operator detection out of that conditional so it always runs,
and surface the requested version as its own dropdown entry when it
isn't installed -- mirroring what the missing-mod branch already does.
Extract the operator detection and operator stripping into two private
static helpers shared by both branches.
Depends on #402; in draft until that is merged.