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 #1
+3 -3
appview/labels/labels.go
··· 162 162 } 163 163 } 164 164 165 - // reduce the opset 166 - labelOps = models.ReduceLabelOps(labelOps) 167 - 168 165 for i := range labelOps { 169 166 def := actx.Defs[labelOps[i].OperandKey] 170 167 if err := l.validator.ValidateLabelOp(def, repo, &labelOps[i]); err != nil { ··· 173 170 } 174 171 } 175 172 173 + // reduce the opset 174 + labelOps = models.ReduceLabelOps(labelOps) 175 + 176 176 // next, apply all ops introduced in this request and filter out ones that are no-ops 177 177 validLabelOps := labelOps[:0] 178 178 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