diff --git a/.bazelrc b/.bazelrc new file mode 100644 index 00000000..0683c1c4 --- /dev/null +++ b/.bazelrc @@ -0,0 +1,5 @@ + +# load bazelrc from the legacy location +# as recommended in https://github.com/bazelbuild/bazel/issues/6319 +import %workspace%/tools/bazel.rc + diff --git a/.bazelversion b/.bazelversion new file mode 100644 index 00000000..47b322c9 --- /dev/null +++ b/.bazelversion @@ -0,0 +1 @@ +3.4.1 diff --git a/.gitignore b/.gitignore index 0a89e775..4fa212a5 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /test/*.dat /vendor /tmp/ +bazel-out diff --git a/BUILD.bazel b/BUILD.bazel new file mode 100644 index 00000000..6a3ab2ab --- /dev/null +++ b/BUILD.bazel @@ -0,0 +1,45 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "protoc-gen-doc", + srcs = [ + "doc.go", + "filters.go", + "plugin.go", + "renderer.go", + "resources.go", + "template.go", + "version.go", + ], + importpath = "github.com/pseudomuto/protoc-gen-doc", + visibility = ["//visibility:public"], + deps = [ + "//extensions", + "@com_github_golang_protobuf//proto:go_default_library", + "@com_github_masterminds_sprig//:go_default_library", + "@com_github_pseudomuto_protokit//:go_default_library", + "@io_bazel_rules_go//proto/wkt:compiler_plugin_go_proto", + "@io_bazel_rules_go//proto/wkt:descriptor_go_proto", + ], +) + +go_test( + name = "protoc-gen-doc_test", + srcs = [ + "bench_test.go", + "filters_test.go", + "plugin_test.go", + "renderer_test.go", + "template_test.go", + ], + embed = [":protoc-gen-doc"], + deps = [ + "//extensions", + "@com_github_golang_protobuf//proto:go_default_library", + "@com_github_pseudomuto_protokit//:go_default_library", + "@com_github_pseudomuto_protokit//utils:go_default_library", + "@com_github_stretchr_testify//require:go_default_library", + "@io_bazel_rules_go//proto/wkt:compiler_plugin_go_proto", + "@io_bazel_rules_go//proto/wkt:descriptor_go_proto", + ], +) diff --git a/WORKSPACE b/WORKSPACE new file mode 100644 index 00000000..c54473ac --- /dev/null +++ b/WORKSPACE @@ -0,0 +1,52 @@ +workspace( + name = "protoc_gen_doc", +) + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +http_archive( + name = "io_bazel_rules_go", + sha256 = "7f1aa43d986df189f7cf30e81dd2dc9d8ed7c74e356341a17267f6d7e5748382", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.24.1/rules_go-v0.24.1.tar.gz", + "https://github.com/bazelbuild/rules_go/releases/download/v0.24.1/rules_go-v0.24.1.tar.gz", + ], +) + +http_archive( + name = "bazel_gazelle", + sha256 = "d4113967ab451dd4d2d767c3ca5f927fec4b30f3b2c6f8135a2033b9c05a5687", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.0/bazel-gazelle-v0.22.0.tar.gz", + "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.0/bazel-gazelle-v0.22.0.tar.gz", + ], +) + +http_archive( + name = "com_google_protobuf", + sha256 = "0e8e32d44c9d4572975f43591b51cd3c77392661e4ded17fdfab81e8460344e8", + strip_prefix = "protobuf-31ebe2ac71400344a5db91ffc13c4ddfb7589f92/", + urls = [ + "https://github.com/google/protobuf/archive/31ebe2ac71400344a5db91ffc13c4ddfb7589f92.tar.gz", + ], +) + +load( + "@com_google_protobuf//:protobuf_deps.bzl", + "protobuf_deps", +) + +protobuf_deps() + +load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") +load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") +load("//defs:deps.bzl", "go_dependencies") + +# gazelle:repository_macro deps.bzl%go_dependencies +go_dependencies() + +go_rules_dependencies() + +go_register_toolchains() + +gazelle_dependencies() diff --git a/cmd/protoc-gen-doc/BUILD.bazel b/cmd/protoc-gen-doc/BUILD.bazel new file mode 100644 index 00000000..1eee453b --- /dev/null +++ b/cmd/protoc-gen-doc/BUILD.bazel @@ -0,0 +1,34 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test") + +go_library( + name = "protoc-gen-doc_lib", + srcs = [ + "flags.go", + "main.go", + ], + importpath = "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc", + visibility = ["//visibility:private"], + deps = [ + "//:protoc-gen-doc", + "//extensions/google_api_http", + "//extensions/lyft_validate", + "//extensions/validator_field", + "@com_github_pseudomuto_protokit//:go_default_library", + ], +) + +go_binary( + name = "protoc-gen-doc", + embed = [":protoc-gen-doc_lib"], + visibility = ["//visibility:public"], +) + +go_test( + name = "protoc-gen-doc_test", + srcs = [ + "flags_test.go", + "main_test.go", + ], + embed = [":protoc-gen-doc_lib"], + deps = ["@com_github_stretchr_testify//require:go_default_library"], +) diff --git a/defs/BUILD.bazel b/defs/BUILD.bazel new file mode 100644 index 00000000..d80fe2c0 --- /dev/null +++ b/defs/BUILD.bazel @@ -0,0 +1,3 @@ + +package(default_visibility = ["//visibility:public"]) + diff --git a/defs/deps.bzl b/defs/deps.bzl new file mode 100644 index 00000000..a5fc06d2 --- /dev/null +++ b/defs/deps.bzl @@ -0,0 +1,117 @@ +load("@bazel_gazelle//:deps.bzl", "go_repository") + +def go_dependencies(): + go_repository( + name = "com_github_aokoli_goutils", + importpath = "github.com/aokoli/goutils", + sum = "h1:7fpzNGoJ3VA8qcrm++XEE1QUe0mIwNeLa02Nwq7RDkg=", + version = "v1.0.1", + ) + go_repository( + name = "com_github_davecgh_go_spew", + importpath = "github.com/davecgh/go-spew", + sum = "h1:XxMZvQZtTXpWMNWK82vdjCLCe7uGMFXdTsJH0v3Hkvw=", + version = "v0.0.0-20161028175848-04cdfd42973b", + ) + go_repository( + name = "com_github_envoyproxy_protoc_gen_validate", + importpath = "github.com/envoyproxy/protoc-gen-validate", + sum = "h1:bV5JGEB1ouEzZa0hgVDFFiClrUEuGWRaAc/3mxR2QK0=", + version = "v0.3.0-java", + ) + go_repository( + name = "com_github_gogo_protobuf", + importpath = "github.com/gogo/protobuf", + sum = "h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo=", + version = "v1.1.1", + ) + go_repository( + name = "com_github_golang_protobuf", + importpath = "github.com/golang/protobuf", + sum = "h1:0iH4Ffd/meGoXqF2lSAhZHt8X+cPgkfn/cb6Cce5Vpc=", + version = "v1.1.0", + ) + go_repository( + name = "com_github_google_uuid", + importpath = "github.com/google/uuid", + sum = "h1:jWtZjFEUE/Bz0IeIhqCnyZ3HG6KRXSntXe4SjtuTH7c=", + version = "v0.0.0-20161128191214-064e2069ce9c", + ) + go_repository( + name = "com_github_huandu_xstrings", + importpath = "github.com/huandu/xstrings", + sum = "h1:pO2K/gKgKaat5LdpAhxhluX2GPQMaI3W5FUz/I/UnWk=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_imdario_mergo", + importpath = "github.com/imdario/mergo", + sum = "h1:mKkfHkZWD8dC7WxKx3N9WCF0Y+dLau45704YQmY6H94=", + version = "v0.3.4", + ) + go_repository( + name = "com_github_masterminds_semver", + importpath = "github.com/Masterminds/semver", + sum = "h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc=", + version = "v1.4.2", + ) + go_repository( + name = "com_github_masterminds_sprig", + importpath = "github.com/Masterminds/sprig", + sum = "h1:0gSxPGWS9PAr7U2NsQ2YQg6juRDINkUyuvbb4b2Xm8w=", + version = "v2.15.0+incompatible", + ) + go_repository( + name = "com_github_mwitkow_go_proto_validators", + importpath = "github.com/mwitkow/go-proto-validators", + sum = "h1:28i1IjGcx8AofiB4N3q5Yls55VEaitzuEPkFJEVgGkA=", + version = "v0.0.0-20180403085117-0950a7990007", + ) + go_repository( + name = "com_github_pmezard_go_difflib", + importpath = "github.com/pmezard/go-difflib", + sum = "h1:GD+A8+e+wFkqje55/2fOVnZPkoDIu1VooBWfNrnY8Uo=", + version = "v0.0.0-20151028094244-d8ed2627bdf0", + ) + go_repository( + name = "com_github_pseudomuto_protokit", + importpath = "github.com/pseudomuto/protokit", + sum = "h1:hlnBDcy3YEDXH7kc9gV+NLaN0cDzhDvD1s7Y6FZ8RpM=", + version = "v0.2.0", + ) + go_repository( + name = "com_github_stretchr_testify", + importpath = "github.com/stretchr/testify", + sum = "h1:Zx8Rp9ozC4FPFxfEKRSUu8+Ay3sZxEUZ7JrCWMbGgvE=", + version = "v0.0.0-20170130113145-4d4bfba8f1d1", + ) + go_repository( + name = "in_gopkg_check_v1", + importpath = "gopkg.in/check.v1", + sum = "h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=", + version = "v0.0.0-20161208181325-20d25e280405", + ) + go_repository( + name = "in_gopkg_yaml_v2", + importpath = "gopkg.in/yaml.v2", + sum = "h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=", + version = "v2.2.2", + ) + go_repository( + name = "org_golang_google_genproto", + importpath = "google.golang.org/genproto", + sum = "h1:b69RmkJsx8NyRJsKF2mQ/AF8s4BNxwNsT4rQ3wON1U0=", + version = "v0.0.0-20181107211654-5fc9ac540362", + ) + go_repository( + name = "org_golang_x_crypto", + importpath = "golang.org/x/crypto", + sum = "h1:O5C+XK++apFo5B+Vq4ujc/LkLwHxg9fDdgjgoIikBdA=", + version = "v0.0.0-20180501155221-613d6eafa307", + ) + go_repository( + name = "org_golang_x_sync", + importpath = "golang.org/x/sync", + sum = "h1:IqXQ59gzdXv58Jmm2xn0tSOR9i6HqroaOFRQ3wR/dJQ=", + version = "v0.0.0-20190412183630-56d357773e84", + ) diff --git a/deps.bzl b/deps.bzl new file mode 100644 index 00000000..e4876a20 --- /dev/null +++ b/deps.bzl @@ -0,0 +1,4 @@ + +load("//defs:deps.bzl", _go_dependencies="go_dependencies") +go_dependencies = _go_dependencies + diff --git a/examples/proto/BUILD.bazel b/examples/proto/BUILD.bazel new file mode 100644 index 00000000..ffc344ef --- /dev/null +++ b/examples/proto/BUILD.bazel @@ -0,0 +1,39 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") + +proto_library( + name = "com_example_proto", + srcs = [ + "Booking.proto", + "Customer.proto", + "IgnoreMe.proto", + "Vehicle.proto", + ], + visibility = ["//visibility:public"], + deps = [ + "//github.com/envoyproxy/protoc-gen-validate/validate:validate_proto", + "//github.com/mwitkow/go-proto-validators:validators_proto", + "@go_googleapis//google/api:annotations_proto", + ], +) + +go_proto_library( + name = "com_example_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "github.com/pseudomuto/protoc-gen-doc/examples/proto", + proto = ":com_example_proto", + visibility = ["//visibility:public"], + deps = [ + "//github.com/envoyproxy/protoc-gen-validate/validate:validate.proto", + "//github.com/mwitkow/go-proto-validators:validator.proto", + "@go_googleapis//google/api:annotations_go_proto", + ], +) + +go_library( + name = "proto", + embed = [":com_example_go_proto"], + importpath = "github.com/pseudomuto/protoc-gen-doc/examples/proto", + visibility = ["//visibility:public"], +) diff --git a/extensions/BUILD.bazel b/extensions/BUILD.bazel new file mode 100644 index 00000000..d43d2b1f --- /dev/null +++ b/extensions/BUILD.bazel @@ -0,0 +1,8 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "extensions", + srcs = ["extensions.go"], + importpath = "github.com/pseudomuto/protoc-gen-doc/extensions", + visibility = ["//visibility:public"], +) diff --git a/extensions/envoyproxy_validate/BUILD.bazel b/extensions/envoyproxy_validate/BUILD.bazel new file mode 100644 index 00000000..49c3857c --- /dev/null +++ b/extensions/envoyproxy_validate/BUILD.bazel @@ -0,0 +1,25 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "envoyproxy_validate", + srcs = ["envoyproxy_validate.go"], + importpath = "github.com/pseudomuto/protoc-gen-doc/extensions/envoyproxy_validate", + visibility = ["//visibility:public"], + deps = [ + "//extensions", + "//thirdparty/github.com/envoyproxy/protoc-gen-validate/validate", + ], +) + +go_test( + name = "envoyproxy_validate_test", + srcs = ["envoyproxy_validate_test.go"], + embed = [":envoyproxy_validate"], + deps = [ + "//extensions", + "//extensions/lyft_validate", + "//thirdparty/github.com/envoyproxy/protoc-gen-validate/validate", + "@com_github_golang_protobuf//proto:go_default_library", + "@com_github_stretchr_testify//require:go_default_library", + ], +) diff --git a/extensions/google_api_http/BUILD.bazel b/extensions/google_api_http/BUILD.bazel new file mode 100644 index 00000000..40493cde --- /dev/null +++ b/extensions/google_api_http/BUILD.bazel @@ -0,0 +1,23 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "google_api_http", + srcs = ["google_api_http.go"], + importpath = "github.com/pseudomuto/protoc-gen-doc/extensions/google_api_http", + visibility = ["//visibility:public"], + deps = [ + "//extensions", + "@go_googleapis//google/api:annotations_go_proto", + ], +) + +go_test( + name = "google_api_http_test", + srcs = ["google_api_http_test.go"], + embed = [":google_api_http"], + deps = [ + "//extensions", + "@com_github_stretchr_testify//require:go_default_library", + "@go_googleapis//google/api:annotations_go_proto", + ], +) diff --git a/extensions/lyft_validate/BUILD.bazel b/extensions/lyft_validate/BUILD.bazel new file mode 100644 index 00000000..9a26965a --- /dev/null +++ b/extensions/lyft_validate/BUILD.bazel @@ -0,0 +1,9 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "lyft_validate", + srcs = ["alias.go"], + importpath = "github.com/pseudomuto/protoc-gen-doc/extensions/lyft_validate", + visibility = ["//visibility:public"], + deps = ["//extensions/envoyproxy_validate"], +) diff --git a/extensions/validator_field/BUILD.bazel b/extensions/validator_field/BUILD.bazel new file mode 100644 index 00000000..d826d155 --- /dev/null +++ b/extensions/validator_field/BUILD.bazel @@ -0,0 +1,26 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "validator_field", + srcs = ["validator_field.go"], + importpath = "github.com/pseudomuto/protoc-gen-doc/extensions/validator_field", + visibility = ["//visibility:public"], + deps = [ + "//extensions", + "@com_github_golang_protobuf//proto:go_default_library", + "@com_github_mwitkow_go_proto_validators//:go_default_library", + "@io_bazel_rules_go//proto/wkt:descriptor_go_proto", + ], +) + +go_test( + name = "validator_field_test", + srcs = ["validator_field_test.go"], + embed = [":validator_field"], + deps = [ + "//extensions", + "@com_github_golang_protobuf//proto:go_default_library", + "@com_github_mwitkow_go_proto_validators//:go_default_library", + "@com_github_stretchr_testify//require:go_default_library", + ], +) diff --git a/fixtures/BUILD.bazel b/fixtures/BUILD.bazel new file mode 100644 index 00000000..428508b8 --- /dev/null +++ b/fixtures/BUILD.bazel @@ -0,0 +1,30 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") + +proto_library( + name = "com_example_proto", + srcs = [ + "Booking.proto", + "Vehicle.proto", + ], + visibility = ["//visibility:public"], + deps = ["//github.com/pseudomuto/protokit/fixtures:fixtures_proto"], +) + +go_proto_library( + name = "com_example_go_proto", + compilers = ["@io_bazel_rules_go//proto:go_grpc"], + importpath = "github.com/pseudomuto/protoc-gen-doc/fixtures", + proto = ":com_example_proto", + visibility = ["//visibility:public"], + deps = ["//github.com/pseudomuto/protokit/fixtures:extend.proto"], +) + +go_library( + name = "fixtures", + srcs = ["generate.go"], + embed = [":com_example_go_proto"], + importpath = "github.com/pseudomuto/protoc-gen-doc/fixtures", + visibility = ["//visibility:public"], +) diff --git a/resources/BUILD.bazel b/resources/BUILD.bazel new file mode 100644 index 00000000..32f4730c --- /dev/null +++ b/resources/BUILD.bazel @@ -0,0 +1,14 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "resources_lib", + srcs = ["main.go"], + importpath = "github.com/pseudomuto/protoc-gen-doc/resources", + visibility = ["//visibility:private"], +) + +go_binary( + name = "resources", + embed = [":resources_lib"], + visibility = ["//visibility:public"], +) diff --git a/thirdparty/BUILD.bazel b/thirdparty/BUILD.bazel new file mode 100644 index 00000000..61afaacb --- /dev/null +++ b/thirdparty/BUILD.bazel @@ -0,0 +1,8 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "thirdparty", + srcs = ["generate.go"], + importpath = "github.com/pseudomuto/protoc-gen-doc/thirdparty", + visibility = ["//visibility:public"], +) diff --git a/thirdparty/github.com/envoyproxy/protoc-gen-validate/validate/BUILD.bazel b/thirdparty/github.com/envoyproxy/protoc-gen-validate/validate/BUILD.bazel new file mode 100644 index 00000000..6eeb020e --- /dev/null +++ b/thirdparty/github.com/envoyproxy/protoc-gen-validate/validate/BUILD.bazel @@ -0,0 +1,28 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") + +proto_library( + name = "validate_proto", + srcs = ["validate.proto"], + visibility = ["//visibility:public"], + deps = [ + "@com_google_protobuf//:descriptor_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +go_proto_library( + name = "validate_go_proto", + importpath = "github.com/envoyproxy/protoc-gen-validate/validate", + proto = ":validate_proto", + visibility = ["//visibility:public"], +) + +go_library( + name = "validate", + embed = [":validate_go_proto"], + importpath = "github.com/envoyproxy/protoc-gen-validate/validate", + visibility = ["//visibility:public"], +) diff --git a/thirdparty/github.com/mwitkow/go-proto-validators/BUILD.bazel b/thirdparty/github.com/mwitkow/go-proto-validators/BUILD.bazel new file mode 100644 index 00000000..24c9f7ff --- /dev/null +++ b/thirdparty/github.com/mwitkow/go-proto-validators/BUILD.bazel @@ -0,0 +1,24 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") + +proto_library( + name = "validator_proto", + srcs = ["validator.proto"], + visibility = ["//visibility:public"], + deps = ["@com_google_protobuf//:descriptor_proto"], +) + +go_proto_library( + name = "validator_go_proto", + importpath = "github.com/pseudomuto/protoc-gen-doc/thirdparty/github.com/mwitkow/go-proto-validators", + proto = ":validator_proto", + visibility = ["//visibility:public"], +) + +go_library( + name = "go-proto-validators", + embed = [":validator_go_proto"], + importpath = "github.com/pseudomuto/protoc-gen-doc/thirdparty/github.com/mwitkow/go-proto-validators", + visibility = ["//visibility:public"], +) diff --git a/thirdparty/github.com/pseudomuto/protokit/fixtures/BUILD.bazel b/thirdparty/github.com/pseudomuto/protokit/fixtures/BUILD.bazel new file mode 100644 index 00000000..b8b432ad --- /dev/null +++ b/thirdparty/github.com/pseudomuto/protokit/fixtures/BUILD.bazel @@ -0,0 +1,24 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") + +proto_library( + name = "com_pseudomuto_protokit_v1_proto", + srcs = ["extend.proto"], + visibility = ["//visibility:public"], + deps = ["@com_google_protobuf//:descriptor_proto"], +) + +go_proto_library( + name = "com_pseudomuto_protokit_v1_go_proto", + importpath = "github.com/pseudomuto/protoc-gen-doc/thirdparty/github.com/pseudomuto/protokit/fixtures", + proto = ":com_pseudomuto_protokit_v1_proto", + visibility = ["//visibility:public"], +) + +go_library( + name = "fixtures", + embed = [":com_pseudomuto_protokit_v1_go_proto"], + importpath = "github.com/pseudomuto/protoc-gen-doc/thirdparty/github.com/pseudomuto/protokit/fixtures", + visibility = ["//visibility:public"], +) diff --git a/tools/bazel.rc b/tools/bazel.rc new file mode 100644 index 00000000..acd87612 --- /dev/null +++ b/tools/bazel.rc @@ -0,0 +1,66 @@ + +# bazelrc file +# bazel >= 0.18 looks for %workspace%/.bazelrc (which redirects here) +# Older bazel versions look for %workspace%/tools/bazel.rc (this file) +# See https://github.com/bazelbuild/bazel/issues/6319 + + +## +# Base Settings +## + +common --experimental_allow_incremental_repository_updates + +run --incompatible_restrict_string_escapes=false +run --incompatible_strict_action_env + +build --strategy=sandboxed +build --incompatible_restrict_string_escapes=false +build --watchfs +build --symlink_prefix=dist/ +build --nolegacy_external_runfiles +build --incompatible_strict_action_env +build --interface_shared_objects +build --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_vanilla + +build --worker_sandboxing +build --disk_cache=~/.cache/bazel-disk-cache +build:dbg --compilation_mode=dbg + +common:ci --curses=no + +build:ci --worker_max_instances=32 +build:ci --local_cpu_resources=32 +build:ci --local_ram_resources="HOST_RAM*.8" +build:ci --experimental_persistent_javac +build:ci --verbose_failures +build:ci --worker_verbose +build:ci --repository_cache=~/.cache/bazel/repo +build:ci --disk_cache=~/.cache/bazel/disk + +run:ci --worker_max_instances=32 +run:ci --local_cpu_resources=32 +run:ci --local_ram_resources="HOST_RAM*.8" +run:ci --experimental_persistent_javac +run:ci --verbose_failures +run:ci --worker_verbose +run:ci --repository_cache=~/.cache/bazel/repo +run:ci --disk_cache=~/.cache/bazel/disk + +test:ci --test_output=all +test:ci --test_verbose_timeout_warnings + +fetch:ci --repository_cache=~/.cache/bazel/repo +query:ci --repository_cache=~/.cache/bazel/repo + +build:release --compilation_mode=opt +build:release --copt=-Wframe-larger-than=16384 +build:release --copt=-O3 +run:release --compilation_mode=opt +run:release --copt=-Wframe-larger-than=16384 +run:release --copt=-O3 + +query --output=label_kind + +try-import %workspace%/.bazelrc.user +