diff --git a/flake.nix b/flake.nix --- a/flake.nix +++ b/flake.nix @@ -284,6 +284,9 @@ rm -f api/tangled/* lexgen --build-file lexicon-build-config.json lexicons sed -i.bak 's/\tutil/\/\/\tutil/' api/tangled/* + # lexgen generates incomplete Marshaler/Unmarshaler for union types + find api/tangled/*.go -not -name "cbor_gen.go" -exec \ + sed -i '/^func.*\(MarshalCBOR\|UnmarshalCBOR\)/,/^}/ s/^/\/\/ /' {} + ${pkgs.gotools}/bin/goimports -w api/tangled/* go run ./cmd/cborgen/ lexgen --build-file lexicon-build-config.json lexicons