Skip to content

Commit

Permalink
Use VCS module paths in Go reference from Gherkin => Messages (#1608)
Browse files Browse the repository at this point in the history
* Also rebuild go packages if go.mod changes

* Attempt to use a VCS path to reference gherkin->messages in Go

* Point go module paths to monorepo

Ref #1550

Co-authored-by: Aurelien Reeves <aurelien.reeves@smartbear.com>

* Update Go module refs from gherkin->messages

Ref: #1550

NB: Until #1608 has been merged to main, we're using a temporary branch ref in
go.mod. This will need to be removed before this PR is merged.

* Update Go module refs from demo-formatter -> messages

Ref #1550

* Update Go module refs from json-formatter -> messages

Ref #1550

* Fix Go module self-references

* Use main branch again in Go module refs

Co-authored-by: Aurelien Reeves <aurelien.reeves@smartbear.com>
  • Loading branch information
mattwynne and aurelien-reeves committed Jun 16, 2021
1 parent 4ecd6cf commit a2ff65d
Show file tree
Hide file tree
Showing 23 changed files with 30 additions and 25 deletions.
2 changes: 1 addition & 1 deletion demo-formatter/go/cucumber_demo_formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package cucumber_demo_formatter
import (
"encoding/json"
"fmt"
"github.com/cucumber/messages-go/v16"
"github.com/cucumber/common/messages/go/v16"
"io"
)

Expand Down
2 changes: 1 addition & 1 deletion demo-formatter/go/cucumber_demo_formatter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cucumber_demo_formatter
import (
"bytes"
"encoding/json"
"github.com/cucumber/messages-go/v16"
"github.com/cucumber/common/messages/go/v16"
"github.com/stretchr/testify/require"
"testing"
)
Expand Down
4 changes: 2 additions & 2 deletions demo-formatter/go/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/cucumber/common/demo-formatter/go

require (
github.com/cucumber/messages-go/v16 v16.0.1
github.com/cucumber/common/messages/go/v16 v16.0.0
github.com/stretchr/testify v1.7.0
)

replace github.com/cucumber/messages-go/v16 => ../../messages/go
replace github.com/cucumber/common/messages/go/v16 => ../../messages/go

go 1.13
2 changes: 1 addition & 1 deletion gherkin/go/astbuilder.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gherkin

import (
"github.com/cucumber/messages-go/v16"
"github.com/cucumber/common/messages/go/v16"
"strings"
)

Expand Down
2 changes: 1 addition & 1 deletion gherkin/go/bench_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gherkin

import (
messages "github.com/cucumber/messages-go/v16"
messages "github.com/cucumber/common/messages/go/v16"
"strings"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion gherkin/go/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"flag"
"fmt"
"github.com/cucumber/common/gherkin/go/v19"
"github.com/cucumber/messages-go/v16"
"github.com/cucumber/common/messages/go/v16"
"os"
)

Expand Down
2 changes: 1 addition & 1 deletion gherkin/go/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package gherkin

import (
"fmt"
messages "github.com/cucumber/messages-go/v16"
messages "github.com/cucumber/common/messages/go/v16"
"os"
"strings"
)
Expand Down
2 changes: 1 addition & 1 deletion gherkin/go/gherkin.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gherkin
import (
"bufio"
"fmt"
"github.com/cucumber/messages-go/v16"
"github.com/cucumber/common/messages/go/v16"
"io"
"strings"
)
Expand Down
4 changes: 2 additions & 2 deletions gherkin/go/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/cucumber/common/gherkin/go/v19

require (
github.com/cucumber/messages-go/v16 v16.0.1
github.com/cucumber/common/messages/go/v16 v16.0.0
github.com/stretchr/testify v1.7.0
)

replace github.com/cucumber/messages-go/v16 => ../../messages/go
replace github.com/cucumber/common/messages/go/v16 => ../../messages/go

go 1.13
5 changes: 5 additions & 0 deletions gherkin/go/go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
github.com/cucumber/common/messages/go/v16 v16.0.0-20210616143200-16b27f1a25b2/go.mod h1:M2BQJNS63rzmxaz/VgU6US/REUbAeROGJ6QdntfY98Y=
github.com/cucumber/gherkin-go v5.1.0+incompatible h1:RCvyVI6KQLI2IJkijZBeJcE4K3U7DnhQ1RjD7VV+AIk=
github.com/cucumber/gherkin-go/v19 v19.0.3 h1:mMSKu1077ffLbTJULUfM5HPokgeBcIGboyeNUof1MdE=
github.com/cucumber/gherkin-go/v19 v19.0.3/go.mod h1:jY/NP6jUtRSArQQJ5h1FXOUgk5fZK24qtE7vKi776Vw=
github.com/cucumber/messages-go v3.0.0+incompatible h1:IIZ+6dRebLcM80cStIDad0Wr6ipgs4zYGMqNH0kp7pY=
github.com/cucumber/messages-go/v16 v16.0.0 h1:3QR8gAu6JYUI8U7gVUMZs/m+C0ZlBcTwf2QKCHMDH88=
github.com/cucumber/messages-go/v16 v16.0.0/go.mod h1:EJcyR5Mm5ZuDsKJnT2N9KRnBK30BGjtYotDKpwQ0v6g=
github.com/cucumber/messages-go/v16 v16.0.1 h1:fvkpwsLgnIm0qugftrw2YwNlio+ABe2Iu94Ap8GMYIY=
Expand Down
2 changes: 1 addition & 1 deletion gherkin/go/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gherkin
import (
"encoding/json"
"fmt"
"github.com/cucumber/messages-go/v16"
"github.com/cucumber/common/messages/go/v16"
"io"
"io/ioutil"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion gherkin/go/messages_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gherkin
import (
"bytes"
"encoding/json"
"github.com/cucumber/messages-go/v16"
"github.com/cucumber/common/messages/go/v16"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
Expand Down
2 changes: 1 addition & 1 deletion gherkin/go/pickles.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gherkin

import (
"github.com/cucumber/messages-go/v16"
"github.com/cucumber/common/messages/go/v16"
"strings"
)

Expand Down
2 changes: 1 addition & 1 deletion gherkin/go/pickles_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package gherkin
import (
"encoding/json"
"fmt"
"github.com/cucumber/messages-go/v16"
"github.com/cucumber/common/messages/go/v16"
"os"
"strings"
)
Expand Down
4 changes: 2 additions & 2 deletions json-formatter/go/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/cucumber/common/json-formatter/go/v18

replace github.com/cucumber/messages-go/v16 => ../../messages/go
replace github.com/cucumber/common/messages/go/v16 => ../../messages/go

go 1.13

require (
github.com/cucumber/messages-go/v16 v16.0.1
github.com/cucumber/common/messages/go/v16 v16.0.1
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.13.0
)
2 changes: 1 addition & 1 deletion json-formatter/go/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"io"
"strings"

"github.com/cucumber/messages-go/v16"
"github.com/cucumber/common/messages/go/v16"
)

type Formatter struct {
Expand Down
2 changes: 1 addition & 1 deletion json-formatter/go/message_lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package json
import (
"fmt"

"github.com/cucumber/messages-go/v16"
"github.com/cucumber/common/messages/go/v16"
)

type MessageLookup struct {
Expand Down
2 changes: 1 addition & 1 deletion json-formatter/go/message_lookup_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package json

import (
"github.com/cucumber/messages-go/v16"
"github.com/cucumber/common/messages/go/v16"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion json-formatter/go/test_case.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/cucumber/messages-go/v16"
"github.com/cucumber/common/messages/go/v16"
)

type TestCase struct {
Expand Down
2 changes: 1 addition & 1 deletion json-formatter/go/test_case_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package json

import (
"github.com/cucumber/messages-go/v16"
"github.com/cucumber/common/messages/go/v16"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
Expand Down
2 changes: 1 addition & 1 deletion json-formatter/go/test_helpers.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package json

import (
"github.com/cucumber/messages-go/v16"
"github.com/cucumber/common/messages/go/v16"
)

func makeScenario(id string, steps []*messages.Step) *messages.Scenario {
Expand Down
2 changes: 1 addition & 1 deletion json-formatter/go/test_step.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"strings"

"github.com/cucumber/messages-go/v16"
"github.com/cucumber/common/messages/go/v16"
)

type TestStep struct {
Expand Down
2 changes: 1 addition & 1 deletion json-formatter/go/test_step_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package json

import (
"github.com/cucumber/messages-go/v16"
"github.com/cucumber/common/messages/go/v16"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
Expand Down

0 comments on commit a2ff65d

Please sign in to comment.