Skip to content

Commit

Permalink
RSDK-9898 - fix switch rename (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
stuqdog authored Feb 18, 2025
1 parent 870d952 commit 9ce7cef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ buf:
buf generate buf.build/protocolbuffers/wellknowntypes --path google/protobuf/wrappers.proto
# There's a bug in dart protoc where it doesn't understand that `call` is already taken
$(SED) 's/yield\* call(call, await request);/yield\* this\.call(call, await request);/g' ./lib/src/gen/proto/rpc/webrtc/v1/signaling.pbgrpc.dart
dart run tool/export_protos.dart
#similarly, there's a an issue where protoc generates types named `switch`, not recognizing
# that it's a reserved keyword
find . -type f -name '*.dart' -exec sed -i '' -e 's/viam_protos.component.switch/viam_protos.component.nswitch/g' {} \;
mv lib/src/gen/component/switch lib/src/gen/component/nswitch
find . -type f -name '*.dart' -exec sed -i '' -e 's/viam_protos\.component\.switch/viam_protos\.component\.nswitch/g' {} \;
find . -type f -name '*.dart' -exec sed -i '' -e 's/\/src\/gen\/component\/switch/\/src\/gen\/component\/nswitch/g' {} \;
dart run tool/export_protos.dart

setup:
dart pub global activate cider
Expand Down

0 comments on commit 9ce7cef

Please sign in to comment.