Skip to content

Commit

Permalink
Remove tools.go
Browse files Browse the repository at this point in the history
  • Loading branch information
fasmat committed May 3, 2024
1 parent 0385ec9 commit 0d44281
Show file tree
Hide file tree
Showing 23 changed files with 93 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/actions/go-check-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ runs:
repo-token: ${{ github.token }}
- name: Install Protobuf compiler
shell: bash
run: go install google.golang.org/protobuf/cmd/protoc-gen-go
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.0
2 changes: 1 addition & 1 deletion core/crypto/pb/crypto.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 67 additions & 0 deletions core/network/mocks/gomock_reflect_27034970/prog.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions core/network/mocks/network.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package mocknetwork

//go:generate sh -c "go run go.uber.org/mock/mockgen -package mocknetwork -destination mock_resource_manager.go github.com/libp2p/go-libp2p/core/network ResourceManager"
//go:generate sh -c "go run go.uber.org/mock/mockgen -package mocknetwork -destination mock_conn_management_scope.go github.com/libp2p/go-libp2p/core/network ConnManagementScope"
//go:generate sh -c "go run go.uber.org/mock/mockgen -package mocknetwork -destination mock_stream_management_scope.go github.com/libp2p/go-libp2p/core/network StreamManagementScope"
//go:generate sh -c "go run go.uber.org/mock/mockgen -package mocknetwork -destination mock_peer_scope.go github.com/libp2p/go-libp2p/core/network PeerScope"
//go:generate sh -c "go run go.uber.org/mock/mockgen -package mocknetwork -destination mock_protocol_scope.go github.com/libp2p/go-libp2p/core/network ProtocolScope"
//go:generate sh -c "go run go.uber.org/mock/mockgen -package mocknetwork -destination mock_resource_scope_span.go github.com/libp2p/go-libp2p/core/network ResourceScopeSpan"
//go:generate sh -c "go run go.uber.org/mock/mockgen@v0.4.0 -package mocknetwork -destination mock_resource_manager.go github.com/libp2p/go-libp2p/core/network ResourceManager"
//go:generate sh -c "go run go.uber.org/mock/mockgen@v0.4.0 -package mocknetwork -destination mock_conn_management_scope.go github.com/libp2p/go-libp2p/core/network ConnManagementScope"
//go:generate sh -c "go run go.uber.org/mock/mockgen@v0.4.0 -package mocknetwork -destination mock_stream_management_scope.go github.com/libp2p/go-libp2p/core/network StreamManagementScope"
//go:generate sh -c "go run go.uber.org/mock/mockgen@v0.4.0 -package mocknetwork -destination mock_peer_scope.go github.com/libp2p/go-libp2p/core/network PeerScope"
//go:generate sh -c "go run go.uber.org/mock/mockgen@v0.4.0 -package mocknetwork -destination mock_protocol_scope.go github.com/libp2p/go-libp2p/core/network ProtocolScope"
//go:generate sh -c "go run go.uber.org/mock/mockgen@v0.4.0 -package mocknetwork -destination mock_resource_scope_span.go github.com/libp2p/go-libp2p/core/network ResourceScopeSpan"
2 changes: 1 addition & 1 deletion core/peer/pb/peer_record.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/record/pb/envelope.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/sec/insecure/pb/plaintext.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ require (
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a
golang.org/x/sync v0.6.0
golang.org/x/sys v0.17.0
golang.org/x/tools v0.18.0
google.golang.org/protobuf v1.32.0
)

Expand Down Expand Up @@ -124,6 +123,7 @@ require (
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.18.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.2.1 // indirect
)
2 changes: 1 addition & 1 deletion p2p/host/autonat/pb/autonat.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion p2p/host/basic/mocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

package basichost

//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package basichost -destination mock_nat_test.go github.com/libp2p/go-libp2p/p2p/host/basic NAT"
//go:generate sh -c "go run go.uber.org/mock/mockgen@v0.4.0 -build_flags=\"-tags=gomock\" -package basichost -destination mock_nat_test.go github.com/libp2p/go-libp2p/p2p/host/basic NAT"
type NAT nat
2 changes: 1 addition & 1 deletion p2p/host/peerstore/pstoreds/pb/pstore.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion p2p/host/pstoremanager/pstoremanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"go.uber.org/mock/gomock"
)

//go:generate sh -c "go run go.uber.org/mock/mockgen -package pstoremanager_test -destination mock_peerstore_test.go github.com/libp2p/go-libp2p/core/peerstore Peerstore"
//go:generate sh -c "go run go.uber.org/mock/mockgen@v0.4.0 -package pstoremanager_test -destination mock_peerstore_test.go github.com/libp2p/go-libp2p/core/peerstore Peerstore"

func TestGracePeriod(t *testing.T) {
t.Parallel()
Expand Down
2 changes: 1 addition & 1 deletion p2p/net/nat/nat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"go.uber.org/mock/gomock"
)

//go:generate sh -c "go run go.uber.org/mock/mockgen -package nat -destination mock_nat_test.go github.com/libp2p/go-nat NAT"
//go:generate sh -c "go run go.uber.org/mock/mockgen@v0.4.0 -package nat -destination mock_nat_test.go github.com/libp2p/go-nat NAT"

func setupMockNAT(t *testing.T) (mockNAT *MockNAT, reset func()) {
t.Helper()
Expand Down
2 changes: 1 addition & 1 deletion p2p/protocol/circuitv2/pb/circuit.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion p2p/protocol/circuitv2/pb/voucher.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion p2p/protocol/holepunch/pb/holepunch.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion p2p/protocol/identify/pb/identify.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion p2p/security/noise/pb/payload.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion p2p/test/transport/gating_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"go.uber.org/mock/gomock"
)

//go:generate go run go.uber.org/mock/mockgen -package transport_integration -destination mock_connection_gater_test.go github.com/libp2p/go-libp2p/core/connmgr ConnectionGater
//go:generate go run go.uber.org/mock/mockgen@v0.4.0 -package transport_integration -destination mock_connection_gater_test.go github.com/libp2p/go-libp2p/core/connmgr ConnectionGater

func stripCertHash(addr ma.Multiaddr) ma.Multiaddr {
for {
Expand Down
2 changes: 1 addition & 1 deletion p2p/transport/quic/conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"go.uber.org/mock/gomock"
)

//go:generate sh -c "go run go.uber.org/mock/mockgen -package libp2pquic -destination mock_connection_gater_test.go github.com/libp2p/go-libp2p/core/connmgr ConnectionGater && go run golang.org/x/tools/cmd/goimports -w mock_connection_gater_test.go"
//go:generate sh -c "go run go.uber.org/mock/mockgen@v0.4.0 -package libp2pquic -destination mock_connection_gater_test.go github.com/libp2p/go-libp2p/core/connmgr ConnectionGater && go run golang.org/x/tools/cmd/goimports@v0.20.0 -w mock_connection_gater_test.go"

type connTestCase struct {
Name string
Expand Down
2 changes: 1 addition & 1 deletion p2p/transport/webrtc/pb/message.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion p2p/transport/webtransport/transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ func TestResourceManagerListening(t *testing.T) {
}

// TODO: unify somehow. We do the same in libp2pquic.
//go:generate sh -c "go run go.uber.org/mock/mockgen -package libp2pwebtransport_test -destination mock_connection_gater_test.go github.com/libp2p/go-libp2p/core/connmgr ConnectionGater && go run golang.org/x/tools/cmd/goimports -w mock_connection_gater_test.go"
//go:generate sh -c "go run go.uber.org/mock/mockgen@v0.4.0 -package libp2pwebtransport_test -destination mock_connection_gater_test.go github.com/libp2p/go-libp2p/core/connmgr ConnectionGater && go run golang.org/x/tools/cmd/goimports@v0.20.0 -w mock_connection_gater_test.go"

func TestConnectionGaterDialing(t *testing.T) {
ctrl := gomock.NewController(t)
Expand Down
9 changes: 0 additions & 9 deletions tools.go

This file was deleted.

0 comments on commit 0d44281

Please sign in to comment.