This is an automated email from the ASF dual-hosted git repository.

thunguo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-seata-go-samples.git


The following commit(s) were added to refs/heads/main by this push:
     new 7a1d78d  fix: add seata-go/v2 dependency so the RocketMQ TCC sample 
builds (#106)
7a1d78d is described below

commit 7a1d78dd8be371054a862747114a8c512045a9b9
Author: Gust wang <[email protected]>
AuthorDate: Thu Aug 27 04:44:26 2026 -0400

    fix: add seata-go/v2 dependency so the RocketMQ TCC sample builds (#106)
    
    tcc/rocketmq/cmd/main.go imports seata.apache.org/seata-go/v2/pkg/{client,
    integration/rocketmq,tm,util/log}, but go.mod only requires the v1 module
    path seata.apache.org/seata-go. Nothing provides the /v2 packages, so
    `go build ./...` fails and the build workflow has been red on main since
    #88 landed:
    
        tcc/rocketmq/cmd/main.go:29:2: no required module provides package
        seata.apache.org/seata-go/v2/pkg/client; to add it:
                go get seata.apache.org/seata-go/v2/pkg/client
    
    The sample was developed against a local
    `replace seata.apache.org/seata-go => ../incubator-seata-go` checkout. The
    replace was commented out again before merge, but the /v2 imports stayed.
    
    Dropping the /v2 prefix is not an option: pkg/integration/rocketmq was added
    to seata-go in apache/incubator-seata-go#1054 (2026-06-05) and refined in
     #1125 (2026-07-10), so it exists on master only. The pinned
    v1.2.1-0.20251220113411-b18bcb019b65 and the latest tagged release v2.1.0
    (2026-02-12) both ship integration/{dubbo,gin,grpc} without rocketmq.
    
    So this pins seata.apache.org/seata-go/v2 to the current master
    pseudo-version alongside the existing v1 requirement, the same way the repo
    already pins a v1 pseudo-version. Only tcc/rocketmq resolves against v2;
    every other sample keeps building against v1 and no existing dependency
    version changes. Once seata-go cuts a release containing the RocketMQ
    integration this should be repointed at that tag, ideally as part of moving
    the whole repo to v2.
    
    Verified with Go 1.20, the version .github/workflows/build.yaml uses:
    
        go vet ./...                          # exit 0, type-checks every 
package
        go build -o /tmp/rmq ./tcc/rocketmq/cmd  # exit 0
        go fmt ./...                          # no changes
        go test -v ./...                      # no test files in repo
---
 go.mod | 4 ++++
 go.sum | 8 ++++++++
 2 files changed, 12 insertions(+)

diff --git a/go.mod b/go.mod
index cca9d95..5684edc 100644
--- a/go.mod
+++ b/go.mod
@@ -13,12 +13,16 @@ require (
        gorm.io/driver/mysql v1.4.5
        gorm.io/gorm v1.24.3
        seata.apache.org/seata-go v1.2.1-0.20251220113411-b18bcb019b65
+       seata.apache.org/seata-go/v2 v2.1.1-0.20260827063834-3bcd201fd293
 )
 
 require (
        cloud.google.com/go/compute v1.20.1 // indirect
        github.com/antlr/antlr4/runtime/Go/antlr/v4 
v4.0.0-20230305170008-8188dc5388df // indirect
        github.com/google/cel-go v0.18.0 // indirect
+       github.com/jackc/pgpassfile v1.0.0 // indirect
+       github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // 
indirect
+       github.com/jackc/pgx/v5 v5.4.3 // indirect
        github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
        github.com/robertkrimen/otto v0.4.0 // indirect
        github.com/sirupsen/logrus v1.8.1 // indirect
diff --git a/go.sum b/go.sum
index c12d3be..da0752b 100644
--- a/go.sum
+++ b/go.sum
@@ -909,6 +909,12 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod 
h1:PxqpIevigyE2G7u3NXJIT2ANyt
 github.com/influxdata/influxdb1-client 
v0.0.0-20191209144304-8bf82d3c094d/go.mod 
h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
 github.com/influxdata/tdigest v0.0.1 
h1:XpFptwYmnEKUqmkcDjrzffswZ3nvNeevbUSLPP/ZzIY=
 github.com/influxdata/tdigest v0.0.1/go.mod 
h1:Z0kXnxzbTC2qrx4NaIzYkE1k66+6oEDQTvL95hQFh5Y=
+github.com/jackc/pgpassfile v1.0.0 
h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
+github.com/jackc/pgpassfile v1.0.0/go.mod 
h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
+github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 
h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo=
+github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod 
h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
+github.com/jackc/pgx/v5 v5.4.3 h1:cxFyXhxlvAifxnkKKdlxv8XqUf59tDlYjnV5YYfsJJY=
+github.com/jackc/pgx/v5 v5.4.3/go.mod 
h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA=
 github.com/jcmturner/aescts/v2 v2.0.0/go.mod 
h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs=
 github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod 
h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM=
 github.com/jcmturner/gofork v1.0.0/go.mod 
h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o=
@@ -2178,6 +2184,8 @@ rsc.io/quote/v3 v3.1.0/go.mod 
h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
 rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
 seata.apache.org/seata-go v1.2.1-0.20251220113411-b18bcb019b65 
h1:2d4nvNnAnszr4SmSZa1VSLZsnzu2jHR0jtRAPH8R1cI=
 seata.apache.org/seata-go v1.2.1-0.20251220113411-b18bcb019b65/go.mod 
h1:BH35FqKInt+3tV/Wp0OS2HfJswKdgv59MVJJ6KWxirY=
+seata.apache.org/seata-go/v2 v2.1.1-0.20260827063834-3bcd201fd293 
h1:T+gtKitIURFFp4DeLR60Rx50x93Bmv/8mKfVe0rbunU=
+seata.apache.org/seata-go/v2 v2.1.1-0.20260827063834-3bcd201fd293/go.mod 
h1:W3zFU/NX4FQ99+lS2tiL7rrDKlz2CtR4xDP3EQ3kL2E=
 sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
 sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
 sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to