go scratch code for atproto

tweak some 'TODO'

+3 -10
-1
cmd/glot/lex_diff.go
··· 77 77 json.Unmarshal(localJSON, &outJSON) 78 78 config := formatter.AsciiFormatterConfig{ 79 79 //ShowArrayIndex: true, 80 - // TODO: Coloring: c.Bool("coloring"), 81 80 Coloring: true, 82 81 } 83 82 formatter := formatter.NewAsciiFormatter(outJSON, config)
-1
cmd/glot/lex_publish.go
··· 73 73 } 74 74 75 75 cdir := identity.DefaultDirectory() 76 - // TODO: could defer actual login until later? 77 76 c, err := atclient.LoginWithPassword(ctx, cdir, *atid, pass, "", nil) 78 77 if err != nil { 79 78 return nil
-1
cmd/glot/lex_unpublish.go
··· 52 52 } 53 53 54 54 cdir := identity.DefaultDirectory() 55 - // TODO: could defer actual login until later? 56 55 c, err := atclient.LoginWithPassword(ctx, cdir, *atid, pass, "", nil) 57 56 if err != nil { 58 57 return nil
+3 -7
cmd/glot/lexlint/breaking.go
··· 54 54 func breakingDefs(nsid syntax.NSID, name string, local, remote lexicon.SchemaDef) []LintIssue { 55 55 issues := []LintIssue{} 56 56 57 - // TODO: in some situations this sort of change might actually be allowed? 57 + // NOTE: in some situations this sort of change might actually be allowed? 58 58 if reflect.TypeOf(local) != reflect.TypeOf(remote) { 59 59 issues = append(issues, LintIssue{ 60 60 NSID: nsid, ··· 107 107 } 108 108 // TODO: do Errors matter? 109 109 // TODO: lexicon.SchemaSubscription (and SchemaMessage) 110 - // TODO: lexicon.SchemaPermissionSet (and SchemaPermission) 111 110 case lexicon.SchemaBody: 112 111 r := remote.Inner.(lexicon.SchemaBody) 113 112 if l.Encoding != r.Encoding { ··· 295 294 }) 296 295 } 297 296 issues = append(issues, breakingMaps(nsid, l.Properties, r.Properties)...) 298 - case lexicon.SchemaToken: 299 - // pass 300 297 case lexicon.SchemaRef: 301 298 r := remote.Inner.(lexicon.SchemaRef) 302 299 if l.Ref != r.Ref { ··· 312 309 case lexicon.SchemaUnion: 313 310 r := remote.Inner.(lexicon.SchemaUnion) 314 311 if !eqOptBool(l.Closed, r.Closed) { 315 - // TODO: going from default to explicit should be ok... 316 312 issues = append(issues, LintIssue{ 317 313 NSID: nsid, 318 314 LintLevel: "error", ··· 321 317 Message: fmt.Sprintf("union open/closed type changed (%s)", name), 322 318 }) 323 319 } 324 - // TODO: closed union and refs change 320 + // check for refs changing in closed union 325 321 if l.Closed != nil && *l.Closed { 326 322 sort.Strings(l.Refs) 327 323 sort.Strings(r.Refs) ··· 335 331 }) 336 332 } 337 333 } 338 - case lexicon.SchemaUnknown: 334 + case lexicon.SchemaUnknown, lexicon.SchemaPermissionSet, lexicon.SchemaToken: 339 335 // pass 340 336 default: 341 337 slog.Warn("unhandled schema def type in breaking check", "type", reflect.TypeOf(local.Inner))