Monorepo for Tangled tangled.org

appview/labels: reduce the opset after validation #605

merged opened by oppi.li targeting master from push-plpuqtyrprou

validation also performs a transformation upon labels: it resolves handles to DIDs, it is important that this transform be present when determining redundant ops.

Signed-off-by: oppiliappan me@oppi.li

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:qfpnj4og54vl56wngdriaxug/sh.tangled.repo.pull/3lzqfzwoi5o22
+3 -3
Diff #0
+3 -3
appview/labels/labels.go
··· 152 152 } 153 153 } 154 154 155 - // reduce the opset 156 - labelOps = models.ReduceLabelOps(labelOps) 157 - 158 155 for i := range labelOps { 159 156 def := actx.Defs[labelOps[i].OperandKey] 160 157 if err := l.validator.ValidateLabelOp(def, &labelOps[i]); err != nil { ··· 163 160 } 164 161 } 165 162 163 + // reduce the opset 164 + labelOps = models.ReduceLabelOps(labelOps) 165 + 166 166 // next, apply all ops introduced in this request and filter out ones that are no-ops 167 167 validLabelOps := labelOps[:0] 168 168 for _, op := range labelOps {

History

2 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
appview/labels: reduce the opset after validation
expand 0 comments
pull request successfully merged
oppi.li submitted #0
1 commit
expand
appview/labels: reduce the opset after validation
expand 0 comments