···6363 go run ./gen
64646565To run codegen for new or updated Lexicons, using lexgen, first place (or git
6666-checout) the JSON lexicon files `$SOMEWHERE`. Also, install the `goimports`
6666+checout) the JSON lexicon files at `../atproto/`. Also, install the `goimports`
6767tool. Then, in *this* repository (indigo), run commands like:
68686969- go run ./cmd/lexgen/ --package bsky --prefix app.bsky --outdir api/bsky $SOMEWHERE/lexicons/app/bsky/
7070- go run ./cmd/lexgen/ --package atproto --prefix com.atproto --outdir api/atproto $SOMEWHERE/lexicons/com/atproto/
6969+ go run ./cmd/lexgen/ --package bsky --prefix app.bsky --outdir api/bsky ../atproto/lexicons/app/bsky/
7070+ go run ./cmd/lexgen/ --package atproto --prefix com.atproto --outdir api/atproto ../atproto/lexicons/com/atproto/
71717272You may want to delete all the codegen files before re-generating, to detect deleted files.
7373···7676To generate server stubs and handlers, push them in a temporary directory
7777first, then merge changes in to the actual PDS code:
78787979- go run ./cmd/lexgen/ --package pds --gen-server --types-import com.atproto:github.com/bluesky-social/indigo/api/atproto --types-import app.bsky:github.com/bluesky-social/indigo/api/bsky --outdir pds $SOMEWHERE/lexicons
8080-8179 mkdir tmppds
8282- go run ./cmd/lexgen/ --package pds --gen-server --types-import com.atproto:github.com/bluesky-social/indigo/api/atproto --types-import app.bsky:github.com/bluesky-social/indigo/api/bsky --outdir tmppds --gen-handlers $SOMEWHERE/lexicons
8080+ go run ./cmd/lexgen/ --package pds --gen-server --types-import com.atproto:github.com/bluesky-social/indigo/api/atproto --types-import app.bsky:github.com/bluesky-social/indigo/api/bsky --outdir tmppds --gen-handlers ../atproto/lexicons
838184828583## tips and tricks