Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mmorel-35 committed Mar 23, 2024
1 parent 3e7ec9f commit 188526f
Show file tree
Hide file tree
Showing 6 changed files with 195 additions and 0 deletions.
42 changes: 42 additions & 0 deletions modules/opencensus-proto/0.4.1/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
module(
name = "opencensus-proto",
version = "0.4.1",
compatibility_level = 1,
)

bazel_dep(
name = "gazelle",
version = "0.34.0",
repo_name = "bazel_gazelle",
)
bazel_dep(
name = "grpc",
version = "1.41.0",
repo_name = "com_github_grpc_grpc",
)
bazel_dep(
name = "protobuf",
version = "21.7",
repo_name = "com_google_protobuf",
)
bazel_dep(
name = "rules_go",
version = "0.45.1",
repo_name = "io_bazel_rules_go",
)
bazel_dep(
name = "rules_proto",
version = "5.3.0-21.7",
)
# -- bazel_dep definitions -- #

go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.module(
path = "google.golang.org/protobuf",
sum = "h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=",
version = "v1.28.1",
)
use_repo(
go_deps,
"org_golang_google_protobuf",
)
62 changes: 62 additions & 0 deletions modules/opencensus-proto/0.4.1/patches/build_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
diff --git a/opencensus/proto/agent/common/v1/BUILD.bazel b/opencensus/proto/agent/common/v1/BUILD.bazel
index d0a0e08..bd1d872 100644
--- a/opencensus/proto/agent/common/v1/BUILD.bazel
+++ b/opencensus/proto/agent/common/v1/BUILD.bazel
@@ -31,7 +31,7 @@ go_proto_library(
importpath = "github.com/census-instrumentation/opencensus-proto/gen-go/agent/common/v1",
proto = ":common_proto",
deps = [
- "@com_github_golang_protobuf//ptypes/timestamp:go_default_library",
+ "@org_golang_google_protobuf//types/known/timestamppb:go_default_library",
],
)

diff --git a/opencensus/proto/metrics/v1/BUILD.bazel b/opencensus/proto/metrics/v1/BUILD.bazel
index 6e8afdc..fd1a951 100644
--- a/opencensus/proto/metrics/v1/BUILD.bazel
+++ b/opencensus/proto/metrics/v1/BUILD.bazel
@@ -44,7 +44,7 @@ go_proto_library(
proto = ":metrics_proto",
deps = [
"//opencensus/proto/resource/v1:resource_proto_go",
- "@com_github_golang_protobuf//ptypes/timestamp:go_default_library",
- "@com_github_golang_protobuf//ptypes/wrappers:go_default_library",
+ "@org_golang_google_protobuf//types/known/timestamppb:go_default_library",
+ "@org_golang_google_protobuf//types/known/wrapperspb:go_default_library",
],
)
diff --git a/opencensus/proto/stats/v1/BUILD.bazel b/opencensus/proto/stats/v1/BUILD.bazel
index 5ab569d..2d18cad 100644
--- a/opencensus/proto/stats/v1/BUILD.bazel
+++ b/opencensus/proto/stats/v1/BUILD.bazel
@@ -42,6 +42,6 @@ go_proto_library(
importpath = "github.com/census-instrumentation/opencensus-proto/gen-go/stats/v1",
proto = ":stats_proto",
deps = [
- "@com_github_golang_protobuf//ptypes/timestamp:go_default_library",
+ "@org_golang_google_protobuf//types/known/timestamppb:go_default_library",
],
)
diff --git a/opencensus/proto/trace/v1/BUILD.bazel b/opencensus/proto/trace/v1/BUILD.bazel
index 0beb6d8..9aa1ad1 100644
--- a/opencensus/proto/trace/v1/BUILD.bazel
+++ b/opencensus/proto/trace/v1/BUILD.bazel
@@ -61,8 +61,8 @@ go_proto_library(
proto = ":trace_proto",
deps = [
"//opencensus/proto/resource/v1:resource_proto_go",
- "@com_github_golang_protobuf//ptypes/timestamp:go_default_library",
- "@com_github_golang_protobuf//ptypes/wrappers:go_default_library",
+ "@org_golang_google_protobuf//types/known/timestamppb:go_default_library",
+ "@org_golang_google_protobuf//types/known/wrapperspb:go_default_library",
],
)

@@ -77,7 +77,6 @@ py_proto_library(
srcs = ["trace.proto"],
deps = [
"//opencensus/proto/resource/v1:resource_proto_py",
- "@com_google_protobuf//:protobuf_python",
],
)

45 changes: 45 additions & 0 deletions modules/opencensus-proto/0.4.1/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
--- a/MODULE.bazel
+++ a/MODULE.bazel
@@ -0,0 +1,42 @@
+module(
+ name = "opencensus-proto",
+ version = "0.4.1",
+ compatibility_level = 1,
+)
+
+bazel_dep(
+ name = "gazelle",
+ version = "0.34.0",
+ repo_name = "bazel_gazelle",
+)
+bazel_dep(
+ name = "grpc",
+ version = "1.41.0",
+ repo_name = "com_github_grpc_grpc",
+)
+bazel_dep(
+ name = "protobuf",
+ version = "21.7",
+ repo_name = "com_google_protobuf",
+)
+bazel_dep(
+ name = "rules_go",
+ version = "0.45.1",
+ repo_name = "io_bazel_rules_go",
+)
+bazel_dep(
+ name = "rules_proto",
+ version = "5.3.0-21.7",
+)
+# -- bazel_dep definitions -- #
+
+go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
+go_deps.module(
+ path = "google.golang.org/protobuf",
+ sum = "h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=",
+ version = "v1.28.1",
+)
+use_repo(
+ go_deps,
+ "org_golang_google_protobuf",
+)
20 changes: 20 additions & 0 deletions modules/opencensus-proto/0.4.1/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
matrix:
platform:
- debian10
- ubuntu2004
- macos
- macos_arm64
- windows
bazel:
- 7.x
- 6.x
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- '@opencensus-proto//opencensus/proto/metrics/...'
- '@opencensus-proto//opencensus/proto/resource/...'
- '@opencensus-proto//opencensus/proto/stats/...'
- '@opencensus-proto//opencensus/proto/trace/...'
10 changes: 10 additions & 0 deletions modules/opencensus-proto/0.4.1/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url": "https://github.com/census-instrumentation/opencensus-proto/archive/refs/tags/v0.4.1.tar.gz",
"integrity": "sha256-49iff57YTJtu7oGMLpMGlQUZQCv4A2mLFcMQt3yi8PM=",
"strip_prefix": "opencensus-proto-0.4.1/src",
"patches": {
"build_dot_bazel.patch": "sha256-xWlS7pmQkdc8wd8qt0c2MB+ZHoy+H9oy2JA6Xj0Py/8=",
"module_dot_bazel.patch": "sha256-qgzstet5Oamsuw8g9qA6OV+kJcAR4XyCGyeiM2A1L80="
},
"patch_strip": 1
}
16 changes: 16 additions & 0 deletions modules/opencensus-proto/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"homepage": "https://github.com/census-instrumentation/opencensus-proto",
"maintainers": [
{
"email": "[email protected]",
"name": "No Maintainer Specified"
}
],
"repository": [
"github:census-instrumentation/opencensus-proto"
],
"versions": [
"0.4.1"
],
"yanked_versions": {}
}

0 comments on commit 188526f

Please sign in to comment.