From e8e946a9c1b77c59b9bf5f6e83bc242e22d7de61 Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Tue, 20 Aug 2024 13:26:13 +0200 Subject: [PATCH 1/3] chore: replace `wrpc/wrpc` -> `bytecodealliance/wrpc` Signed-off-by: Roman Volosatovs --- README.md | 4 ++-- crates/runtime-wasmtime/src/lib.rs | 2 +- crates/wit-bindgen-go/src/lib.rs | 6 ++++-- crates/wit-bindgen-go/tests/codegen.rs | 4 ++-- crates/wit-bindgen-rust/src/lib.rs | 4 ++-- .../complex/resources/bindings.wrpc.go | 2 +- .../go/complex-server/bindings/server.wrpc.go | 4 ++-- .../cmd/complex-server-nats/main.go | 8 ++++---- examples/go/complex-server/complex_server.go | 2 +- examples/go/complex-server/go.mod | 6 +++--- .../wrpc_examples/hello/handler/bindings.wrpc.go | 2 +- .../hello-client/cmd/hello-client-nats/main.go | 4 ++-- examples/go/hello-client/go.mod | 6 +++--- examples/go/hello-client/hello_client.go | 2 +- .../wrpc_examples/hello/handler/bindings.wrpc.go | 2 +- examples/go/hello-server/bindings/server.wrpc.go | 4 ++-- .../hello-server/cmd/hello-server-nats/main.go | 4 ++-- examples/go/hello-server/go.mod | 6 +++--- examples/go/hello-server/hello_server.go | 2 +- go.work | 2 +- go/go.mod | 2 +- go/nats/client.go | 2 +- tests/go/async.go | 4 ++-- tests/go/async_test.go | 12 ++++++------ tests/go/cmd/sync-server-nats/main.go | 6 +++--- tests/go/go.mod | 6 +++--- tests/go/resources.go | 6 +++--- tests/go/resources_test.go | 16 ++++++++-------- tests/go/sync.go | 6 +++--- tests/go/sync_test.go | 16 ++++++++-------- tests/go/types_test.go | 6 +++--- 31 files changed, 80 insertions(+), 78 deletions(-) diff --git a/README.md b/README.md index 98b5e551..2170ac86 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ A Bytecode Alliance hosted project

- build status + build status Documentation Status

@@ -108,7 +108,7 @@ This repository contains (for all supported languages): ## Contributing -[![GitHub repo Good Issues for newbies](https://img.shields.io/github/issues/wrpc/wrpc/good%20first%20issue?style=flat&logo=github&logoColor=green&label=Good%20First%20issues)](https://github.com/wrpc/wrpc/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) [![GitHub Help Wanted issues](https://img.shields.io/github/issues/wrpc/wrpc/help%20wanted?style=flat&logo=github&logoColor=b545d1&label=%22Help%20Wanted%22%20issues)](https://github.com/wrpc/wrpc/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) [![GitHub Help Wanted PRs](https://img.shields.io/github/issues-pr/wrpc/wrpc/help%20wanted?style=flat&logo=github&logoColor=b545d1&label=%22Help%20Wanted%22%20PRs)](https://github.com/wrpc/wrpc/pulls?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) [![GitHub repo Issues](https://img.shields.io/github/issues/wrpc/wrpc?style=flat&logo=github&logoColor=red&label=Issues)](https://github.com/wrpc/wrpc/issues?q=is%3Aopen) +[![GitHub repo Good Issues for newbies](https://img.shields.io/github/bytecodealliance/issues/wrpc/good%20first%20issue?style=flat&logo=github&logoColor=green&label=Good%20First%20issues)](https://github.com/bytecodealliance/wrpc/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) [![GitHub Help Wanted issues](https://img.shields.io/github/bytecodealliance/issues/wrpc/help%20wanted?style=flat&logo=github&logoColor=b545d1&label=%22Help%20Wanted%22%20issues)](https://github.com/bytecodealliance/wrpc/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) [![GitHub Help Wanted PRs](https://img.shields.io/github/issues-pr/bytecodealliance/wrpc/help%20wanted?style=flat&logo=github&logoColor=b545d1&label=%22Help%20Wanted%22%20PRs)](https://github.com/bytecodealliance/wrpc/pulls?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) [![GitHub repo Issues](https://img.shields.io/github/bytecodealliance/issues/wrpc?style=flat&logo=github&logoColor=red&label=Issues)](https://github.com/bytecodealliance/wrpc/issues?q=is%3Aopen) 👋 **Welcome, new contributors!** diff --git a/crates/runtime-wasmtime/src/lib.rs b/crates/runtime-wasmtime/src/lib.rs index 84957ec8..39bdc3c8 100644 --- a/crates/runtime-wasmtime/src/lib.rs +++ b/crates/runtime-wasmtime/src/lib.rs @@ -1,4 +1,4 @@ -#![allow(clippy::type_complexity)] // TODO: https://github.com/wrpc/wrpc/issues/2 +#![allow(clippy::type_complexity)] // TODO: https://github.com/bytecodealliance/wrpc/issues/2 use core::future::Future; use core::iter::zip; diff --git a/crates/wit-bindgen-go/src/lib.rs b/crates/wit-bindgen-go/src/lib.rs index b19d3be4..40d7bb70 100644 --- a/crates/wit-bindgen-go/src/lib.rs +++ b/crates/wit-bindgen-go/src/lib.rs @@ -115,8 +115,10 @@ impl Deps { } fn wrpc(&mut self) -> &'static str { - self.map - .insert("wrpc".to_string(), "github.com/wrpc/wrpc/go".to_string()); + self.map.insert( + "wrpc".to_string(), + "github.com/bytecodealliance/wrpc/go".to_string(), + ); "wrpc" } diff --git a/crates/wit-bindgen-go/tests/codegen.rs b/crates/wit-bindgen-go/tests/codegen.rs index 9f67084c..47c27fec 100644 --- a/crates/wit-bindgen-go/tests/codegen.rs +++ b/crates/wit-bindgen-go/tests/codegen.rs @@ -49,9 +49,9 @@ use .", go 1.22.2 -require github.com/wrpc/wrpc/go v0.0.0-unpublished +require github.com/bytecodealliance/wrpc/go v0.0.0-unpublished -replace github.com/wrpc/wrpc/go v0.0.0-unpublished => {}", +replace github.com/bytecodealliance/wrpc/go v0.0.0-unpublished => {}", root.join("go").display(), ), ) diff --git a/crates/wit-bindgen-rust/src/lib.rs b/crates/wit-bindgen-rust/src/lib.rs index ed6fafe7..453e5a13 100644 --- a/crates/wit-bindgen-rust/src/lib.rs +++ b/crates/wit-bindgen-rust/src/lib.rs @@ -460,7 +460,7 @@ impl WorldGenerator for RustWrpc { self.opts.additional_derive_attributes ); } - for (k, v) in self.opts.with.iter() { + for (k, v) in &self.opts.with { uwriteln!(self.src, "// * with {k:?} = {v:?}"); } self.types.analyze(resolve); @@ -478,7 +478,7 @@ impl WorldGenerator for RustWrpc { } } } - for (k, v) in self.opts.with.iter() { + for (k, v) in &self.opts.with { self.with.insert(k.clone(), v.clone().into()); } self.with.generate_by_default = self.opts.generate_all; diff --git a/examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources/bindings.wrpc.go b/examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources/bindings.wrpc.go index b41a1bc0..302a7959 100644 --- a/examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources/bindings.wrpc.go +++ b/examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources/bindings.wrpc.go @@ -7,7 +7,7 @@ import ( binary "encoding/binary" errors "errors" fmt "fmt" - wrpc "github.com/wrpc/wrpc/go" + wrpc "github.com/bytecodealliance/wrpc/go" io "io" slog "log/slog" math "math" diff --git a/examples/go/complex-server/bindings/server.wrpc.go b/examples/go/complex-server/bindings/server.wrpc.go index f01d2e34..a53c63b7 100644 --- a/examples/go/complex-server/bindings/server.wrpc.go +++ b/examples/go/complex-server/bindings/server.wrpc.go @@ -3,8 +3,8 @@ package server import ( - exports__wrpc_examples__complex__resources "github.com/wrpc/wrpc/examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources" - wrpc "github.com/wrpc/wrpc/go" + exports__wrpc_examples__complex__resources "github.com/bytecodealliance/wrpc/examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources" + wrpc "github.com/bytecodealliance/wrpc/go" ) func Serve(s wrpc.Server, h0 exports__wrpc_examples__complex__resources.Handler) (stop func() error, err error) { diff --git a/examples/go/complex-server/cmd/complex-server-nats/main.go b/examples/go/complex-server/cmd/complex-server-nats/main.go index a134f6f6..f590f769 100644 --- a/examples/go/complex-server/cmd/complex-server-nats/main.go +++ b/examples/go/complex-server/cmd/complex-server-nats/main.go @@ -12,10 +12,10 @@ import ( "github.com/google/uuid" "github.com/nats-io/nats.go" - server "github.com/wrpc/wrpc/examples/go/complex-server/bindings" - "github.com/wrpc/wrpc/examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources" - wrpc "github.com/wrpc/wrpc/go" - wrpcnats "github.com/wrpc/wrpc/go/nats" + server "github.com/bytecodealliance/wrpc/examples/go/complex-server/bindings" + "github.com/bytecodealliance/wrpc/examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources" + wrpc "github.com/bytecodealliance/wrpc/go" + wrpcnats "github.com/bytecodealliance/wrpc/go/nats" ) type Foo struct { diff --git a/examples/go/complex-server/complex_server.go b/examples/go/complex-server/complex_server.go index d89d166c..5e2fd081 100644 --- a/examples/go/complex-server/complex_server.go +++ b/examples/go/complex-server/complex_server.go @@ -1,3 +1,3 @@ -//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package github.com/wrpc/wrpc/examples/go/complex-server/bindings wit +//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package github.com/bytecodealliance/wrpc/examples/go/complex-server/bindings wit package complex_server diff --git a/examples/go/complex-server/go.mod b/examples/go/complex-server/go.mod index 58d9d36e..886afd18 100644 --- a/examples/go/complex-server/go.mod +++ b/examples/go/complex-server/go.mod @@ -1,11 +1,11 @@ -module github.com/wrpc/wrpc/examples/go/complex-server +module github.com/bytecodealliance/wrpc/examples/go/complex-server go 1.22.2 require ( github.com/google/uuid v1.6.0 github.com/nats-io/nats.go v1.37.0 - github.com/wrpc/wrpc/go v0.0.0-unpublished + github.com/bytecodealliance/wrpc/go v0.0.0-unpublished ) require ( @@ -16,4 +16,4 @@ require ( golang.org/x/sys v0.20.0 // indirect ) -replace github.com/wrpc/wrpc/go v0.0.0-unpublished => ../../../go +replace github.com/bytecodealliance/wrpc/go v0.0.0-unpublished => ../../../go diff --git a/examples/go/hello-client/bindings/wrpc_examples/hello/handler/bindings.wrpc.go b/examples/go/hello-client/bindings/wrpc_examples/hello/handler/bindings.wrpc.go index 0b51b7b3..a9f6306e 100644 --- a/examples/go/hello-client/bindings/wrpc_examples/hello/handler/bindings.wrpc.go +++ b/examples/go/hello-client/bindings/wrpc_examples/hello/handler/bindings.wrpc.go @@ -5,7 +5,7 @@ import ( context "context" errors "errors" fmt "fmt" - wrpc "github.com/wrpc/wrpc/go" + wrpc "github.com/bytecodealliance/wrpc/go" io "io" slog "log/slog" utf8 "unicode/utf8" diff --git a/examples/go/hello-client/cmd/hello-client-nats/main.go b/examples/go/hello-client/cmd/hello-client-nats/main.go index ed143f4c..42d12e77 100644 --- a/examples/go/hello-client/cmd/hello-client-nats/main.go +++ b/examples/go/hello-client/cmd/hello-client-nats/main.go @@ -8,8 +8,8 @@ import ( "os" "github.com/nats-io/nats.go" - "github.com/wrpc/wrpc/examples/go/hello-client/bindings/wrpc_examples/hello/handler" - wrpcnats "github.com/wrpc/wrpc/go/nats" + "github.com/bytecodealliance/wrpc/examples/go/hello-client/bindings/wrpc_examples/hello/handler" + wrpcnats "github.com/bytecodealliance/wrpc/go/nats" ) func run() (err error) { diff --git a/examples/go/hello-client/go.mod b/examples/go/hello-client/go.mod index bd11e14f..7fd38179 100644 --- a/examples/go/hello-client/go.mod +++ b/examples/go/hello-client/go.mod @@ -1,10 +1,10 @@ -module github.com/wrpc/wrpc/examples/go/hello-client +module github.com/bytecodealliance/wrpc/examples/go/hello-client go 1.22.2 require ( github.com/nats-io/nats.go v1.37.0 - github.com/wrpc/wrpc/go v0.0.0-unpublished + github.com/bytecodealliance/wrpc/go v0.0.0-unpublished ) require ( @@ -15,4 +15,4 @@ require ( golang.org/x/sys v0.20.0 // indirect ) -replace github.com/wrpc/wrpc/go v0.0.0-unpublished => ../../../go +replace github.com/bytecodealliance/wrpc/go v0.0.0-unpublished => ../../../go diff --git a/examples/go/hello-client/hello_client.go b/examples/go/hello-client/hello_client.go index f666ed1e..1c6c6052 100644 --- a/examples/go/hello-client/hello_client.go +++ b/examples/go/hello-client/hello_client.go @@ -1,3 +1,3 @@ -//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package github.com/wrpc/wrpc/examples/go/hello-client/bindings wit +//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package github.com/bytecodealliance/wrpc/examples/go/hello-client/bindings wit package hello_client diff --git a/examples/go/hello-server/bindings/exports/wrpc_examples/hello/handler/bindings.wrpc.go b/examples/go/hello-server/bindings/exports/wrpc_examples/hello/handler/bindings.wrpc.go index bfab6caa..7342fc53 100644 --- a/examples/go/hello-server/bindings/exports/wrpc_examples/hello/handler/bindings.wrpc.go +++ b/examples/go/hello-server/bindings/exports/wrpc_examples/hello/handler/bindings.wrpc.go @@ -6,7 +6,7 @@ import ( context "context" binary "encoding/binary" fmt "fmt" - wrpc "github.com/wrpc/wrpc/go" + wrpc "github.com/bytecodealliance/wrpc/go" io "io" slog "log/slog" math "math" diff --git a/examples/go/hello-server/bindings/server.wrpc.go b/examples/go/hello-server/bindings/server.wrpc.go index b88e8123..3cdc15a9 100644 --- a/examples/go/hello-server/bindings/server.wrpc.go +++ b/examples/go/hello-server/bindings/server.wrpc.go @@ -3,8 +3,8 @@ package server import ( - exports__wrpc_examples__hello__handler "github.com/wrpc/wrpc/examples/go/hello-server/bindings/exports/wrpc_examples/hello/handler" - wrpc "github.com/wrpc/wrpc/go" + exports__wrpc_examples__hello__handler "github.com/bytecodealliance/wrpc/examples/go/hello-server/bindings/exports/wrpc_examples/hello/handler" + wrpc "github.com/bytecodealliance/wrpc/go" ) func Serve(s wrpc.Server, h0 exports__wrpc_examples__hello__handler.Handler) (stop func() error, err error) { diff --git a/examples/go/hello-server/cmd/hello-server-nats/main.go b/examples/go/hello-server/cmd/hello-server-nats/main.go index 33419f7c..dbf65d55 100644 --- a/examples/go/hello-server/cmd/hello-server-nats/main.go +++ b/examples/go/hello-server/cmd/hello-server-nats/main.go @@ -10,8 +10,8 @@ import ( "syscall" "github.com/nats-io/nats.go" - server "github.com/wrpc/wrpc/examples/go/hello-server/bindings" - wrpcnats "github.com/wrpc/wrpc/go/nats" + server "github.com/bytecodealliance/wrpc/examples/go/hello-server/bindings" + wrpcnats "github.com/bytecodealliance/wrpc/go/nats" ) type Handler struct{} diff --git a/examples/go/hello-server/go.mod b/examples/go/hello-server/go.mod index bd0f9e9f..b24f1815 100644 --- a/examples/go/hello-server/go.mod +++ b/examples/go/hello-server/go.mod @@ -1,10 +1,10 @@ -module github.com/wrpc/wrpc/examples/go/hello-server +module github.com/bytecodealliance/wrpc/examples/go/hello-server go 1.22.2 require ( github.com/nats-io/nats.go v1.37.0 - github.com/wrpc/wrpc/go v0.0.0-unpublished + github.com/bytecodealliance/wrpc/go v0.0.0-unpublished ) require ( @@ -15,4 +15,4 @@ require ( golang.org/x/sys v0.20.0 // indirect ) -replace github.com/wrpc/wrpc/go v0.0.0-unpublished => ../../../go +replace github.com/bytecodealliance/wrpc/go v0.0.0-unpublished => ../../../go diff --git a/examples/go/hello-server/hello_server.go b/examples/go/hello-server/hello_server.go index 9a0879b0..4c076334 100644 --- a/examples/go/hello-server/hello_server.go +++ b/examples/go/hello-server/hello_server.go @@ -1,3 +1,3 @@ -//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package github.com/wrpc/wrpc/examples/go/hello-server/bindings wit +//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package github.com/bytecodealliance/wrpc/examples/go/hello-server/bindings wit package hello_server diff --git a/go.work b/go.work index a3a3967f..98e06f45 100644 --- a/go.work +++ b/go.work @@ -8,4 +8,4 @@ use ( ./tests/go ) -replace github.com/wrpc/wrpc/go v0.0.0-unpublished => ./go +replace github.com/bytecodealliance/wrpc/go v0.0.0-unpublished => ./go diff --git a/go/go.mod b/go/go.mod index d6a61c08..f3666813 100644 --- a/go/go.mod +++ b/go/go.mod @@ -1,4 +1,4 @@ -module github.com/wrpc/wrpc/go +module github.com/bytecodealliance/wrpc/go go 1.22.2 diff --git a/go/nats/client.go b/go/nats/client.go index 503369c6..5ea34ed3 100644 --- a/go/nats/client.go +++ b/go/nats/client.go @@ -9,7 +9,7 @@ import ( "sync" "github.com/nats-io/nats.go" - wrpc "github.com/wrpc/wrpc/go" + wrpc "github.com/bytecodealliance/wrpc/go" ) type headerKey struct{} diff --git a/tests/go/async.go b/tests/go/async.go index fdff26ca..1004b85f 100644 --- a/tests/go/async.go +++ b/tests/go/async.go @@ -1,4 +1,4 @@ -//go:generate $WIT_BINDGEN_WRPC go --world async-server --out-dir bindings/async_server --package github.com/wrpc/wrpc/tests/go/bindings/async_server ../wit +//go:generate $WIT_BINDGEN_WRPC go --world async-server --out-dir bindings/async_server --package github.com/bytecodealliance/wrpc/tests/go/bindings/async_server ../wit package integration @@ -7,7 +7,7 @@ import ( "context" "log/slog" - wrpc "github.com/wrpc/wrpc/go" + wrpc "github.com/bytecodealliance/wrpc/go" ) type AsyncHandler struct{} diff --git a/tests/go/async_test.go b/tests/go/async_test.go index 15cb958f..895c7110 100644 --- a/tests/go/async_test.go +++ b/tests/go/async_test.go @@ -1,4 +1,4 @@ -//go:generate $WIT_BINDGEN_WRPC go --world async-client --out-dir bindings/async_client --package github.com/wrpc/wrpc/tests/go/bindings/async_client ../wit +//go:generate $WIT_BINDGEN_WRPC go --world async-client --out-dir bindings/async_client --package github.com/bytecodealliance/wrpc/tests/go/bindings/async_client ../wit package integration_test @@ -11,11 +11,11 @@ import ( "time" "github.com/nats-io/nats.go" - wrpcnats "github.com/wrpc/wrpc/go/nats" - integration "github.com/wrpc/wrpc/tests/go" - "github.com/wrpc/wrpc/tests/go/bindings/async_client/wrpc_test/integration/async" - "github.com/wrpc/wrpc/tests/go/bindings/async_server" - "github.com/wrpc/wrpc/tests/go/internal" + wrpcnats "github.com/bytecodealliance/wrpc/go/nats" + integration "github.com/bytecodealliance/wrpc/tests/go" + "github.com/bytecodealliance/wrpc/tests/go/bindings/async_client/wrpc_test/integration/async" + "github.com/bytecodealliance/wrpc/tests/go/bindings/async_server" + "github.com/bytecodealliance/wrpc/tests/go/internal" ) func TestAsync(t *testing.T) { diff --git a/tests/go/cmd/sync-server-nats/main.go b/tests/go/cmd/sync-server-nats/main.go index fe3313a2..eeb5c4c5 100644 --- a/tests/go/cmd/sync-server-nats/main.go +++ b/tests/go/cmd/sync-server-nats/main.go @@ -9,9 +9,9 @@ import ( "syscall" "github.com/nats-io/nats.go" - wrpcnats "github.com/wrpc/wrpc/go/nats" - integration "github.com/wrpc/wrpc/tests/go" - "github.com/wrpc/wrpc/tests/go/bindings/sync_server" + wrpcnats "github.com/bytecodealliance/wrpc/go/nats" + integration "github.com/bytecodealliance/wrpc/tests/go" + "github.com/bytecodealliance/wrpc/tests/go/bindings/sync_server" ) func run(url string) error { diff --git a/tests/go/go.mod b/tests/go/go.mod index fc20b132..c2f9a331 100644 --- a/tests/go/go.mod +++ b/tests/go/go.mod @@ -1,4 +1,4 @@ -module github.com/wrpc/wrpc/tests/go +module github.com/bytecodealliance/wrpc/tests/go go 1.22.2 @@ -6,7 +6,7 @@ require ( github.com/google/uuid v1.6.0 github.com/nats-io/nats-server/v2 v2.10.14 github.com/nats-io/nats.go v1.36.0 - github.com/wrpc/wrpc/go v0.0.0-unpublished + github.com/bytecodealliance/wrpc/go v0.0.0-unpublished ) require ( @@ -24,4 +24,4 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -replace github.com/wrpc/wrpc/go v0.0.0-unpublished => ../../go +replace github.com/bytecodealliance/wrpc/go v0.0.0-unpublished => ../../go diff --git a/tests/go/resources.go b/tests/go/resources.go index 9c7f8c4c..f9d9d81a 100644 --- a/tests/go/resources.go +++ b/tests/go/resources.go @@ -1,4 +1,4 @@ -//go:generate $WIT_BINDGEN_WRPC go --world resources-server --out-dir bindings/resources_server --package github.com/wrpc/wrpc/tests/go/bindings/resources_server ../wit +//go:generate $WIT_BINDGEN_WRPC go --world resources-server --out-dir bindings/resources_server --package github.com/bytecodealliance/wrpc/tests/go/bindings/resources_server ../wit package integration @@ -8,8 +8,8 @@ import ( "sync" "github.com/google/uuid" - wrpc "github.com/wrpc/wrpc/go" - "github.com/wrpc/wrpc/tests/go/bindings/resources_server/exports/wrpc_test/integration/resources" + wrpc "github.com/bytecodealliance/wrpc/go" + "github.com/bytecodealliance/wrpc/tests/go/bindings/resources_server/exports/wrpc_test/integration/resources" ) type Foo struct { diff --git a/tests/go/resources_test.go b/tests/go/resources_test.go index 7e3a03e8..a7321213 100644 --- a/tests/go/resources_test.go +++ b/tests/go/resources_test.go @@ -1,4 +1,4 @@ -//go:generate $WIT_BINDGEN_WRPC go --world resources-client --out-dir bindings/resources_client --package github.com/wrpc/wrpc/tests/go/bindings/resources_client ../wit +//go:generate $WIT_BINDGEN_WRPC go --world resources-client --out-dir bindings/resources_client --package github.com/bytecodealliance/wrpc/tests/go/bindings/resources_client ../wit package integration_test @@ -9,13 +9,13 @@ import ( "time" "github.com/nats-io/nats.go" - wrpc "github.com/wrpc/wrpc/go" - wrpcnats "github.com/wrpc/wrpc/go/nats" - integration "github.com/wrpc/wrpc/tests/go" - "github.com/wrpc/wrpc/tests/go/bindings/resources_client/strange" - "github.com/wrpc/wrpc/tests/go/bindings/resources_client/wrpc_test/integration/resources" - "github.com/wrpc/wrpc/tests/go/bindings/resources_server" - "github.com/wrpc/wrpc/tests/go/internal" + wrpc "github.com/bytecodealliance/wrpc/go" + wrpcnats "github.com/bytecodealliance/wrpc/go/nats" + integration "github.com/bytecodealliance/wrpc/tests/go" + "github.com/bytecodealliance/wrpc/tests/go/bindings/resources_client/strange" + "github.com/bytecodealliance/wrpc/tests/go/bindings/resources_client/wrpc_test/integration/resources" + "github.com/bytecodealliance/wrpc/tests/go/bindings/resources_server" + "github.com/bytecodealliance/wrpc/tests/go/internal" ) func TestResources(t *testing.T) { diff --git a/tests/go/sync.go b/tests/go/sync.go index 5a0053ee..98f62402 100644 --- a/tests/go/sync.go +++ b/tests/go/sync.go @@ -1,4 +1,4 @@ -//go:generate $WIT_BINDGEN_WRPC go --gofmt=false --world sync-server --out-dir bindings/sync_server --package github.com/wrpc/wrpc/tests/go/bindings/sync_server ../wit +//go:generate $WIT_BINDGEN_WRPC go --gofmt=false --world sync-server --out-dir bindings/sync_server --package github.com/bytecodealliance/wrpc/tests/go/bindings/sync_server ../wit package integration @@ -7,8 +7,8 @@ import ( "fmt" "log/slog" - wrpc "github.com/wrpc/wrpc/go" - "github.com/wrpc/wrpc/tests/go/bindings/sync_server/exports/wrpc_test/integration/sync" + wrpc "github.com/bytecodealliance/wrpc/go" + "github.com/bytecodealliance/wrpc/tests/go/bindings/sync_server/exports/wrpc_test/integration/sync" ) type SyncHandler struct{} diff --git a/tests/go/sync_test.go b/tests/go/sync_test.go index 92159a3e..3aa9f868 100644 --- a/tests/go/sync_test.go +++ b/tests/go/sync_test.go @@ -1,4 +1,4 @@ -//go:generate $WIT_BINDGEN_WRPC go --gofmt=false --world sync-client --out-dir bindings/sync_client --package github.com/wrpc/wrpc/tests/go/bindings/sync_client ../wit +//go:generate $WIT_BINDGEN_WRPC go --gofmt=false --world sync-client --out-dir bindings/sync_client --package github.com/bytecodealliance/wrpc/tests/go/bindings/sync_client ../wit package integration_test @@ -10,13 +10,13 @@ import ( "time" "github.com/nats-io/nats.go" - wrpc "github.com/wrpc/wrpc/go" - wrpcnats "github.com/wrpc/wrpc/go/nats" - integration "github.com/wrpc/wrpc/tests/go" - "github.com/wrpc/wrpc/tests/go/bindings/sync_client/foo" - "github.com/wrpc/wrpc/tests/go/bindings/sync_client/wrpc_test/integration/sync" - "github.com/wrpc/wrpc/tests/go/bindings/sync_server" - "github.com/wrpc/wrpc/tests/go/internal" + wrpc "github.com/bytecodealliance/wrpc/go" + wrpcnats "github.com/bytecodealliance/wrpc/go/nats" + integration "github.com/bytecodealliance/wrpc/tests/go" + "github.com/bytecodealliance/wrpc/tests/go/bindings/sync_client/foo" + "github.com/bytecodealliance/wrpc/tests/go/bindings/sync_client/wrpc_test/integration/sync" + "github.com/bytecodealliance/wrpc/tests/go/bindings/sync_server" + "github.com/bytecodealliance/wrpc/tests/go/internal" ) func TestSync(t *testing.T) { diff --git a/tests/go/types_test.go b/tests/go/types_test.go index 9517d713..d81bf62a 100644 --- a/tests/go/types_test.go +++ b/tests/go/types_test.go @@ -1,4 +1,4 @@ -//go:generate $WIT_BINDGEN_WRPC go --gofmt=false --world types --out-dir bindings/types --package github.com/wrpc/wrpc/tests/go/bindings/types ../wit +//go:generate $WIT_BINDGEN_WRPC go --gofmt=false --world types --out-dir bindings/types --package github.com/bytecodealliance/wrpc/tests/go/bindings/types ../wit package integration_test @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" - wrpc "github.com/wrpc/wrpc/go" - "github.com/wrpc/wrpc/tests/go/bindings/types/wrpc_test/integration/get_types" + wrpc "github.com/bytecodealliance/wrpc/go" + "github.com/bytecodealliance/wrpc/tests/go/bindings/types/wrpc_test/integration/get_types" ) type indexReader struct { From f4b27f2449a98c7d450187cc411e00ebf6f3ba05 Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Tue, 20 Aug 2024 13:26:27 +0200 Subject: [PATCH 2/3] chore(go): tidy modules, sync workspace Signed-off-by: Roman Volosatovs --- examples/go/complex-server/go.mod | 2 +- examples/go/hello-client/go.mod | 2 +- examples/go/hello-server/go.mod | 2 +- tests/go/go.mod | 4 ++-- tests/go/go.sum | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/go/complex-server/go.mod b/examples/go/complex-server/go.mod index 886afd18..895dbd33 100644 --- a/examples/go/complex-server/go.mod +++ b/examples/go/complex-server/go.mod @@ -3,9 +3,9 @@ module github.com/bytecodealliance/wrpc/examples/go/complex-server go 1.22.2 require ( + github.com/bytecodealliance/wrpc/go v0.0.0-unpublished github.com/google/uuid v1.6.0 github.com/nats-io/nats.go v1.37.0 - github.com/bytecodealliance/wrpc/go v0.0.0-unpublished ) require ( diff --git a/examples/go/hello-client/go.mod b/examples/go/hello-client/go.mod index 7fd38179..b339d1d6 100644 --- a/examples/go/hello-client/go.mod +++ b/examples/go/hello-client/go.mod @@ -3,8 +3,8 @@ module github.com/bytecodealliance/wrpc/examples/go/hello-client go 1.22.2 require ( - github.com/nats-io/nats.go v1.37.0 github.com/bytecodealliance/wrpc/go v0.0.0-unpublished + github.com/nats-io/nats.go v1.37.0 ) require ( diff --git a/examples/go/hello-server/go.mod b/examples/go/hello-server/go.mod index b24f1815..45f6de18 100644 --- a/examples/go/hello-server/go.mod +++ b/examples/go/hello-server/go.mod @@ -3,8 +3,8 @@ module github.com/bytecodealliance/wrpc/examples/go/hello-server go 1.22.2 require ( - github.com/nats-io/nats.go v1.37.0 github.com/bytecodealliance/wrpc/go v0.0.0-unpublished + github.com/nats-io/nats.go v1.37.0 ) require ( diff --git a/tests/go/go.mod b/tests/go/go.mod index c2f9a331..59ae27a0 100644 --- a/tests/go/go.mod +++ b/tests/go/go.mod @@ -3,10 +3,10 @@ module github.com/bytecodealliance/wrpc/tests/go go 1.22.2 require ( + github.com/bytecodealliance/wrpc/go v0.0.0-unpublished github.com/google/uuid v1.6.0 github.com/nats-io/nats-server/v2 v2.10.14 - github.com/nats-io/nats.go v1.36.0 - github.com/bytecodealliance/wrpc/go v0.0.0-unpublished + github.com/nats-io/nats.go v1.37.0 ) require ( diff --git a/tests/go/go.sum b/tests/go/go.sum index 3a09a173..b149159b 100644 --- a/tests/go/go.sum +++ b/tests/go/go.sum @@ -10,8 +10,8 @@ github.com/nats-io/jwt/v2 v2.5.5 h1:ROfXb50elFq5c9+1ztaUbdlrArNFl2+fQWP6B8HGEq4= github.com/nats-io/jwt/v2 v2.5.5/go.mod h1:ZdWS1nZa6WMZfFwwgpEaqBV8EPGVgOTDHN/wTbz0Y5A= github.com/nats-io/nats-server/v2 v2.10.14 h1:98gPJFOAO2vLdM0gogh8GAiHghwErrSLhugIqzRC+tk= github.com/nats-io/nats-server/v2 v2.10.14/go.mod h1:a0TwOVBJZz6Hwv7JH2E4ONdpyFk9do0C18TEwxnHdRk= -github.com/nats-io/nats.go v1.36.0 h1:suEUPuWzTSse/XhESwqLxXGuj8vGRuPRoG7MoRN/qyU= -github.com/nats-io/nats.go v1.36.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8= +github.com/nats-io/nats.go v1.37.0 h1:07rauXbVnnJvv1gfIyghFEo6lUcYRY0WXc3x7x0vUxE= +github.com/nats-io/nats.go v1.37.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8= github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI= github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= From 564980bac35bb51d026e7a8c967e33a69a60e195 Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Tue, 20 Aug 2024 13:30:53 +0200 Subject: [PATCH 3/3] chore(go): reformat code Signed-off-by: Roman Volosatovs --- examples/go/complex-server/cmd/complex-server-nats/main.go | 4 ++-- examples/go/hello-client/cmd/hello-client-nats/main.go | 2 +- examples/go/hello-server/cmd/hello-server-nats/main.go | 2 +- go/nats/client.go | 2 +- tests/go/async_test.go | 2 +- tests/go/cmd/sync-server-nats/main.go | 2 +- tests/go/resources.go | 2 +- tests/go/resources_test.go | 2 +- tests/go/sync_test.go | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/go/complex-server/cmd/complex-server-nats/main.go b/examples/go/complex-server/cmd/complex-server-nats/main.go index f590f769..ab28d526 100644 --- a/examples/go/complex-server/cmd/complex-server-nats/main.go +++ b/examples/go/complex-server/cmd/complex-server-nats/main.go @@ -10,12 +10,12 @@ import ( "sync" "syscall" - "github.com/google/uuid" - "github.com/nats-io/nats.go" server "github.com/bytecodealliance/wrpc/examples/go/complex-server/bindings" "github.com/bytecodealliance/wrpc/examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources" wrpc "github.com/bytecodealliance/wrpc/go" wrpcnats "github.com/bytecodealliance/wrpc/go/nats" + "github.com/google/uuid" + "github.com/nats-io/nats.go" ) type Foo struct { diff --git a/examples/go/hello-client/cmd/hello-client-nats/main.go b/examples/go/hello-client/cmd/hello-client-nats/main.go index 42d12e77..94d2d66d 100644 --- a/examples/go/hello-client/cmd/hello-client-nats/main.go +++ b/examples/go/hello-client/cmd/hello-client-nats/main.go @@ -7,9 +7,9 @@ import ( "log/slog" "os" - "github.com/nats-io/nats.go" "github.com/bytecodealliance/wrpc/examples/go/hello-client/bindings/wrpc_examples/hello/handler" wrpcnats "github.com/bytecodealliance/wrpc/go/nats" + "github.com/nats-io/nats.go" ) func run() (err error) { diff --git a/examples/go/hello-server/cmd/hello-server-nats/main.go b/examples/go/hello-server/cmd/hello-server-nats/main.go index dbf65d55..da859d9d 100644 --- a/examples/go/hello-server/cmd/hello-server-nats/main.go +++ b/examples/go/hello-server/cmd/hello-server-nats/main.go @@ -9,9 +9,9 @@ import ( "os/signal" "syscall" - "github.com/nats-io/nats.go" server "github.com/bytecodealliance/wrpc/examples/go/hello-server/bindings" wrpcnats "github.com/bytecodealliance/wrpc/go/nats" + "github.com/nats-io/nats.go" ) type Handler struct{} diff --git a/go/nats/client.go b/go/nats/client.go index 5ea34ed3..b34a016a 100644 --- a/go/nats/client.go +++ b/go/nats/client.go @@ -8,8 +8,8 @@ import ( "log/slog" "sync" - "github.com/nats-io/nats.go" wrpc "github.com/bytecodealliance/wrpc/go" + "github.com/nats-io/nats.go" ) type headerKey struct{} diff --git a/tests/go/async_test.go b/tests/go/async_test.go index 895c7110..b797c4d0 100644 --- a/tests/go/async_test.go +++ b/tests/go/async_test.go @@ -10,12 +10,12 @@ import ( "testing" "time" - "github.com/nats-io/nats.go" wrpcnats "github.com/bytecodealliance/wrpc/go/nats" integration "github.com/bytecodealliance/wrpc/tests/go" "github.com/bytecodealliance/wrpc/tests/go/bindings/async_client/wrpc_test/integration/async" "github.com/bytecodealliance/wrpc/tests/go/bindings/async_server" "github.com/bytecodealliance/wrpc/tests/go/internal" + "github.com/nats-io/nats.go" ) func TestAsync(t *testing.T) { diff --git a/tests/go/cmd/sync-server-nats/main.go b/tests/go/cmd/sync-server-nats/main.go index eeb5c4c5..df5f5a65 100644 --- a/tests/go/cmd/sync-server-nats/main.go +++ b/tests/go/cmd/sync-server-nats/main.go @@ -8,10 +8,10 @@ import ( "os/signal" "syscall" - "github.com/nats-io/nats.go" wrpcnats "github.com/bytecodealliance/wrpc/go/nats" integration "github.com/bytecodealliance/wrpc/tests/go" "github.com/bytecodealliance/wrpc/tests/go/bindings/sync_server" + "github.com/nats-io/nats.go" ) func run(url string) error { diff --git a/tests/go/resources.go b/tests/go/resources.go index f9d9d81a..be04a981 100644 --- a/tests/go/resources.go +++ b/tests/go/resources.go @@ -7,9 +7,9 @@ import ( "fmt" "sync" - "github.com/google/uuid" wrpc "github.com/bytecodealliance/wrpc/go" "github.com/bytecodealliance/wrpc/tests/go/bindings/resources_server/exports/wrpc_test/integration/resources" + "github.com/google/uuid" ) type Foo struct { diff --git a/tests/go/resources_test.go b/tests/go/resources_test.go index a7321213..61c90092 100644 --- a/tests/go/resources_test.go +++ b/tests/go/resources_test.go @@ -8,7 +8,6 @@ import ( "testing" "time" - "github.com/nats-io/nats.go" wrpc "github.com/bytecodealliance/wrpc/go" wrpcnats "github.com/bytecodealliance/wrpc/go/nats" integration "github.com/bytecodealliance/wrpc/tests/go" @@ -16,6 +15,7 @@ import ( "github.com/bytecodealliance/wrpc/tests/go/bindings/resources_client/wrpc_test/integration/resources" "github.com/bytecodealliance/wrpc/tests/go/bindings/resources_server" "github.com/bytecodealliance/wrpc/tests/go/internal" + "github.com/nats-io/nats.go" ) func TestResources(t *testing.T) { diff --git a/tests/go/sync_test.go b/tests/go/sync_test.go index 3aa9f868..bfa8a4ce 100644 --- a/tests/go/sync_test.go +++ b/tests/go/sync_test.go @@ -9,7 +9,6 @@ import ( "testing" "time" - "github.com/nats-io/nats.go" wrpc "github.com/bytecodealliance/wrpc/go" wrpcnats "github.com/bytecodealliance/wrpc/go/nats" integration "github.com/bytecodealliance/wrpc/tests/go" @@ -17,6 +16,7 @@ import ( "github.com/bytecodealliance/wrpc/tests/go/bindings/sync_client/wrpc_test/integration/sync" "github.com/bytecodealliance/wrpc/tests/go/bindings/sync_server" "github.com/bytecodealliance/wrpc/tests/go/internal" + "github.com/nats-io/nats.go" ) func TestSync(t *testing.T) {