Skip to content

Commit

Permalink
Re-enable PC updates for indexed properties
Browse files Browse the repository at this point in the history
A previous change reverted behavior that ignored indexed property
updates in favor of a panic. While we don't implement persistence
for partial updates, some consumers rely on this behavior to test property
collector updates on specific fields.

This change reverts a03f4735570027d2e6e2bc9cb7584a0af19f9353q to the
previous behavior allowing downstream consumers to rely on this field
for testing PC updates until full support for indexed fields is
implemented.

Closes #3349
  • Loading branch information
brakthehack committed Jan 30, 2024
1 parent b6c6bef commit 25cab09
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vim25/mo/retrieve.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ func ApplyPropertyChange(obj Reference, changes []types.PropertyChange) {
for _, p := range changes {
rv, ok := t.props[p.Name]
if !ok {
panic(p.Name + " not found")
// For now, skip unknown properties allowing PC updates to be triggered
// for partial updates (e.g. extensionList["my.extension"]).
// Ultimately we should support partial updates by assigning the value
// reflectively in assignValue.
continue
}

assignValue(v, rv, reflect.ValueOf(p.Val))
Expand Down

0 comments on commit 25cab09

Please sign in to comment.