Skip to content

Commit

Permalink
std/capnp: fix gen.sh include path
Browse files Browse the repository at this point in the history
  • Loading branch information
zombiezen committed Jun 9, 2016
1 parent 41a9c8d commit 3bd8eb4
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion std/capnp/c++.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
4 changes: 2 additions & 2 deletions std/capnp/gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion std/capnp/json.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
2 changes: 1 addition & 1 deletion std/capnp/persistent.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
2 changes: 1 addition & 1 deletion std/capnp/rpc-twoparty.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
2 changes: 1 addition & 1 deletion std/capnp/rpc.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
2 changes: 1 addition & 1 deletion std/capnp/schema.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -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");

0 comments on commit 3bd8eb4

Please sign in to comment.