mirror of
https://github.com/comma-hacks/webrtc.git
synced 2025-09-26 20:21:26 +08:00
deal with collision by annotating
https://github.com/capnproto/go-capnproto2/issues/457
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +1,6 @@
|
||||
[submodule "cereal"]
|
||||
path = cereal
|
||||
url = https://github.com/commaai/cereal.git
|
||||
[submodule "go-capnproto2"]
|
||||
path = go-capnproto2
|
||||
url = https://github.com/capnproto/go-capnproto2.git
|
||||
|
13
compile.sh
13
compile.sh
@@ -11,11 +11,18 @@ for f in ../../*.capnp; do
|
||||
echo "using Go = import \"/go.capnp\";" > $out
|
||||
echo "\$Go.package(\"cereal\");" >> $out
|
||||
echo "\$Go.import(\"cereal\");" >> $out
|
||||
cat $f | grep -v 'c++.capnp' | grep -v '$Cxx.namespace' >> $out
|
||||
cat $f |\
|
||||
# Remove the C++ imports
|
||||
grep -v 'c++.capnp' | grep -v '$Cxx.namespace' |\
|
||||
# Avoid collisions by annotating
|
||||
sed 's/message @6 :Text;/message @6 :Text $Go.name("text");/'\
|
||||
>> $out
|
||||
done
|
||||
go install capnproto.org/go/capnp/v3/capnpc-go@latest
|
||||
capnp compile -I$(go env GOPATH)/src/capnproto.org/go/capnp/std -o go:../../gen/go *.capnp
|
||||
# go install capnproto.org/go/capnp/v3/capnpc-go@latest
|
||||
# capnp compile -I$(go env GOPATH)/src/capnproto.org/go/capnp/std -o go:../../gen/go *.capnp
|
||||
capnp compile -I../../../go-capnproto2/std -o go:../../gen/go *.capnp
|
||||
popd # leave ./tmp/go
|
||||
rm -rf tmp
|
||||
|
||||
## Services
|
||||
|
||||
|
1
go-capnproto2
Submodule
1
go-capnproto2
Submodule
Submodule go-capnproto2 added at 285a677057
Reference in New Issue
Block a user