diff --git a/std/capnp/c++.capnp b/std/capnp/c++.capnp index 5de849de..fb56ea6d 100644 --- a/std/capnp/c++.capnp +++ b/std/capnp/c++.capnp @@ -24,6 +24,6 @@ $namespace("capnp::annotations"); annotation namespace(file): Text; annotation name(field, enumerant, struct, enum, interface, method, param, group, union): Text; -using Go = import "../go.capnp"; +using Go = import "/go.capnp"; $Go.package("cxx"); $Go.import("zombiezen.com/go/capnproto2/std/capnp/cxx"); diff --git a/std/capnp/gen.sh b/std/capnp/gen.sh index 194e9fd0..433a7d10 100755 --- a/std/capnp/gen.sh +++ b/std/capnp/gen.sh @@ -18,7 +18,7 @@ gen_annotated_schema() { cp "$infile" "$outfile" package_name="$(infer_package_name $outfile)" cat >> "$outfile" << EOF -using Go = import "../go.capnp"; +using Go = import "/go.capnp"; \$Go.package("$package_name"); \$Go.import("zombiezen.com/go/capnproto2/std/capnp/$package_name"); EOF @@ -30,7 +30,7 @@ gen_go_src() { file="$1" package_name="$(infer_package_name $file)" [ -d $package_name ] || mkdir $package_name - capnp compile -ogo:$package_name $file + capnp compile -I"$(dirname $PWD)" -ogo:$package_name $file } usage() { diff --git a/std/capnp/json.capnp b/std/capnp/json.capnp index d46cc716..620f09b3 100644 --- a/std/capnp/json.capnp +++ b/std/capnp/json.capnp @@ -56,6 +56,6 @@ struct JsonValue { params @1 :List(JsonValue); } } -using Go = import "../go.capnp"; +using Go = import "/go.capnp"; $Go.package("json"); $Go.import("zombiezen.com/go/capnproto2/std/capnp/json"); diff --git a/std/capnp/persistent.capnp b/std/capnp/persistent.capnp index c7d958b4..aa9848e1 100644 --- a/std/capnp/persistent.capnp +++ b/std/capnp/persistent.capnp @@ -137,6 +137,6 @@ annotation persistent(interface, field) :Void $Go.name("PersistentAnnotation"); # # Note that absence of the $persistent annotation doesn't mean a capability of that type isn't # persistent; it just means not *all* such capabilities are persistent. -using Go = import "../go.capnp"; +using Go = import "/go.capnp"; $Go.package("persistent"); $Go.import("zombiezen.com/go/capnproto2/std/capnp/persistent"); diff --git a/std/capnp/rpc-twoparty.capnp b/std/capnp/rpc-twoparty.capnp index 19d01e20..cf04a464 100644 --- a/std/capnp/rpc-twoparty.capnp +++ b/std/capnp/rpc-twoparty.capnp @@ -167,6 +167,6 @@ struct JoinResult { # # TODO(cleanup): Change `AnyPointer` to `Capability` when that is supported. } -using Go = import "../go.capnp"; +using Go = import "/go.capnp"; $Go.package("rpctwoparty"); $Go.import("zombiezen.com/go/capnproto2/std/capnp/rpctwoparty"); diff --git a/std/capnp/rpc.capnp b/std/capnp/rpc.capnp index 923993ec..52b823ad 100644 --- a/std/capnp/rpc.capnp +++ b/std/capnp/rpc.capnp @@ -1397,6 +1397,6 @@ using JoinResult = AnyPointer; # provision :ProvisionId; # # `ProvisionId` to send in the `Accept` message. # } -using Go = import "../go.capnp"; +using Go = import "/go.capnp"; $Go.package("rpc"); $Go.import("zombiezen.com/go/capnproto2/std/capnp/rpc"); diff --git a/std/capnp/schema.capnp b/std/capnp/schema.capnp index a62c8311..e5c62144 100644 --- a/std/capnp/schema.capnp +++ b/std/capnp/schema.capnp @@ -482,6 +482,6 @@ struct CodeGeneratorRequest { } } } -using Go = import "../go.capnp"; +using Go = import "/go.capnp"; $Go.package("schema"); $Go.import("zombiezen.com/go/capnproto2/std/capnp/schema");