Skip to content

Commit

Permalink
chore: bump sage
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptammergard committed Apr 12, 2023
1 parent 6af0e60 commit 52badd5
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .sage/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module sage

go 1.17

require go.einride.tech/sage v0.182.0
require go.einride.tech/sage v0.213.2
4 changes: 2 additions & 2 deletions .sage/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
go.einride.tech/sage v0.182.0 h1:yvTDktPO1DkTVgxtVkHBoqRM8RAFJVD4RqM8W74vHNc=
go.einride.tech/sage v0.182.0/go.mod h1:EzV5uciFX7/2ho8EKB5K9JghOfXIxlzs694b+Tkl5GQ=
go.einride.tech/sage v0.213.2 h1:weCzlDFFYmoOGlHxoyGvcPpij4EAYCkoxbPqMOZS11U=
go.einride.tech/sage v0.213.2/go.mod h1:EzV5uciFX7/2ho8EKB5K9JghOfXIxlzs694b+Tkl5GQ=
File renamed without changes.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sagefile := $(abspath $(cwd)/.sage/bin/sagefile)
go := $(shell command -v go 2>/dev/null)
export GOWORK ?= off
ifndef go
SAGE_GO_VERSION ?= 1.18.4
SAGE_GO_VERSION ?= 1.20.2
export GOROOT := $(abspath $(cwd)/.sage/tools/go/$(SAGE_GO_VERSION)/go)
export PATH := $(PATH):$(GOROOT)/bin
go := $(GOROOT)/bin/go
Expand Down
2 changes: 1 addition & 1 deletion examples/proto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sagefile := $(abspath $(cwd)/../../.sage/bin/sagefile)
go := $(shell command -v go 2>/dev/null)
export GOWORK ?= off
ifndef go
SAGE_GO_VERSION ?= 1.18.4
SAGE_GO_VERSION ?= 1.20.2
export GOROOT := $(abspath $(cwd)/../../.sage/tools/go/$(SAGE_GO_VERSION)/go)
export PATH := $(PATH):$(GOROOT)/bin
go := $(GOROOT)/bin/go
Expand Down
44 changes: 11 additions & 33 deletions examples/proto/einride/example/freight/v1/freight_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,14 @@ service FreightService {
// Get a shipper.
// See: https://google.aip.dev/131 (Standard methods: Get).
rpc GetShipper(GetShipperRequest) returns (Shipper) {
option (google.api.http) = {
get: "/v1/{name=shippers/*}"
};
option (google.api.http) = {get: "/v1/{name=shippers/*}"};
option (google.api.method_signature) = "name";
}

// List shippers.
// See: https://google.aip.dev/132 (Standard methods: List).
rpc ListShippers(ListShippersRequest) returns (ListShippersResponse) {
option (google.api.http) = {
get: "/v1/shippers"
};
option (google.api.http) = {get: "/v1/shippers"};
}

// Create a shipper.
Expand All @@ -67,27 +63,21 @@ service FreightService {
// See: https://google.aip.dev/135 (Standard methods: Delete).
// See: https://google.aip.dev/164 (Soft delete).
rpc DeleteShipper(DeleteShipperRequest) returns (Shipper) {
option (google.api.http) = {
delete: "/v1/{name=shippers/*}"
};
option (google.api.http) = {delete: "/v1/{name=shippers/*}"};
option (google.api.method_signature) = "name";
}

// Get a site.
// See: https://google.aip.dev/131 (Standard methods: Get).
rpc GetSite(GetSiteRequest) returns (Site) {
option (google.api.http) = {
get: "/v1/{name=shippers/*/sites/*}"
};
option (google.api.http) = {get: "/v1/{name=shippers/*/sites/*}"};
option (google.api.method_signature) = "name";
}

// List sites for a shipper.
// See: https://google.aip.dev/132 (Standard methods: List).
rpc ListSites(ListSitesRequest) returns (ListSitesResponse) {
option (google.api.http) = {
get: "/v1/{parent=shippers/*}/sites"
};
option (google.api.http) = {get: "/v1/{parent=shippers/*}/sites"};
option (google.api.method_signature) = "parent";
}

Expand Down Expand Up @@ -115,27 +105,21 @@ service FreightService {
// See: https://google.aip.dev/135 (Standard methods: Delete).
// See: https://google.aip.dev/164 (Soft delete).
rpc DeleteSite(DeleteSiteRequest) returns (Site) {
option (google.api.http) = {
delete: "/v1/{name=shippers/*/sites/*}"
};
option (google.api.http) = {delete: "/v1/{name=shippers/*/sites/*}"};
option (google.api.method_signature) = "name";
}

// Get a shipment.
// See: https://google.aip.dev/131 (Standard methods: Get).
rpc GetShipment(GetShipmentRequest) returns (Shipment) {
option (google.api.http) = {
get: "/v1/{name=shippers/*/shipments/*}"
};
option (google.api.http) = {get: "/v1/{name=shippers/*/shipments/*}"};
option (google.api.method_signature) = "name";
}

// List shipments for a shipper.
// See: https://google.aip.dev/132 (Standard methods: List).
rpc ListShipments(ListShipmentsRequest) returns (ListShipmentsResponse) {
option (google.api.http) = {
get: "/v1/{parent=shippers/*}/shipments"
};
option (google.api.http) = {get: "/v1/{parent=shippers/*}/shipments"};
option (google.api.method_signature) = "parent";
}

Expand Down Expand Up @@ -163,9 +147,7 @@ service FreightService {
// See: https://google.aip.dev/135 (Standard methods: Delete).
// See: https://google.aip.dev/164 (Soft delete).
rpc DeleteShipment(DeleteShipmentRequest) returns (Shipment) {
option (google.api.http) = {
delete: "/v1/{name=shippers/*/shipments/*}"
};
option (google.api.http) = {delete: "/v1/{name=shippers/*/shipments/*}"};
option (google.api.method_signature) = "name";
}
}
Expand Down Expand Up @@ -283,9 +265,7 @@ message CreateSiteRequest {
// Format: shippers/{shipper}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "freight-example.einride.tech/Shipper"
}
(google.api.resource_reference) = {child_type: "freight-example.einride.tech/Shipper"}
];
// The site to create.
Site site = 2 [(google.api.field_behavior) = REQUIRED];
Expand Down Expand Up @@ -363,9 +343,7 @@ message CreateShipmentRequest {
// Format: shippers/{shipper}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "freight-example.einride.tech/Shipper"
}
(google.api.resource_reference) = {child_type: "freight-example.einride.tech/Shipper"}
];
// The shipment to create.
Shipment shipment = 2 [(google.api.field_behavior) = REQUIRED];
Expand Down
12 changes: 3 additions & 9 deletions examples/proto/einride/example/syntax/v1/syntax_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@ import "google/protobuf/empty.proto";

service SyntaxService {
rpc QueryOnly(Request) returns (Message) {
option (google.api.http) = {
get: "/v1"
};
option (google.api.http) = {get: "/v1"};
}

rpc EmptyVerb(google.protobuf.Empty) returns (google.protobuf.Empty) {
option (google.api.http) = {
get: "/v1:emptyVerb"
};
option (google.api.http) = {get: "/v1:emptyVerb"};
}

rpc StarBody(Request) returns (Message) {
Expand All @@ -34,9 +30,7 @@ service SyntaxService {
}

rpc Path(Request) returns (Message) {
option (google.api.http) = {
post: "/v1/{string}:path"
};
option (google.api.http) = {post: "/v1/{string}:path"};
}

rpc PathBody(Request) returns (Message) {
Expand Down
5 changes: 1 addition & 4 deletions internal/plugin/servicegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ func (s serviceGenerator) Generate(f *codegen.File) error {
if s.genHandler {
s.generateHandler(f)
}
if err := s.generateClient(f); err != nil {
return err
}
return nil
return s.generateClient(f)
}

func (s serviceGenerator) generateInterface(f *codegen.File) {
Expand Down

0 comments on commit 52badd5

Please sign in to comment.