Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add v2 modules to integration tests #2682

Merged
merged 9 commits into from
Dec 29, 2023
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version: v2
modules:
- directory: /home/buf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version: v2
modules:
- directory: C:\buf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: v2
modules:
- directory: other/proto
- directory: proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
syntax = "proto3";

package foo;

message Foo {}

message Bar {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
syntax = "proto3";

package foo;

message Foo {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version: v2
modules:
- directory: ../breaking/other/proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version: v2
modules:
- directory: notexist
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax = "proto3";

package a;

import "b.proto";

message A {
b.B b = 1;
}
1 change: 1 addition & 0 deletions private/buf/cmd/buf/testdata/workspace/fail/v2/symlink/b
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: v2
modules:
- directory: a
- directory: b
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
syntax = "proto3";

package a.v1;

message A {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: v2
modules:
- directory: a/proto
- directory: other/proto
name: bufbuild.test/workspace/request
- directory: proto
name: bufbuild.test/workspace/rpc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
syntax = "proto3";

package request;

message Request {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax = "proto3";

package example;

import "request.proto";

message RPC {
request.Request request = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version: v2
modules:
- directory: other/proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
syntax = "proto3";

package request;

message Request {
string name = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax = "proto3";

package example;

import "request.proto";

message RPC {
request.Request req = 1;
}
12 changes: 12 additions & 0 deletions private/buf/cmd/buf/testdata/workspace/success/v2/diamond/buf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: v2
modules:
- directory: other/proto
- directory: private/proto
- directory: proto
name: bufbuild.test/workspace/first
lint:
except:
- PACKAGE_NO_IMPORT_CYCLE
deps:
- bufbuild.test/workspace/second
- bufbuild.test/workspace/third
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
syntax = "proto3";

package c;

message C {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax = "proto3";

package b;

import "c.proto";

message B {
c.C c = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
syntax = "proto3";

package a;

import "b.proto";
import "c.proto";

message A {
b.B b = 1;
c.C c = 2;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: v1
name: bufbuild.test/workspace/first
deps:
- bufbuild.test/workspace/second
- bufbuild.test/workspace/third
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
syntax = "proto3";

package a.v1;

message A {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: v2
modules:
- directory: a/proto
- directory: other/proto
name: bufbuild.test/workspace/request
- directory: proto
name: bufbuild.test/workspace/rpc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
syntax = "proto3";

package request;

message Request {
string name = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax = "proto3";

package example;

import "request.proto";

message RPC {
request.Request req = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: v2
modules:
- directory: external
name: bufbuild.test/workspace/external
- directory: internal
name: bufbuild.test/workspace/internal
deps:
- bufbuild.test/workspace/external
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
syntax = "proto3";

package external;

message External {
string name = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax = "proto3";

package internal;

import "external.proto";

message Internal {
external.External external = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax = "proto3";

package a;

import "b.proto";

message A {
b.B b = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: v2
modules:
- directory: a
- directory: b
- directory: c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
syntax = "proto3";

package c;

message C {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: v2
modules:
- directory: other/proto
name: bufbuild.test/workspace/third
lint:
except:
- PACKAGE_NO_IMPORT_CYCLE
- directory: private/proto
name: bufbuild.test/workspace/second
lint:
except:
- PACKAGE_NO_IMPORT_CYCLE
- directory: proto
name: bufbuild.test/workspace/first
lint:
except:
- PACKAGE_NO_IMPORT_CYCLE
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
syntax = "proto3";

package c;

message C {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax = "proto3";

package b;

import "c.proto";

message B {
c.C c = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax = "proto3";

package a;

import "b.proto";

message A {
b.B b = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: v2
modules:
- directory: other/proto
- directory: proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
syntax = "proto3";

import "a/a.proto";
import "google/protobuf/empty.proto";

package c;

message C {
a.A a = 1;
google.protobuf.Empty empty = 2;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
syntax = "proto3";

package a;

import "b/b.proto";
import "google/protobuf/empty.proto";

message A {
b.B b = 1;
google.protobuf.Empty empty = 2;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
syntax = "proto3";

package b;

import "google/protobuf/empty.proto";

message B {
google.protobuf.Empty empty = 1;
}

Loading
Loading