Skip to content

Commit 9ce7cef

Browse files
authored
RSDK-9898 - fix switch rename (#341)
1 parent 870d952 commit 9ce7cef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ buf:
2222
buf generate buf.build/protocolbuffers/wellknowntypes --path google/protobuf/wrappers.proto
2323
# There's a bug in dart protoc where it doesn't understand that `call` is already taken
2424
$(SED) 's/yield\* call(call, await request);/yield\* this\.call(call, await request);/g' ./lib/src/gen/proto/rpc/webrtc/v1/signaling.pbgrpc.dart
25+
dart run tool/export_protos.dart
2526
#similarly, there's a an issue where protoc generates types named `switch`, not recognizing
2627
# that it's a reserved keyword
27-
find . -type f -name '*.dart' -exec sed -i '' -e 's/viam_protos.component.switch/viam_protos.component.nswitch/g' {} \;
28+
mv lib/src/gen/component/switch lib/src/gen/component/nswitch
29+
find . -type f -name '*.dart' -exec sed -i '' -e 's/viam_protos\.component\.switch/viam_protos\.component\.nswitch/g' {} \;
2830
find . -type f -name '*.dart' -exec sed -i '' -e 's/\/src\/gen\/component\/switch/\/src\/gen\/component\/nswitch/g' {} \;
29-
dart run tool/export_protos.dart
3031

3132
setup:
3233
dart pub global activate cider

0 commit comments

Comments
 (0)