-
Notifications
You must be signed in to change notification settings - Fork 13
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 protoc v26.0 and protobuf-ts v2.9.4 #1116
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
FROM gcr.io/bazel-public/bazel:7.1.0 | ||
FROM gcr.io/bazel-public/bazel:7.0.2 | ||
|
||
CMD echo this is a dummy file used to automate dependency upgrades for plugins |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!Dockerfile | ||
!package*.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# syntax=docker/dockerfile:1.4 | ||
FROM node:20.11.1-alpine3.19 AS build | ||
WORKDIR /app | ||
COPY --link package*.json . | ||
RUN npm ci | ||
RUN sed -i -e 's|/usr/bin/env node|/nodejs/bin/node|g' /app/node_modules/@protobuf-ts/plugin/bin/protoc-gen-ts | ||
|
||
FROM gcr.io/distroless/nodejs20-debian12:latest@sha256:e0edb89411e3f93863e9bd97c15cddcbac968d7a16b7a82af6ae6b264da65de9 | ||
COPY --link --from=build /app /app | ||
USER nobody | ||
ENTRYPOINT [ "/app/node_modules/.bin/protoc-gen-ts" ] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: v1 | ||
name: buf.build/community/timostamm-protobuf-ts | ||
plugin_version: v2.9.4 | ||
source_url: https://github.com/timostamm/protobuf-ts | ||
integration_guide_url: https://github.com/timostamm/protobuf-ts#quickstart | ||
description: Generates Protobuf and RPC for TypeScript. | ||
output_languages: | ||
- javascript | ||
- typescript | ||
registry: | ||
npm: | ||
import_style: module | ||
deps: | ||
- package: '@protobuf-ts/runtime' | ||
version: ^2.9.4 | ||
- package: '@protobuf-ts/runtime-rpc' | ||
version: ^2.9.4 | ||
opts: | ||
- output_javascript,optimize_code_size,long_type_string,add_pb_suffix,ts_nocheck,eslint_disable | ||
spdx_license_id: Apache-2.0 | ||
license_url: https://github.com/timostamm/protobuf-ts/blob/v2.9.4/LICENSE |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "plugins-timostamm-protobuf-ts", | ||
"version": "1.0.0", | ||
"dependencies": { | ||
"@protobuf-ts/plugin": "2.9.4" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
* | ||
!BUILD | ||
!cpp.cc | ||
!Dockerfile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
cc_binary( | ||
name = "protoc-gen-cpp", | ||
srcs = ["cpp.cc"], | ||
deps = [ | ||
"//:protoc_lib", | ||
], | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# syntax=docker/dockerfile:1.5 | ||
FROM debian:bookworm-20240311 AS build | ||
|
||
ARG TARGETARCH | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y curl git cmake build-essential g++ unzip zip | ||
RUN arch=${TARGETARCH}; \ | ||
if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \ | ||
curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.0.2/bazel-7.0.2-linux-${arch} \ | ||
&& chmod +x /usr/local/bin/bazel | ||
|
||
WORKDIR /build | ||
RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v26.0/protobuf-26.0.tar.gz \ | ||
&& tar --strip-components=1 -zxf protoc.tar.gz \ | ||
&& rm protoc.tar.gz | ||
RUN bazel build '//:protoc_lib' | ||
COPY --link BUILD cpp.cc plugins/ | ||
RUN bazel build '//plugins:protoc-gen-cpp.stripped' | ||
|
||
FROM gcr.io/distroless/cc-debian12:latest@sha256:e6ae66a5a343d7112167f9117c4e630cfffcd80db44e44302759ec13ddd2d22b | ||
COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-cpp . | ||
USER nobody | ||
ENTRYPOINT ["/protoc-gen-cpp"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: v1 | ||
name: buf.build/protocolbuffers/cpp | ||
plugin_version: v26.0 | ||
source_url: https://github.com/protocolbuffers/protobuf | ||
description: Base types for C++. Generates message and enum types. | ||
output_languages: | ||
- cpp | ||
spdx_license_id: BSD-3-Clause | ||
license_url: https://github.com/protocolbuffers/protobuf/blob/v26.0/LICENSE |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include <google/protobuf/compiler/cpp/generator.h> | ||
#include <google/protobuf/compiler/plugin.h> | ||
|
||
int main(int argc, char *argv[]) { | ||
google::protobuf::compiler::cpp::CppGenerator generator; | ||
return google::protobuf::compiler::PluginMain(argc, argv, &generator); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
* | ||
!BUILD | ||
!csharp.cc | ||
!Dockerfile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
cc_binary( | ||
name = "protoc-gen-csharp", | ||
srcs = ["csharp.cc"], | ||
deps = [ | ||
"//:protoc_lib", | ||
], | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# syntax=docker/dockerfile:1.5 | ||
FROM debian:bookworm-20240311 AS build | ||
|
||
ARG TARGETARCH | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y curl git cmake build-essential g++ unzip zip | ||
RUN arch=${TARGETARCH}; \ | ||
if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \ | ||
curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.0.2/bazel-7.0.2-linux-${arch} \ | ||
&& chmod +x /usr/local/bin/bazel | ||
|
||
WORKDIR /build | ||
RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v26.0/protobuf-26.0.tar.gz \ | ||
&& tar --strip-components=1 -zxf protoc.tar.gz \ | ||
&& rm protoc.tar.gz | ||
RUN bazel build '//:protoc_lib' | ||
COPY --link BUILD csharp.cc plugins/ | ||
RUN bazel build '//plugins:protoc-gen-csharp.stripped' | ||
|
||
FROM gcr.io/distroless/cc-debian12:latest@sha256:e6ae66a5a343d7112167f9117c4e630cfffcd80db44e44302759ec13ddd2d22b | ||
COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-csharp . | ||
USER nobody | ||
ENTRYPOINT ["/protoc-gen-csharp"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: v1 | ||
name: buf.build/protocolbuffers/csharp | ||
plugin_version: v26.0 | ||
source_url: https://github.com/protocolbuffers/protobuf | ||
description: Base types for C#. Generates message and enum types. | ||
output_languages: | ||
- csharp | ||
spdx_license_id: BSD-3-Clause | ||
license_url: https://github.com/protocolbuffers/protobuf/blob/v26.0/LICENSE |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include <google/protobuf/compiler/csharp/csharp_generator.h> | ||
#include <google/protobuf/compiler/plugin.h> | ||
|
||
int main(int argc, char *argv[]) { | ||
google::protobuf::compiler::csharp::Generator generator; | ||
return google::protobuf::compiler::PluginMain(argc, argv, &generator); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
* | ||
!BUILD | ||
!Dockerfile | ||
!java.cc |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
cc_binary( | ||
name = "protoc-gen-java", | ||
srcs = ["java.cc"], | ||
deps = [ | ||
"//:protoc_lib", | ||
], | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# syntax=docker/dockerfile:1.5 | ||
FROM debian:bookworm-20240311 AS build | ||
|
||
ARG TARGETARCH | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y curl git cmake build-essential g++ unzip zip | ||
RUN arch=${TARGETARCH}; \ | ||
if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \ | ||
curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.0.2/bazel-7.0.2-linux-${arch} \ | ||
&& chmod +x /usr/local/bin/bazel | ||
|
||
WORKDIR /build | ||
RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v26.0/protobuf-26.0.tar.gz \ | ||
&& tar --strip-components=1 -zxf protoc.tar.gz \ | ||
&& rm protoc.tar.gz | ||
RUN bazel build '//:protoc_lib' | ||
COPY --link BUILD java.cc plugins/ | ||
RUN bazel build '//plugins:protoc-gen-java.stripped' | ||
|
||
FROM gcr.io/distroless/cc-debian12:latest@sha256:e6ae66a5a343d7112167f9117c4e630cfffcd80db44e44302759ec13ddd2d22b | ||
COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-java . | ||
USER nobody | ||
ENTRYPOINT ["/protoc-gen-java"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: v1 | ||
name: buf.build/protocolbuffers/java | ||
plugin_version: v26.0 | ||
source_url: https://github.com/protocolbuffers/protobuf | ||
description: Base types for Java. Generates message and enum types. | ||
output_languages: | ||
- java | ||
spdx_license_id: BSD-3-Clause | ||
license_url: https://github.com/protocolbuffers/protobuf/blob/v26.0/LICENSE | ||
registry: | ||
maven: | ||
deps: | ||
- com.google.protobuf:protobuf-java:4.26.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Major version of dependencies bumped for Java. |
||
additional_runtimes: | ||
- name: lite | ||
deps: | ||
- com.google.protobuf:protobuf-javalite:4.26.0 | ||
- build.buf:protobuf-javalite:4.26.0 | ||
opts: [lite] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include <google/protobuf/compiler/java/generator.h> | ||
#include <google/protobuf/compiler/plugin.h> | ||
|
||
int main(int argc, char *argv[]) { | ||
google::protobuf::compiler::java::JavaGenerator generator; | ||
return google::protobuf::compiler::PluginMain(argc, argv, &generator); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
* | ||
!BUILD | ||
!Dockerfile | ||
!kotlin.cc |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
cc_binary( | ||
name = "protoc-gen-kotlin", | ||
srcs = ["kotlin.cc"], | ||
deps = [ | ||
"//:protoc_lib", | ||
], | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# syntax=docker/dockerfile:1.5 | ||
FROM debian:bookworm-20240311 AS build | ||
|
||
ARG TARGETARCH | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y curl git cmake build-essential g++ unzip zip | ||
RUN arch=${TARGETARCH}; \ | ||
if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \ | ||
curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.0.2/bazel-7.0.2-linux-${arch} \ | ||
&& chmod +x /usr/local/bin/bazel | ||
|
||
WORKDIR /build | ||
RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v26.0/protobuf-26.0.tar.gz \ | ||
&& tar --strip-components=1 -zxf protoc.tar.gz \ | ||
&& rm protoc.tar.gz | ||
RUN bazel build '//:protoc_lib' | ||
COPY --link BUILD kotlin.cc plugins/ | ||
RUN bazel build '//plugins:protoc-gen-kotlin.stripped' | ||
|
||
FROM gcr.io/distroless/cc-debian12:latest@sha256:e6ae66a5a343d7112167f9117c4e630cfffcd80db44e44302759ec13ddd2d22b | ||
COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-kotlin . | ||
USER nobody | ||
ENTRYPOINT ["/protoc-gen-kotlin"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: v1 | ||
name: buf.build/protocolbuffers/kotlin | ||
plugin_version: v26.0 | ||
source_url: https://github.com/protocolbuffers/protobuf | ||
integration_guide_url: https://protobuf.dev/getting-started/kotlintutorial | ||
description: Base types for Kotlin. Generates message and enum types. | ||
deps: | ||
- plugin: buf.build/protocolbuffers/java:v26.0 | ||
output_languages: | ||
- kotlin | ||
spdx_license_id: BSD-3-Clause | ||
license_url: https://github.com/protocolbuffers/protobuf/blob/v26.0/LICENSE | ||
registry: | ||
maven: | ||
compiler: | ||
kotlin: | ||
version: 1.8.22 | ||
deps: | ||
- com.google.protobuf:protobuf-kotlin:4.26.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Major version bump for kotlin too. |
||
- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 | ||
- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22 | ||
additional_runtimes: | ||
- name: lite | ||
deps: | ||
- com.google.protobuf:protobuf-kotlin-lite:4.26.0 | ||
- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 | ||
opts: [lite] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include <google/protobuf/compiler/java/kotlin_generator.h> | ||
#include <google/protobuf/compiler/plugin.h> | ||
|
||
int main(int argc, char *argv[]) { | ||
google::protobuf::compiler::java::KotlinGenerator generator; | ||
return google::protobuf::compiler::PluginMain(argc, argv, &generator); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
* | ||
!BUILD | ||
!Dockerfile | ||
!objectivec.cc |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
cc_binary( | ||
name = "protoc-gen-objectivec", | ||
srcs = ["objectivec.cc"], | ||
deps = [ | ||
"//:protoc_lib", | ||
], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something the new bazel is doing is breaking protoc builds. I tested some locally and couldn't find a solution so reverting this back for now.
Build failures look like: