├── pytest.ini ├── thirdparty ├── bzip2 │ ├── BUILD │ └── BUILD.bzip2 ├── libffi │ └── BUILD ├── lz4 │ ├── BUILD │ └── BUILD.lz4 ├── sqlite │ └── BUILD ├── xz │ └── BUILD ├── zlib │ ├── BUILD │ └── BUILD.zlib ├── zstd │ └── BUILD ├── ncurses │ ├── BUILD │ └── convert_modules.py ├── openssl │ └── BUILD ├── readline │ └── BUILD ├── squashfs-tools │ └── BUILD └── cpython │ ├── symbols.lds │ ├── gen_2to3_grammar.py │ └── bazel_linkstamp.cc ├── go └── src │ ├── dropbox │ ├── runfiles │ │ ├── test_data.empty │ │ ├── data │ │ │ └── config.runfiles │ │ │ │ └── __main__ │ │ │ │ ├── test.json │ │ │ │ └── subdir │ │ │ │ └── another.json │ │ ├── BUILD.in │ │ └── BUILD │ ├── build_tools │ │ ├── svcctl │ │ │ ├── cmd │ │ │ │ ├── svcctl │ │ │ │ │ ├── BUILD.in │ │ │ │ │ └── BUILD │ │ │ │ ├── svcd │ │ │ │ │ ├── BUILD.in │ │ │ │ │ ├── BUILD │ │ │ │ │ └── svcd.go │ │ │ │ └── svcinit │ │ │ │ │ ├── BUILD.in │ │ │ │ │ └── failing_junit_test.go │ │ │ ├── BUILD.in │ │ │ ├── svclib │ │ │ │ ├── BUILD.in │ │ │ │ ├── healthchecks.go │ │ │ │ └── constants.go │ │ │ ├── state_machine │ │ │ │ └── BUILD │ │ │ ├── proc │ │ │ │ └── BUILD │ │ │ ├── topological │ │ │ │ └── BUILD │ │ │ ├── topological_stopper.go │ │ │ └── topological_starter.go │ │ ├── build-tar │ │ │ ├── BUILD.in │ │ │ └── BUILD │ │ ├── gen-build-go │ │ │ ├── test_data │ │ │ │ ├── tagmap.go.txt │ │ │ │ ├── tagmap.BUILD.txt │ │ │ │ ├── simple.BUILD.txt │ │ │ │ └── subpackages.BUILD.txt │ │ │ ├── lib │ │ │ │ ├── BUILD.in │ │ │ │ ├── targetlist.go │ │ │ │ ├── genbuildgolib_test.go │ │ │ │ ├── embed_test.go │ │ │ │ └── godep.go │ │ │ ├── go.mod │ │ │ ├── BUILD.in │ │ │ └── BUILD │ │ ├── build-sqfs │ │ │ ├── BUILD.in │ │ │ └── BUILD │ │ ├── bazel │ │ │ ├── env.go │ │ │ └── BUILD │ │ ├── update-gen-build-go-srcs │ │ │ ├── BUILD.in │ │ │ ├── main_test.go │ │ │ └── BUILD │ │ ├── logwriter │ │ │ ├── BUILD │ │ │ └── logwriter.go │ │ ├── gocov2cobertura │ │ │ └── BUILD │ │ ├── gojunit │ │ │ ├── gojunit │ │ │ │ ├── BUILD │ │ │ │ └── main.go │ │ │ └── BUILD │ │ ├── codegen │ │ │ ├── line_writer_test.go │ │ │ ├── proto │ │ │ │ └── BUILD │ │ │ └── BUILD │ │ ├── build-merge │ │ │ └── BUILD │ │ └── junit │ │ │ └── BUILD │ ├── devtools │ │ ├── gomodlib │ │ │ ├── BUILD.in │ │ │ ├── fixtures │ │ │ │ ├── BUILD.in │ │ │ │ └── BUILD │ │ │ └── BUILD │ │ └── coverage │ │ │ └── cobertura │ │ │ └── coberturaxml │ │ │ └── BUILD │ ├── cputime │ │ └── BUILD │ ├── proto │ │ ├── mypy │ │ │ └── BUILD │ │ └── build_tools │ │ │ └── svclib │ │ │ └── BUILD │ └── procfs │ │ ├── BUILD │ │ └── stat_test.go │ ├── github.com │ ├── stretchr │ │ └── testify │ │ │ ├── BUILD │ │ │ ├── go.mod │ │ │ ├── .dbxvendor.json │ │ │ └── dbx-patches │ │ │ └── bazel.patch │ ├── gogo │ │ └── protobuf │ │ │ ├── vanity │ │ │ ├── test │ │ │ │ ├── doc.go │ │ │ │ ├── BUILD │ │ │ │ ├── fast │ │ │ │ │ └── BUILD │ │ │ │ ├── faster │ │ │ │ │ └── BUILD │ │ │ │ └── slick │ │ │ │ │ └── BUILD │ │ │ └── BUILD │ │ │ ├── conformance │ │ │ ├── conformance.sh │ │ │ ├── internal │ │ │ │ └── conformance_proto │ │ │ │ │ └── BUILD │ │ │ ├── BUILD │ │ │ └── test.sh │ │ │ ├── .dbxvendor.json │ │ │ ├── GOLANG_CONTRIBUTORS │ │ │ ├── jsonpb │ │ │ ├── jsonpb_test_proto │ │ │ │ ├── bytes.go │ │ │ │ └── BUILD │ │ │ └── BUILD │ │ │ ├── go.mod │ │ │ ├── proto │ │ │ ├── proto3_proto │ │ │ │ ├── Makefile │ │ │ │ └── BUILD │ │ │ └── test_proto │ │ │ │ └── BUILD │ │ │ ├── version │ │ │ └── BUILD │ │ │ ├── gogoreplace │ │ │ ├── BUILD │ │ │ └── main.go │ │ │ ├── sortkeys │ │ │ └── BUILD │ │ │ ├── codec │ │ │ └── BUILD │ │ │ ├── protoc-gen-combo │ │ │ └── BUILD │ │ │ ├── protoc-gen-gogo │ │ │ ├── BUILD │ │ │ ├── generator │ │ │ │ ├── internal │ │ │ │ │ └── remap │ │ │ │ │ │ └── BUILD │ │ │ │ └── BUILD │ │ │ ├── plugin │ │ │ │ └── BUILD │ │ │ ├── grpc │ │ │ │ └── BUILD │ │ │ └── descriptor │ │ │ │ ├── BUILD │ │ │ │ └── descriptor_test.go │ │ │ ├── protoc-min-version │ │ │ └── BUILD │ │ │ ├── io │ │ │ └── BUILD │ │ │ ├── protoc-gen-gofast │ │ │ └── BUILD │ │ │ ├── protoc-gen-gogofast │ │ │ └── BUILD │ │ │ ├── plugin │ │ │ ├── testgen │ │ │ │ └── BUILD │ │ │ ├── embedcheck │ │ │ │ └── BUILD │ │ │ ├── oneofcheck │ │ │ │ └── BUILD │ │ │ ├── defaultcheck │ │ │ │ └── BUILD │ │ │ ├── enumstringer │ │ │ │ └── BUILD │ │ │ ├── face │ │ │ │ └── BUILD │ │ │ ├── union │ │ │ │ └── BUILD │ │ │ ├── gostring │ │ │ │ └── BUILD │ │ │ ├── stringer │ │ │ │ └── BUILD │ │ │ ├── unmarshal │ │ │ │ └── BUILD │ │ │ ├── populate │ │ │ │ └── BUILD │ │ │ ├── marshalto │ │ │ │ └── BUILD │ │ │ ├── description │ │ │ │ └── BUILD │ │ │ ├── size │ │ │ │ └── BUILD │ │ │ ├── equal │ │ │ │ └── BUILD │ │ │ └── compare │ │ │ │ └── BUILD │ │ │ ├── protoc-gen-gogofaster │ │ │ └── BUILD │ │ │ ├── protoc-gen-gogoslick │ │ │ └── BUILD │ │ │ ├── protoc-gen-gogotypes │ │ │ └── BUILD │ │ │ ├── .mailmap │ │ │ ├── protoc-gen-gostring │ │ │ └── BUILD │ │ │ ├── gogoproto │ │ │ └── BUILD │ │ │ ├── .travis.yml │ │ │ ├── AUTHORS │ │ │ ├── install-protobuf.sh │ │ │ ├── CONTRIBUTORS │ │ │ └── types │ │ │ └── BUILD │ ├── envoyproxy │ │ └── protoc-gen-validate │ │ │ ├── .bazelversion │ │ │ ├── python │ │ │ └── protoc_gen_validate │ │ │ │ └── __init__.py │ │ │ ├── .dockerignore │ │ │ ├── validate │ │ │ ├── BUILD.in │ │ │ └── BUILD │ │ │ ├── templates │ │ │ ├── java │ │ │ │ ├── unimplemented.go │ │ │ │ ├── none.go │ │ │ │ ├── bool.go │ │ │ │ ├── required.go │ │ │ │ ├── message.go │ │ │ │ ├── wrapper.go │ │ │ │ ├── oneof.go │ │ │ │ ├── repeated.go │ │ │ │ ├── any.go │ │ │ │ └── msg.go │ │ │ ├── cc │ │ │ │ ├── none.go │ │ │ │ ├── num.go │ │ │ │ ├── wrapper.go │ │ │ │ ├── const.go │ │ │ │ ├── enum.go │ │ │ │ ├── any.go │ │ │ │ ├── message.go │ │ │ │ ├── in.go │ │ │ │ └── BUILD │ │ │ ├── goshared │ │ │ │ ├── none.go │ │ │ │ ├── num.go │ │ │ │ ├── wrapper.go │ │ │ │ ├── enum.go │ │ │ │ ├── const.go │ │ │ │ ├── any.go │ │ │ │ ├── in.go │ │ │ │ └── BUILD │ │ │ ├── go │ │ │ │ ├── required.go │ │ │ │ ├── duration.go │ │ │ │ ├── timestamp.go │ │ │ │ ├── register.go │ │ │ │ ├── BUILD │ │ │ │ └── message.go │ │ │ ├── ccnop │ │ │ │ ├── register.go │ │ │ │ ├── BUILD │ │ │ │ └── file.go │ │ │ ├── shared │ │ │ │ ├── functions.go │ │ │ │ ├── reflection.go │ │ │ │ ├── BUILD │ │ │ │ └── disabled.go │ │ │ └── BUILD │ │ │ ├── .dbxvendor.json │ │ │ ├── Tools.mk │ │ │ ├── tools.go │ │ │ ├── tools │ │ │ └── build │ │ │ │ ├── Env.mk │ │ │ │ └── Installer.mk │ │ │ ├── .clang-format │ │ │ ├── .github │ │ │ ├── workflows │ │ │ │ ├── notify-approval-bypass.yaml │ │ │ │ ├── emergency-review-bypass.yaml │ │ │ │ ├── pr-title.yaml │ │ │ │ ├── maven-build.yaml │ │ │ │ ├── goreleaser.yaml │ │ │ │ └── python-package.yaml │ │ │ ├── dependabot.yml │ │ │ ├── buf-logo.svg │ │ │ └── stale.yml │ │ │ ├── requirements.txt │ │ │ ├── bazel │ │ │ ├── BUILD.in │ │ │ └── BUILD │ │ │ ├── WORKSPACE │ │ │ ├── cmd │ │ │ ├── protoc-gen-validate-cpp │ │ │ │ ├── main.go │ │ │ │ └── BUILD │ │ │ ├── protoc-gen-validate-java │ │ │ │ ├── main.go │ │ │ │ └── BUILD │ │ │ └── protoc-gen-validate-go │ │ │ │ ├── main.go │ │ │ │ └── BUILD │ │ │ ├── main.go │ │ │ ├── go.mod │ │ │ ├── BUILD │ │ │ └── module │ │ │ └── BUILD │ ├── lyft │ │ └── protoc-gen-star │ │ │ └── v2 │ │ │ ├── lang │ │ │ └── go │ │ │ │ ├── testdata │ │ │ │ ├── names │ │ │ │ │ ├── import │ │ │ │ │ │ ├── params │ │ │ │ │ │ └── import.proto │ │ │ │ │ ├── types │ │ │ │ │ │ └── params │ │ │ │ │ ├── entities │ │ │ │ │ │ └── params │ │ │ │ │ ├── keyword │ │ │ │ │ │ ├── params │ │ │ │ │ │ └── keyword.proto │ │ │ │ │ ├── override │ │ │ │ │ │ ├── params │ │ │ │ │ │ └── override.proto │ │ │ │ │ ├── package │ │ │ │ │ │ ├── params │ │ │ │ │ │ └── package.proto │ │ │ │ │ ├── path_dash │ │ │ │ │ │ ├── params │ │ │ │ │ │ └── path_dash.proto │ │ │ │ │ ├── mapped │ │ │ │ │ │ ├── params │ │ │ │ │ │ └── mapped.proto │ │ │ │ │ ├── import_path_mapped │ │ │ │ │ │ ├── params │ │ │ │ │ │ └── import_path_mapped.proto │ │ │ │ │ └── transitive_package │ │ │ │ │ │ ├── params │ │ │ │ │ │ ├── other.proto │ │ │ │ │ │ └── transitive.proto │ │ │ │ ├── outputs │ │ │ │ │ ├── none │ │ │ │ │ │ ├── params │ │ │ │ │ │ └── none.proto │ │ │ │ │ ├── qualified │ │ │ │ │ │ ├── params │ │ │ │ │ │ └── qualified.proto │ │ │ │ │ ├── unqualified │ │ │ │ │ │ ├── params │ │ │ │ │ │ └── unqualified.proto │ │ │ │ │ ├── none_srcrel │ │ │ │ │ │ ├── params │ │ │ │ │ │ └── none.proto │ │ │ │ │ ├── mapped │ │ │ │ │ │ ├── params │ │ │ │ │ │ └── mapped.proto │ │ │ │ │ ├── qualified_srcrel │ │ │ │ │ │ ├── params │ │ │ │ │ │ └── qualified.proto │ │ │ │ │ ├── unqualified_srcrel │ │ │ │ │ │ ├── params │ │ │ │ │ │ └── unqualified.proto │ │ │ │ │ └── mapped_srcrel │ │ │ │ │ │ ├── params │ │ │ │ │ │ └── mapped.proto │ │ │ │ ├── presence │ │ │ │ │ └── types │ │ │ │ │ │ └── params │ │ │ │ └── packages │ │ │ │ │ ├── no_options │ │ │ │ │ ├── params │ │ │ │ │ └── no_options.proto │ │ │ │ │ ├── targets │ │ │ │ │ ├── none │ │ │ │ │ │ └── none.proto │ │ │ │ │ ├── unqualified │ │ │ │ │ │ └── unqualified.proto │ │ │ │ │ └── fully_qualified │ │ │ │ │ │ └── fully_qualified.proto │ │ │ │ │ └── mapped │ │ │ │ │ ├── params │ │ │ │ │ └── mapped.proto │ │ │ │ ├── docs.go │ │ │ │ ├── context_test.go │ │ │ │ ├── BUILD │ │ │ │ ├── gofmt.go │ │ │ │ └── goimports.go │ │ │ ├── docs.go │ │ │ ├── testdata │ │ │ ├── graph │ │ │ │ ├── messages │ │ │ │ │ ├── enums_ext.proto │ │ │ │ │ ├── oneofs.proto │ │ │ │ │ ├── recursive.proto │ │ │ │ │ ├── scalars.proto │ │ │ │ │ ├── embedded.proto │ │ │ │ │ └── enums.proto │ │ │ │ ├── packageless │ │ │ │ │ └── packageless.proto │ │ │ │ ├── extensions │ │ │ │ │ └── ext │ │ │ │ │ │ ├── api.proto │ │ │ │ │ │ └── data.proto │ │ │ │ ├── README.md │ │ │ │ ├── nested │ │ │ │ │ └── nested.proto │ │ │ │ ├── services │ │ │ │ │ └── services.proto │ │ │ │ └── info │ │ │ │ │ └── info.proto │ │ │ ├── ast │ │ │ │ ├── ast.png │ │ │ │ └── ast.dot │ │ │ ├── protos │ │ │ │ ├── kitchen │ │ │ │ │ └── emptyservice.proto │ │ │ │ └── multipackage │ │ │ │ │ ├── bar │ │ │ │ │ ├── baz │ │ │ │ │ │ └── quux.proto │ │ │ │ │ └── buzz.proto │ │ │ │ │ └── foo │ │ │ │ │ └── fizz.proto │ │ │ └── protoc-gen-example │ │ │ │ └── main.go │ │ │ ├── tools.go │ │ │ ├── .dbxvendor.json │ │ │ ├── .pre-commit-config.yaml │ │ │ ├── post_process_test.go │ │ │ ├── BUILD.in │ │ │ ├── .github │ │ │ └── workflows │ │ │ │ ├── pre-commit.yml │ │ │ │ └── test.yml │ │ │ ├── dbx-patches │ │ │ └── bazel.patch │ │ │ ├── .golangci.yml │ │ │ ├── post_process.go │ │ │ ├── protoc-gen-debug │ │ │ └── BUILD │ │ │ ├── go.mod │ │ │ ├── testutils │ │ │ └── BUILD │ │ │ ├── source_code_info_test.go │ │ │ └── comment_test.go │ └── prometheus │ │ └── client_model │ │ ├── go │ │ ├── BUILD.in │ │ └── BUILD │ │ ├── MAINTAINERS.md │ │ ├── .dbxvendor.json │ │ ├── NOTICE │ │ ├── go.mod │ │ ├── dbx-patches │ │ └── bazel.patch │ │ ├── go.sum │ │ ├── CONTRIBUTING.md │ │ └── Makefile │ └── godropbox │ └── errors │ └── BUILD ├── pip ├── chardet │ └── BUILD ├── funcsigs │ └── BUILD ├── scandir │ └── BUILD ├── pyparsing │ └── BUILD ├── atomicwrites │ └── BUILD ├── contextlib2 │ └── BUILD ├── six │ └── BUILD ├── coverage │ └── BUILD ├── toml │ └── BUILD ├── pycparser │ └── BUILD ├── more_itertools │ └── BUILD ├── wcwidth │ └── BUILD ├── iniconfig │ └── BUILD ├── py │ └── BUILD ├── typing │ └── BUILD ├── pathlib2 │ └── BUILD ├── pluggy │ └── BUILD ├── attrs │ └── BUILD ├── flit-core │ └── BUILD ├── zipp │ └── BUILD ├── cffi │ └── BUILD ├── setuptools_scm │ └── BUILD ├── configparser │ └── BUILD ├── pytest-asyncio │ └── BUILD ├── packaging │ └── BUILD ├── setuptools │ └── BUILD ├── backports.functools-lru-cache │ └── BUILD ├── importlib-metadata │ └── BUILD └── pytest │ └── BUILD.in ├── dropbox ├── BUILD └── build_tools │ └── echo_server │ ├── echo_client.py │ ├── BUILD.in │ ├── echo_server.py │ └── BUILD ├── BUILD ├── LICENSE ├── .bazelrc ├── configs └── proto │ └── dropbox │ └── proto │ └── mypy │ └── mypy.proto └── WORKSPACE /pytest.ini: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thirdparty/bzip2/BUILD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thirdparty/libffi/BUILD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thirdparty/lz4/BUILD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thirdparty/sqlite/BUILD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thirdparty/xz/BUILD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thirdparty/zlib/BUILD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thirdparty/zstd/BUILD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thirdparty/ncurses/BUILD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thirdparty/openssl/BUILD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thirdparty/readline/BUILD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thirdparty/squashfs-tools/BUILD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go/src/dropbox/runfiles/test_data.empty: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go/src/github.com/stretchr/testify/BUILD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/vanity/test/doc.go: -------------------------------------------------------------------------------- 1 | package test 2 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/.bazelversion: -------------------------------------------------------------------------------- 1 | 6.2.0 2 | -------------------------------------------------------------------------------- /go/src/dropbox/runfiles/data/config.runfiles/__main__/test.json: -------------------------------------------------------------------------------- 1 | [1, 2] 2 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/import/params: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/types/params: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/outputs/none/params: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/entities/params: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/keyword/params: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/override/params: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/package/params: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/path_dash/params: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/outputs/qualified/params: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/presence/types/params: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go/src/dropbox/runfiles/data/config.runfiles/__main__/subdir/another.json: -------------------------------------------------------------------------------- 1 | "another" 2 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/python/protoc_gen_validate/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/outputs/unqualified/params: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/packages/no_options/params: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/.dockerignore: -------------------------------------------------------------------------------- 1 | .git/ 2 | .idea/ 3 | .bin/ 4 | dist/ 5 | -------------------------------------------------------------------------------- /go/src/github.com/prometheus/client_model/go/BUILD.in: -------------------------------------------------------------------------------- 1 | dbx_go_library( 2 | name = "go", 3 | ) 4 | -------------------------------------------------------------------------------- /go/src/github.com/prometheus/client_model/MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | * Björn Rabenstein @beorn7 2 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/outputs/none_srcrel/params: -------------------------------------------------------------------------------- 1 | paths=source_relative 2 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/mapped/params: -------------------------------------------------------------------------------- 1 | Mmapped.proto=example.com/foobar 2 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/outputs/mapped/params: -------------------------------------------------------------------------------- 1 | Mmapped.proto=example.com/foobar 2 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/outputs/qualified_srcrel/params: -------------------------------------------------------------------------------- 1 | paths=source_relative 2 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/outputs/unqualified_srcrel/params: -------------------------------------------------------------------------------- 1 | paths=source_relative 2 | -------------------------------------------------------------------------------- /thirdparty/cpython/symbols.lds: -------------------------------------------------------------------------------- 1 | { 2 | global: 3 | Py*; 4 | _Py*; 5 | PyDict_GetItem; 6 | local: 7 | *; 8 | }; 9 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/svcctl/cmd/svcctl/BUILD.in: -------------------------------------------------------------------------------- 1 | dbx_go_binary( 2 | name = "svcctl", 3 | testonly = True, 4 | ) 5 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/conformance/conformance.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd $(dirname $0) 4 | exec go run conformance.go $* -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/docs.go: -------------------------------------------------------------------------------- 1 | // Package pgs provides a library for building protoc plugins 2 | package pgs 3 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/build-tar/BUILD.in: -------------------------------------------------------------------------------- 1 | dbx_go_binary( 2 | name = "build-tar", 3 | generate_norace_binary = True, 4 | ) 5 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/validate/BUILD.in: -------------------------------------------------------------------------------- 1 | exports_files([ 2 | "validate.h", 3 | "validate.proto", 4 | ]) 5 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/import_path_mapped/params: -------------------------------------------------------------------------------- 1 | Mimport_path_mapped.proto=github.com/foo/bar 2 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/outputs/mapped_srcrel/params: -------------------------------------------------------------------------------- 1 | paths=source_relative,Mmapped.proto=example.com/foobar 2 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/svcctl/cmd/svcd/BUILD.in: -------------------------------------------------------------------------------- 1 | dbx_go_binary( 2 | name = "svcd", 3 | testonly = True, 4 | generate_norace_binary = True, 5 | ) 6 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/java/unimplemented.go: -------------------------------------------------------------------------------- 1 | package java 2 | 3 | const notImplementedTpl = `/* NOT YET IMPLEMENTED */` 4 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/docs.go: -------------------------------------------------------------------------------- 1 | // Package pgsgo contains Go-specific helpers for use with PG* based protoc-plugins 2 | package pgsgo 3 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/svcctl/cmd/svcinit/BUILD.in: -------------------------------------------------------------------------------- 1 | dbx_go_binary( 2 | name = "svcinit", 3 | testonly = True, 4 | generate_norace_binary = True, 5 | ) 6 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/java/none.go: -------------------------------------------------------------------------------- 1 | package java 2 | 3 | const noneTpl = `// no validation rules for {{ simpleName .Field }} 4 | ` 5 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/graph/messages/enums_ext.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package graph.messages; 3 | 4 | enum External { EXT_VALUE = 0; } 5 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/.dbxvendor.json: -------------------------------------------------------------------------------- 1 | {"Module":"github.com/gogo/protobuf","Revision":"v1.3.2","Sum":"h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=","Dirty":true} 2 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/import/import.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | 3 | package names.import; 4 | option go_package = "example.com/foo/bar"; 5 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/outputs/none/none.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package outputs.none; 3 | option go_package="./;none"; 4 | message None {} 5 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/ast/ast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dropbox/dbx_build_tools/master/go/src/github.com/lyft/protoc-gen-star/v2/testdata/ast/ast.png -------------------------------------------------------------------------------- /go/src/dropbox/devtools/gomodlib/BUILD.in: -------------------------------------------------------------------------------- 1 | dbx_go_test( 2 | name = "gomodlib_test", 3 | data = [ 4 | "//go/src/dropbox/devtools/gomodlib/fixtures:go.mod", 5 | ], 6 | ) 7 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/override/override.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | 3 | package names.override; 4 | option go_package = "example.com/foo/bar;baz"; 5 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/outputs/none_srcrel/none.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | 3 | option go_package="example.com/outputs/none"; 4 | 5 | message None {} 6 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/tools.go: -------------------------------------------------------------------------------- 1 | //go:build tools 2 | // +build tools 3 | 4 | package tools 5 | 6 | import ( 7 | _ "google.golang.org/protobuf/cmd/protoc-gen-go" 8 | ) 9 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/mapped/mapped.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package names.mapped; 3 | option go_package="./;unaffected"; 4 | 5 | message Mapped {} 6 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/outputs/mapped/mapped.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package outputs.mapped; 3 | option go_package="./;mapped"; 4 | 5 | message Mapped {} 6 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/outputs/mapped_srcrel/mapped.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package outputs.mapped; 3 | option go_package="./;mapped"; 4 | 5 | message Mapped {} 6 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/path_dash/path_dash.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package names.path_dash; 3 | option go_package="example.com/path-dash"; 4 | 5 | message PathDash {} -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/packages/targets/none/none.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package packages.targets.none; 3 | option go_package="targets/none"; 4 | 5 | message None{} 6 | -------------------------------------------------------------------------------- /pip/chardet/BUILD: -------------------------------------------------------------------------------- 1 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 2 | 3 | dbx_py_pypi_piplib( 4 | name = "chardet", 5 | pip_version = "3.0.4", 6 | visibility = ["//visibility:public"], 7 | ) 8 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/keyword/keyword.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | 3 | package names.keyword; 4 | option go_package = "example.com/package"; 5 | 6 | message Package {} 7 | -------------------------------------------------------------------------------- /pip/funcsigs/BUILD: -------------------------------------------------------------------------------- 1 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 2 | 3 | dbx_py_pypi_piplib( 4 | name = "funcsigs", 5 | pip_version = "1.0.2", 6 | visibility = ["//visibility:public"], 7 | ) 8 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/gen-build-go/test_data/tagmap.go.txt: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | //go:build go1.19 4 | 5 | import ( 6 | "fmt" 7 | ) 8 | 9 | func main(){ 10 | fmt.Println("hello world") 11 | } 12 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/outputs/unqualified/unqualified.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package outputs.unqualified; 3 | option go_package="./;unqualified"; 4 | 5 | message Unqualified{} 6 | -------------------------------------------------------------------------------- /go/src/github.com/prometheus/client_model/.dbxvendor.json: -------------------------------------------------------------------------------- 1 | {"Module":"github.com/prometheus/client_model","Revision":"v0.2.0","Sum":"h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=","Patches":["dbx-patches/bazel.patch"]} 2 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/outputs/qualified/qualified.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package outputs.qualified; 3 | option go_package="example.com/qualified"; 4 | 5 | message FullyQualified{} 6 | -------------------------------------------------------------------------------- /dropbox/BUILD: -------------------------------------------------------------------------------- 1 | load("//build_tools/py:py.bzl", "dbx_py_library") 2 | 3 | dbx_py_library( 4 | name = "runfiles", 5 | srcs = ["runfiles.py"], 6 | validate = "strict", 7 | visibility = ["//visibility:public"], 8 | ) 9 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/svcctl/BUILD.in: -------------------------------------------------------------------------------- 1 | dbx_go_test( 2 | name = "svcctl_test", 3 | data = [ 4 | "//dropbox/build_tools/echo_server", 5 | "//dropbox/build_tools/echo_server:echo_client", 6 | ], 7 | ) 8 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/package/package.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | 3 | package names.package; 4 | option go_package = "example.com/names/package;my_package"; 5 | 6 | message Package {} 7 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/outputs/qualified_srcrel/qualified.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package outputs.qualified; 3 | option go_package="example.com/qualified"; 4 | 5 | message FullyQualified{} 6 | -------------------------------------------------------------------------------- /pip/scandir/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | dbx_py_pypi_piplib( 6 | name = "scandir", 7 | pip_version = "1.10.0", 8 | ) 9 | -------------------------------------------------------------------------------- /go/src/dropbox/devtools/gomodlib/fixtures/BUILD.in: -------------------------------------------------------------------------------- 1 | package( 2 | default_testonly = True, 3 | default_visibility = ["//go/src/dropbox/devtools/gomodlib:__subpackages__"], 4 | ) 5 | 6 | exports_files( 7 | ["go.mod"], 8 | ) 9 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/cc/none.go: -------------------------------------------------------------------------------- 1 | package cc 2 | 3 | const noneTpl = `// no validation rules for {{ .Field.Name }} 4 | {{- if .Index }}[{{ .Index }}]{{ end }} 5 | {{- if .OnKey }} (key){{ end }}` 6 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/.dbxvendor.json: -------------------------------------------------------------------------------- 1 | {"Module":"github.com/lyft/protoc-gen-star/v2","Revision":"v2.0.3","Sum":"h1:/3+/2sWyXeMLzKd1bX+ixWKgEMsULrIivpDsuaF441o=","Patches":["dbx-patches/bazel.patch"],"Vendor":true} 2 | -------------------------------------------------------------------------------- /go/src/github.com/prometheus/client_model/NOTICE: -------------------------------------------------------------------------------- 1 | Data model artifacts for Prometheus. 2 | Copyright 2012-2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | -------------------------------------------------------------------------------- /pip/pyparsing/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | dbx_py_pypi_piplib( 6 | name = "pyparsing", 7 | pip_version = "2.4.6", 8 | ) 9 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/transitive_package/params: -------------------------------------------------------------------------------- 1 | Mmapped.proto=example.com/foo/bar,Mmapped_no_options/mapped.proto=example.com/fizz/buzz,Mnames/mapped_no_options/mapped.proto=example.com/quux/baz 2 | -------------------------------------------------------------------------------- /pip/atomicwrites/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | dbx_py_pypi_piplib( 6 | name = "atomicwrites", 7 | pip_version = "1.3.0", 8 | ) 9 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/outputs/unqualified_srcrel/unqualified.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package outputs.unqualified; 3 | option go_package="example.com/outputs/unqualified"; 4 | 5 | message Unqualified{} 6 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/packages/targets/unqualified/unqualified.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package packages.targets.unqualified; 3 | option go_package="targets/unqualified"; 4 | 5 | message Unqualified{} 6 | -------------------------------------------------------------------------------- /go/src/github.com/prometheus/client_model/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/prometheus/client_model 2 | 3 | go 1.9 4 | 5 | require ( 6 | github.com/golang/protobuf v1.2.0 7 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f // indirect 8 | ) 9 | -------------------------------------------------------------------------------- /pip/contextlib2/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | dbx_py_pypi_piplib( 6 | name = "contextlib2", 7 | pip_version = "0.6.0.post1", 8 | ) 9 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/.dbxvendor.json: -------------------------------------------------------------------------------- 1 | {"Module":"github.com/envoyproxy/protoc-gen-validate","Revision":"v1.0.2","Sum":"h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA=","Patches":["dbx-patches/bazel.patch"],"Vendor":true} 2 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/goshared/none.go: -------------------------------------------------------------------------------- 1 | package goshared 2 | 3 | const noneTpl = `// no validation rules for {{ name .Field }} 4 | {{- if .Index }}[{{ .Index }}]{{ end }} 5 | {{- if .OnKey }} (key){{ end }}` 6 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/import_path_mapped/import_path_mapped.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package names.import_path_mapped; 3 | option go_package="github.com/fizz/buzz;go_package"; 4 | 5 | message Mapped {} 6 | -------------------------------------------------------------------------------- /pip/six/BUILD: -------------------------------------------------------------------------------- 1 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 2 | 3 | licenses(["notice"]) # MIT 4 | 5 | dbx_py_pypi_piplib( 6 | name = "six", 7 | pip_version = "1.16.0", 8 | visibility = ["//visibility:public"], 9 | ) 10 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/packages/mapped/params: -------------------------------------------------------------------------------- 1 | Mtargets/fully_qualified/fully_qualified.proto=example.com/foo/bar,Mtargets/unqualified/unqualified.proto=example.com/fizz/buzz,Mtargets/none/none.proto=example.com/quux 2 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/protos/kitchen/emptyservice.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package kitchen; 4 | option go_package = "github.com/lyft/protoc-gen-star/testdata/generated/kitchen"; 5 | 6 | service EmptyService { 7 | } 8 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/gen-build-go/lib/BUILD.in: -------------------------------------------------------------------------------- 1 | filegroup( 2 | name = "srcs", 3 | data = glob( 4 | ["*.go"], 5 | exclude = ["*_test.go"], 6 | ), 7 | visibility = ["//go/src/dropbox/build_tools/gen-build-go:__pkg__"], 8 | ) 9 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | default_language_version: 2 | python: python3.8 3 | repos: 4 | - repo: https://github.com/golangci/golangci-lint 5 | rev: v1.42.1 6 | hooks: 7 | - id: golangci-lint 8 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/build-sqfs/BUILD.in: -------------------------------------------------------------------------------- 1 | dbx_go_binary( 2 | name = "build-sqfs", 3 | data = [ 4 | "//build_tools:chronic", 5 | "@com_github_plougher_squashfs_tools//:mksquashfs", 6 | ], 7 | generate_norace_binary = True, 8 | ) 9 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/transitive_package/other.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package names.transitive_package; 3 | 4 | option go_package="example.com/names/foobar"; 5 | 6 | message Other { 7 | bool value = 1; 8 | } 9 | -------------------------------------------------------------------------------- /thirdparty/cpython/gen_2to3_grammar.py: -------------------------------------------------------------------------------- 1 | # gen_2to3_grammar.py: input 2 | 3 | import sys 4 | 5 | from lib2to3.pgen2 import driver 6 | 7 | gp = driver._generate_pickle_name(sys.argv[1]) 8 | driver.load_grammar(sys.argv[1], gp, force=True) 9 | print(gp) 10 | -------------------------------------------------------------------------------- /pip/coverage/BUILD: -------------------------------------------------------------------------------- 1 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 2 | 3 | licenses(["notice"]) # Apache 2.0 4 | 5 | dbx_py_pypi_piplib( 6 | name = "coverage", 7 | pip_version = "5.0.3", 8 | visibility = ["//visibility:public"], 9 | ) 10 | -------------------------------------------------------------------------------- /pip/toml/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | licenses(["notice"]) # MIT 6 | 7 | dbx_py_pypi_piplib( 8 | name = "toml", 9 | pip_version = "0.10.2", 10 | ) 11 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/names/transitive_package/transitive.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package names.transitive_package; 3 | 4 | option go_package="example.com/names/foobar"; 5 | 6 | message Transitive { 7 | bool value = 1; 8 | } 9 | -------------------------------------------------------------------------------- /go/src/github.com/stretchr/testify/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/stretchr/testify 2 | 3 | go 1.13 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 7 | github.com/pmezard/go-difflib v1.0.0 8 | github.com/stretchr/objx v0.5.0 9 | gopkg.in/yaml.v3 v3.0.1 10 | ) 11 | -------------------------------------------------------------------------------- /pip/pycparser/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | licenses(["notice"]) # BSD 6 | 7 | dbx_py_pypi_piplib( 8 | name = "pycparser", 9 | pip_version = "2.20", 10 | ) 11 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/GOLANG_CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | The contributors to the Go protobuf repository: 2 | 3 | # This source code was written by the Go contributors. 4 | # The master list of contributors is in the main Go distribution, 5 | # visible at http://tip.golang.org/CONTRIBUTORS. -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/packages/targets/fully_qualified/fully_qualified.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package packages.targets.fully_qualified; 3 | option go_package="example.com/packages/targets/fully_qualified"; 4 | 5 | message FullyQualified{} 6 | -------------------------------------------------------------------------------- /pip/more_itertools/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | dbx_py_pypi_piplib( 6 | name = "more_itertools", 7 | pip_version = "5.0.0", 8 | deps = ["//pip/six"], 9 | ) 10 | -------------------------------------------------------------------------------- /go/src/github.com/prometheus/client_model/dbx-patches/bazel.patch: -------------------------------------------------------------------------------- 1 | diff -ruN 1/go/BUILD.in 2/go/BUILD.in 2 | --- 1/go/BUILD.in 1970-01-01 00:00:00.000000000 +0000 3 | +++ 2/go/BUILD.in 2022-05-23 20:07:17.704194185 +0000 4 | @@ -0,0 +1,3 @@ 5 | +dbx_go_library( 6 | + name = "go", 7 | +) 8 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/bytes.go: -------------------------------------------------------------------------------- 1 | package jsonpb 2 | 3 | // Byte is used to test that []byte type aliases are serialized to base64. 4 | type Byte byte 5 | 6 | // Bytes is used to test that []byte type aliases are serialized to base64. 7 | type Bytes []Byte 8 | -------------------------------------------------------------------------------- /pip/wcwidth/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | dbx_py_pypi_piplib( 6 | name = "wcwidth", 7 | pip_version = "0.2.5", 8 | deps = ["//pip/backports.functools-lru-cache"], 9 | ) 10 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/gogo/protobuf 2 | 3 | go 1.15 4 | 5 | require ( 6 | github.com/kisielk/errcheck v1.5.0 // indirect 7 | github.com/kisielk/gotool v1.0.0 // indirect 8 | golang.org/x/tools v0.0.0-20210106214847-113979e3529a // indirect 9 | ) 10 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/graph/messages/oneofs.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package graph.messages; 3 | 4 | message OneOfs { 5 | string before = 1; 6 | 7 | oneof oneof { 8 | int32 inside = 2; 9 | } 10 | 11 | bool after = 3; 12 | } 13 | 14 | -------------------------------------------------------------------------------- /go/src/github.com/stretchr/testify/.dbxvendor.json: -------------------------------------------------------------------------------- 1 | {"Module":"github.com/stretchr/testify","Revision":"v1.8.1","Sum":"h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=","Patches":["dbx-patches/bazel.patch"],"Vendor":false,"Sha256":"36f64e4f229f87672ef8de1c756648c4165e76abd034362517578397e824856c"} 2 | -------------------------------------------------------------------------------- /pip/iniconfig/BUILD: -------------------------------------------------------------------------------- 1 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 2 | 3 | dbx_py_pypi_piplib( 4 | name = "iniconfig", 5 | pip_version = "1.1.1", 6 | setup_requires = [ 7 | "//pip/setuptools_scm", 8 | ], 9 | visibility = ["//visibility:public"], 10 | ) 11 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/java/bool.go: -------------------------------------------------------------------------------- 1 | package java 2 | 3 | const boolTpl = `{{ $f := .Field }}{{ $r := .Rules -}} 4 | {{- if $r.Const }} 5 | io.envoyproxy.pgv.ConstantValidation.constant("{{ $f.FullyQualifiedName }}", {{ accessor . }}, {{ $r.GetConst }}); 6 | {{- end }}` 7 | -------------------------------------------------------------------------------- /pip/py/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | dbx_py_pypi_piplib( 6 | name = "py", 7 | pip_version = "1.11.0", 8 | setup_requires = ["//pip/setuptools_scm"], 9 | use_pep517 = True, 10 | ) 11 | -------------------------------------------------------------------------------- /pip/typing/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | licenses(["notice"]) # Python Software Foundation License 6 | 7 | dbx_py_pypi_piplib( 8 | name = "typing", 9 | pip_version = "3.7.4.1", 10 | ) 11 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/bazel/env.go: -------------------------------------------------------------------------------- 1 | package bazel 2 | 3 | import "os" 4 | 5 | // Drop-in replacement for os.TempDir() that respects Bazel test environment. 6 | func TempDir() string { 7 | tmpDir := os.Getenv("TEST_TMPDIR") 8 | if tmpDir != "" { 9 | return tmpDir 10 | } 11 | return os.TempDir() 12 | } 13 | -------------------------------------------------------------------------------- /pip/pathlib2/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | dbx_py_pypi_piplib( 6 | name = "pathlib2", 7 | pip_version = "2.3.5", 8 | deps = [ 9 | "//pip/scandir", 10 | "//pip/six", 11 | ], 12 | ) 13 | -------------------------------------------------------------------------------- /BUILD: -------------------------------------------------------------------------------- 1 | genrule( 2 | name = "repo_revision", 3 | outs = [".repo_revision"], 4 | cmd = "$(location //build_tools:parse_workspace_status) >$@", 5 | stamp = True, 6 | tools = ["//build_tools:parse_workspace_status"], 7 | visibility = ["//visibility:public"], 8 | ) 9 | 10 | exports_files(["pytest.ini"]) 11 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/Tools.mk: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License") 2 | 3 | bazelisk@v := github.com/bazelbuild/bazelisk@v1.15.0 4 | protoc@v := github.com/protocolbuffers/protobuf@v22.2 5 | protoc-gen-go@v := google.golang.org/protobuf/cmd/protoc-gen-go@v1.30.0 6 | -------------------------------------------------------------------------------- /pip/pluggy/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | dbx_py_pypi_piplib( 6 | name = "pluggy", 7 | pip_version = "0.13.1", 8 | setup_requires = ["//pip/setuptools_scm"], 9 | deps = ["//pip/importlib-metadata"], 10 | ) 11 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/tools.go: -------------------------------------------------------------------------------- 1 | //go:build tools 2 | // +build tools 3 | 4 | package main 5 | 6 | import ( 7 | _ "golang.org/x/lint/golint" 8 | _ "golang.org/x/net/context" 9 | _ "golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow" 10 | _ "google.golang.org/protobuf/cmd/protoc-gen-go" 11 | ) 12 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/post_process_test.go: -------------------------------------------------------------------------------- 1 | package pgs 2 | 3 | type mockPP struct { 4 | match bool 5 | out []byte 6 | err error 7 | } 8 | 9 | func (pp mockPP) Match(a Artifact) bool { return pp.match } 10 | func (pp mockPP) Process(in []byte) ([]byte, error) { return pp.out, pp.err } 11 | -------------------------------------------------------------------------------- /pip/attrs/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | dbx_py_pypi_piplib( 6 | name = "attrs", 7 | pip_version = "21.4.0", 8 | provides = [ 9 | "attr", 10 | "attrs", 11 | ], 12 | use_pep517 = True, 13 | ) 14 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/go/required.go: -------------------------------------------------------------------------------- 1 | package golang 2 | 3 | const requiredTpl = ` 4 | {{ if .Rules.GetRequired }} 5 | if {{ accessor . }} == nil { 6 | err := {{ err . "value is required" }} 7 | if !all { return err } 8 | errors = append(errors, err) 9 | } 10 | {{ end }} 11 | ` 12 | -------------------------------------------------------------------------------- /pip/flit-core/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | licenses(["notice"]) # BSD 6 | 7 | dbx_py_pypi_piplib( 8 | name = "flit-core", 9 | pip_version = "3.7.1", 10 | provides = ["flit_core"], 11 | use_pep517 = True, 12 | ) 13 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/ast/ast.dot: -------------------------------------------------------------------------------- 1 | digraph G { 2 | Package -> File; 3 | 4 | File -> Enum; 5 | File -> Service -> Method; 6 | File -> Message; 7 | 8 | Enum -> EnumValue; 9 | 10 | OneOf -> Field; 11 | 12 | Message -> Message; 13 | Message -> Enum; 14 | Message -> Field; 15 | Message -> OneOf; 16 | } -------------------------------------------------------------------------------- /pip/zipp/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | dbx_py_pypi_piplib( 6 | name = "zipp", 7 | pip_version = "1.1.1", 8 | setup_requires = ["//pip/setuptools_scm"], 9 | use_pep517 = True, 10 | deps = ["//pip/contextlib2"], 11 | ) 12 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/tools/build/Env.mk: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License") 2 | 3 | # Disable cgo. 4 | export CGOENABLED := 0 5 | 6 | # Reference: https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict. 7 | export GOLANG_PROTOBUF_REGISTRATION_CONFLICT := warn 8 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/BUILD.in: -------------------------------------------------------------------------------- 1 | load("//build_tools/go:go.bzl", "dbx_go_library") 2 | 3 | dbx_go_library( 4 | name = "v2", 5 | visibility = [ 6 | "//go/src/github.com/envoyproxy/protoc-gen-validate:__subpackages__", 7 | "//go/src/github.com/lyft/protoc-gen-star:__subpackages__", 8 | ], 9 | ) 10 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/cc/num.go: -------------------------------------------------------------------------------- 1 | package cc 2 | 3 | const numTpl = ` 4 | {{ if .Rules.GetIgnoreEmpty }} 5 | if ({{ accessor . }} != 0) { 6 | {{ end }} 7 | {{ template "const" . }} 8 | {{ template "ltgt" . }} 9 | {{ template "in" . }} 10 | {{ if .Rules.GetIgnoreEmpty }} 11 | } 12 | {{ end }} 13 | ` 14 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/protos/multipackage/bar/baz/quux.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package baz; 4 | option go_package = "github.com/lyft/protoc-gen-star/testdata/generated/multipackage/bar/baz"; 5 | 6 | message Quux { 7 | oneof id { 8 | uint32 number = 1; 9 | string name = 2; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/svcctl/svclib/BUILD.in: -------------------------------------------------------------------------------- 1 | dbx_go_library( 2 | name = "svclib", 3 | testonly = True, 4 | ) 5 | 6 | dbx_go_test( 7 | name = "svclib_test", 8 | data = [ 9 | "//dropbox/build_tools/echo_server", 10 | "//dropbox/build_tools/echo_server:echo_client", 11 | ], 12 | force_launch_svcctl = True, 13 | ) 14 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/protos/multipackage/bar/buzz.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package bar; 4 | option go_package = "github.com/lyft/protoc-gen-star/testdata/generated/multipackage/bar"; 5 | 6 | import "multipackage/bar/baz/quux.proto"; 7 | 8 | message Buzz { 9 | uint64 id = 1; 10 | baz.Quux quux = 2; 11 | } 12 | -------------------------------------------------------------------------------- /thirdparty/cpython/bazel_linkstamp.cc: -------------------------------------------------------------------------------- 1 | extern "C" const char _bazel_embed_label[] = BUILD_EMBED_LABEL; 2 | extern "C" const long long _bazel_build_timestamp = BUILD_TIMESTAMP; 3 | extern "C" const char _bazel_username[] = BUILD_USER; 4 | extern "C" const char _bazel_scm_revision[] = BUILD_SCM_REVISION; 5 | extern "C" const char _bazel_scm_status[] = BUILD_SCM_STATUS; 6 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/graph/packageless/packageless.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | 3 | // no package declaration! 4 | 5 | message RootMessage { 6 | RootEnum field = 1; 7 | 8 | message NestedMsg {} 9 | 10 | enum NestedEnum { 11 | VALUE = 0; 12 | } 13 | } 14 | 15 | enum RootEnum { 16 | VALUE = 0; 17 | } 18 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/protos/multipackage/foo/fizz.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package foo; 4 | option go_package = "github.com/lyft/protoc-gen-star/testdata/generated/multipackage/foo"; 5 | 6 | import "multipackage/bar/buzz.proto"; 7 | 8 | message Fizz { 9 | uint64 id = 1; 10 | bar.Buzz three_five = 2; 11 | } 12 | -------------------------------------------------------------------------------- /pip/cffi/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | licenses(["notice"]) # MIT 6 | 7 | dbx_py_pypi_piplib( 8 | name = "cffi", 9 | pip_version = "1.14.6", 10 | deps = [ 11 | "//pip/pycparser", 12 | "@org_sourceware_libffi//:ffi", 13 | ], 14 | ) 15 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/goshared/num.go: -------------------------------------------------------------------------------- 1 | package goshared 2 | 3 | const numTpl = ` 4 | {{ if .Rules.GetIgnoreEmpty }} 5 | if {{ accessor . }} != 0 { 6 | {{ end }} 7 | 8 | {{ template "const" . }} 9 | {{ template "ltgt" . }} 10 | {{ template "in" . }} 11 | 12 | {{ if .Rules.GetIgnoreEmpty }} 13 | } 14 | {{ end }} 15 | 16 | ` 17 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/proto/proto3_proto/Makefile: -------------------------------------------------------------------------------- 1 | regenerate: 2 | go install github.com/gogo/protobuf/protoc-min-version 3 | protoc-min-version --version="3.0.0" --gogo_out=\ 4 | Mtest_proto/test.proto=github.com/gogo/protobuf/proto/test_proto,\ 5 | Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types:. \ 6 | --proto_path=../../protobuf:../:. proto3.proto 7 | 8 | -------------------------------------------------------------------------------- /go/src/dropbox/devtools/gomodlib/fixtures/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | package( 5 | default_testonly = True, 6 | default_visibility = ["//go/src/dropbox/devtools/gomodlib:__subpackages__"], 7 | ) 8 | 9 | exports_files( 10 | ["go.mod"], 11 | ) 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Unless otherwise covered by a LICENSE file in a subdirectory, this work is 2 | licensed to you under the following terms. 3 | 4 | - build_tools/drte/tools/drte-build.sh is available under the GPL2, found here 5 | LICENSE.GPL2. 6 | 7 | - Other files not covered by the above license or a LICENSE file in 8 | subdirectory are available under Apache 2.0, found here LICENSE.Apache2.0. 9 | -------------------------------------------------------------------------------- /go/src/dropbox/runfiles/BUILD.in: -------------------------------------------------------------------------------- 1 | dbx_go_library( 2 | name = "runfiles", 3 | visibility = [ 4 | "//go/src/atlas:__subpackages__", 5 | "//go/src/dropbox:__subpackages__", 6 | "//go/src/github.com/dropbox:__subpackages__", 7 | ], 8 | ) 9 | 10 | dbx_go_test( 11 | name = "runfiles_test", 12 | data = ["test_data.empty"] + glob(["data/**"]), 13 | ) 14 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/graph/extensions/ext/api.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package extensions.ext; 3 | option go_package = "ext"; 4 | 5 | import "google/protobuf/descriptor.proto"; 6 | 7 | extend google.protobuf.ServiceOptions { 8 | string host = 111111; 9 | } 10 | 11 | extend google.protobuf.MethodOptions { 12 | string header = 222222; 13 | } 14 | -------------------------------------------------------------------------------- /pip/setuptools_scm/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | licenses(["notice"]) # MIT 6 | 7 | dbx_py_pypi_piplib( 8 | name = "setuptools_scm", 9 | pip_version = "5.0.1", 10 | use_pep517 = True, 11 | deps = [ 12 | "//pip/setuptools", 13 | "//pip/toml", 14 | ], 15 | ) 16 | -------------------------------------------------------------------------------- /pip/configparser/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | dbx_py_pypi_piplib( 6 | name = "configparser", 7 | namespace_pkgs = ["backports"], 8 | pip_version = "4.0.2", 9 | provides = ["backports.configparser"], 10 | setup_requires = ["//pip/setuptools_scm"], 11 | use_pep517 = True, 12 | ) 13 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | AccessModifierOffset: -2 4 | ColumnLimit: 100 5 | DerivePointerAlignment: false 6 | PointerAlignment: Left 7 | SortIncludes: false 8 | ... 9 | 10 | --- 11 | Language: Proto 12 | ColumnLimit: 100 13 | SpacesInContainerLiterals: false 14 | AllowShortFunctionsOnASingleLine: false 15 | ReflowComments: false 16 | ... 17 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/.github/workflows/notify-approval-bypass.yaml: -------------------------------------------------------------------------------- 1 | name: PR Approval Bypass Notifier 2 | on: 3 | pull_request: 4 | types: 5 | - closed 6 | branches: 7 | - main 8 | permissions: 9 | pull-requests: read 10 | jobs: 11 | approval: 12 | uses: bufbuild/base-workflows/.github/workflows/notify-approval-bypass.yaml@main 13 | secrets: inherit 14 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/requirements.txt: -------------------------------------------------------------------------------- 1 | # Requirements for linting, building, and uploading the PGV python package to PyPI. 2 | # The package's own requirements are in python/setup.cfg (and also in python/requirements.in). 3 | flake8==3.8.4 4 | isort==5.7.0 5 | build==0.3.0 6 | twine==3.3.0 7 | wheel==0.38.1 8 | setuptools==65.5.1 9 | protobuf==3.20.2 10 | setuptools_scm[toml]>=6.2 11 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/cc/wrapper.go: -------------------------------------------------------------------------------- 1 | package cc 2 | 3 | const wrapperTpl = ` 4 | {{ $f := .Field }}{{ $r := .Rules }} 5 | 6 | if ({{ hasAccessor . }}) { 7 | const auto wrapped = {{ accessor . }}; 8 | {{ render (unwrap . "wrapped") }} 9 | } {{ if .MessageRules.GetRequired }} else { 10 | {{ err . "value is required and must not be nil." }} 11 | } {{ end }} 12 | ` 13 | -------------------------------------------------------------------------------- /pip/pytest-asyncio/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | dbx_py_pypi_piplib( 6 | name = "pytest-asyncio", 7 | testonly = True, 8 | pip_version = "0.18.0", 9 | provides = ["pytest_asyncio"], 10 | setup_requires = ["//pip/pytest"], 11 | use_pep517 = True, 12 | deps = ["//pip/pytest"], 13 | ) 14 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/gen-build-go/test_data/tagmap.BUILD.txt: -------------------------------------------------------------------------------- 1 | load('//build_tools/go:go.bzl', 'dbx_go_binary', 'dbx_go_library', 'dbx_go_test') 2 | 3 | dbx_go_library( 4 | name = 'test_data', 5 | srcs = [ 6 | 'file1.go', 7 | 'tagmap.go.txt', 8 | ], 9 | deps = [ 10 | ], 11 | tagmap={"tagmap.go.txt":["go1.19"],}, 12 | visibility=[ 13 | '//visibility:public', 14 | ], 15 | ) 16 | -------------------------------------------------------------------------------- /pip/packaging/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | dbx_py_pypi_piplib( 6 | name = "packaging", 7 | pip_version = "22.0", 8 | setup_requires = [ 9 | "//pip/flit-core", 10 | ], 11 | use_pep517 = True, 12 | deps = [ 13 | "//pip/pyparsing", 14 | "//pip/six", 15 | ], 16 | ) 17 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/gen-build-go/test_data/simple.BUILD.txt: -------------------------------------------------------------------------------- 1 | load('//build_tools/go:go.bzl', 'dbx_go_binary', 'dbx_go_library', 'dbx_go_test') 2 | 3 | dbx_go_library( 4 | name = 'mypkg', 5 | srcs = [ 6 | 'file1.go', 7 | 'file2.go', 8 | ], 9 | deps = [ 10 | '@dbx_build_tools//go/src/dropbox/testpkg', 11 | ], 12 | visibility=[ 13 | '//visibility:public', 14 | ], 15 | ) 16 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/protoc-gen-example/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | pgs "github.com/lyft/protoc-gen-star/v2" 5 | pgsgo "github.com/lyft/protoc-gen-star/v2/lang/go" 6 | ) 7 | 8 | func main() { 9 | pgs.Init( 10 | pgs.DebugEnv("DEBUG"), 11 | ).RegisterModule( 12 | ASTPrinter(), 13 | JSONify(), 14 | ).RegisterPostProcessor( 15 | pgsgo.GoFmt(), 16 | ).Render() 17 | } 18 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/bazel/BUILD.in: -------------------------------------------------------------------------------- 1 | load("@bazel_skylib//rules:common_settings.bzl", "string_flag") 2 | 3 | config_setting( 4 | name = "windows_x86_64", 5 | values = {"cpu": "x64_windows"}, 6 | visibility = ["//visibility:public"], 7 | ) 8 | 9 | string_flag( 10 | name = "template-flavor", 11 | build_setting_default = "", 12 | visibility = ["//visibility:public"], 13 | ) 14 | -------------------------------------------------------------------------------- /go/src/github.com/prometheus/client_model/go.sum: -------------------------------------------------------------------------------- 1 | github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= 2 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 3 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ= 4 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 5 | -------------------------------------------------------------------------------- /.bazelrc: -------------------------------------------------------------------------------- 1 | build --experimental_strict_action_env 2 | build --sandbox_fake_username 3 | # Block networking in tests. 4 | build --modify_execution_info=TestRunner=+block-network 5 | 6 | # Work around https://github.com/bazelbuild/bazel/issues/6293 by setting a 7 | # dummy lcov. 8 | coverage --test_env=LCOV_MERGER=/bin/true 9 | 10 | build:changes --remote_cache=http://changes-worker-host:8000 11 | build:changes --define svc.version-file=0 12 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/gen-build-go/test_data/subpackages.BUILD.txt: -------------------------------------------------------------------------------- 1 | load('//build_tools/go:go.bzl', 'dbx_go_binary', 'dbx_go_library', 'dbx_go_test') 2 | 3 | dbx_go_library( 4 | name = 'mypkg', 5 | srcs = [ 6 | 'file1.go', 7 | 'file2.go', 8 | ], 9 | deps = [ 10 | '@dbx_build_tools//go/src/github.com/hanwen/go-fuse/v2/fuse', 11 | ], 12 | visibility=[ 13 | '//visibility:public', 14 | ], 15 | ) 16 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/update-gen-build-go-srcs/BUILD.in: -------------------------------------------------------------------------------- 1 | dbx_go_binary( 2 | name = "update-gen-build-go-srcs", 3 | data = [ 4 | "//go/src/dropbox/build_tools/gen-build-go:srcs", 5 | ], 6 | ) 7 | 8 | dbx_go_test( 9 | name = "update-gen-build-go-srcs_test", 10 | data = [ 11 | "//build_tools/go:dbx_go_gen_build_srcs.bzl", 12 | "//go/src/dropbox/build_tools/gen-build-go:srcs", 13 | ], 14 | ) 15 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/cc/const.go: -------------------------------------------------------------------------------- 1 | package cc 2 | 3 | const constTpl = `{{ $f := .Field }}{{ $r := .Rules }} 4 | {{ if $r.Const }} 5 | if ({{ accessor . }} != {{ lit $r.GetConst }}) { 6 | {{- if isEnum $f }} 7 | {{ err . "value must equal " (enumVal $f $r.GetConst) }} 8 | {{- else }} 9 | {{ err . "value must equal " (lit $r.GetConst) }} 10 | {{- end }} 11 | } 12 | {{ end }} 13 | ` 14 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/java/required.go: -------------------------------------------------------------------------------- 1 | package java 2 | 3 | const requiredTpl = `{{ $f := .Field }} 4 | {{- if .Rules.GetRequired }} 5 | if ({{ hasAccessor . }}) { 6 | io.envoyproxy.pgv.RequiredValidation.required("{{ $f.FullyQualifiedName }}", {{ accessor . }}); 7 | } else { 8 | io.envoyproxy.pgv.RequiredValidation.required("{{ $f.FullyQualifiedName }}", null); 9 | }; 10 | {{- end -}} 11 | ` 12 | -------------------------------------------------------------------------------- /pip/setuptools/BUILD: -------------------------------------------------------------------------------- 1 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 2 | 3 | licenses(["notice"]) # MIT 4 | 5 | # NOTE: //build_tools/py/vpip.py encodes the version of setuptools. 6 | dbx_py_pypi_piplib( 7 | name = "setuptools", 8 | pip_version = "67.3.2", 9 | provides = [ 10 | "pkg_resources", 11 | "setuptools", 12 | ], 13 | use_pep517 = True, 14 | visibility = ["//visibility:public"], 15 | ) 16 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/.github/workflows/emergency-review-bypass.yaml: -------------------------------------------------------------------------------- 1 | name: Bypass review in case of emergency 2 | on: 3 | pull_request: 4 | types: 5 | - labeled 6 | permissions: 7 | pull-requests: write 8 | jobs: 9 | approve: 10 | if: github.event.label.name == 'Emergency Bypass Review' 11 | uses: bufbuild/base-workflows/.github/workflows/emergency-review-bypass.yaml@main 12 | secrets: inherit 13 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/vanity/test/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "test", 8 | srcs = [ 9 | "doc.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | ], 16 | ) 17 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/version/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "version", 8 | srcs = [ 9 | "version.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | ], 16 | ) 17 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/.github/workflows/pre-commit.yml: -------------------------------------------------------------------------------- 1 | name: pre-commit 2 | on: 3 | push: 4 | branches: 5 | - master 6 | pull_request: 7 | branches: 8 | - master 9 | jobs: 10 | pre-commit: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v2 14 | - uses: actions/setup-go@v2 15 | with: 16 | go-version: '1.17' 17 | - uses: pre-commit/action@v3.0.0 18 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/graph/README.md: -------------------------------------------------------------------------------- 1 | # AST Graph Test Data 2 | 3 | This directory contains various test proto file sets for black-box testing of the AST gatherer `graph`. 4 | 5 | Proto files are preprocessed to their descriptors, imported directly into the `ast_test.go` tests, and unmarshaled as a `DescriptorFileSet`. 6 | 7 | ## To Generate 8 | 9 | From the project root: 10 | 11 | ```sh 12 | make testdata-graph 13 | ``` 14 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/WORKSPACE: -------------------------------------------------------------------------------- 1 | workspace(name = "com_envoyproxy_protoc_gen_validate") 2 | 3 | load("//bazel:repositories.bzl", "pgv_dependencies") 4 | 5 | pgv_dependencies() 6 | 7 | load("//bazel:dependency_imports.bzl", "pgv_dependency_imports") 8 | 9 | pgv_dependency_imports() 10 | 11 | load("//:dependencies.bzl", "go_third_party") 12 | 13 | # gazelle:repository_macro dependencies.bzl%go_third_party 14 | go_third_party() 15 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/gogoreplace/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "gogoreplace", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | ], 16 | ) 17 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/sortkeys/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "sortkeys", 8 | srcs = [ 9 | "sortkeys.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | ], 16 | ) 17 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/context_test.go: -------------------------------------------------------------------------------- 1 | package pgsgo 2 | 3 | import ( 4 | "testing" 5 | 6 | pgs "github.com/lyft/protoc-gen-star/v2" 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func TestContext_Params(t *testing.T) { 11 | t.Parallel() 12 | 13 | p := pgs.Parameters{} 14 | p.SetStr("foo", "bar") 15 | ctx := InitContext(p) 16 | 17 | params := ctx.Params() 18 | assert.Equal(t, "bar", params.Str("foo")) 19 | } 20 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "gomod" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | - package-ecosystem: "gomod" 8 | directory: "/tests" 9 | schedule: 10 | interval: "weekly" 11 | - package-ecosystem: "maven" 12 | directory: "/java" 13 | schedule: 14 | interval: "weekly" 15 | open-pull-requests-limit: 40 16 | 17 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/goshared/wrapper.go: -------------------------------------------------------------------------------- 1 | package goshared 2 | 3 | const wrapperTpl = ` 4 | {{ $f := .Field }}{{ $r := .Rules }} 5 | 6 | if wrapper := {{ accessor . }}; wrapper != nil { 7 | {{ render (unwrap . "wrapper") }} 8 | } {{ if .MessageRules.GetRequired }} else { 9 | err := {{ err . "value is required and must not be nil." }} 10 | if !all { return err } 11 | errors = append(errors, err) 12 | } {{ end }} 13 | ` 14 | -------------------------------------------------------------------------------- /pip/backports.functools-lru-cache/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | licenses(["notice"]) # MIT 6 | 7 | dbx_py_pypi_piplib( 8 | name = "backports.functools-lru-cache", 9 | namespace_pkgs = ["backports"], 10 | pip_version = "1.6.1", 11 | provides = ["backports.functools_lru_cache"], 12 | setup_requires = ["//pip/setuptools_scm"], 13 | use_pep517 = True, 14 | ) 15 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/build-tar/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "build-tar", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | generate_norace_binary = True, 12 | visibility = [ 13 | "//visibility:public", 14 | ], 15 | deps = [ 16 | ], 17 | ) 18 | -------------------------------------------------------------------------------- /thirdparty/lz4/BUILD.lz4: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | cc_library( 4 | name = "lz4", 5 | srcs = glob([ 6 | "lib/*.c", 7 | "lib/*.h", 8 | ]), 9 | hdrs = [ 10 | "lib/lz4.h", 11 | "lib/lz4frame.h", 12 | "lib/lz4hc.h", 13 | ], 14 | copts = [ 15 | "-DXXH_NAMESPACE=LZ4_", 16 | ], 17 | strip_include_prefix = "lib", 18 | textual_hdrs = [ 19 | "lib/lz4.c", 20 | ], 21 | ) 22 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/bazel/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "bazel", 8 | srcs = [ 9 | "env.go", 10 | ], 11 | visibility = [ 12 | "//go/src/atlas:__subpackages__", 13 | "//go/src/dropbox:__subpackages__", 14 | ], 15 | deps = [ 16 | ], 17 | ) 18 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/java/message.go: -------------------------------------------------------------------------------- 1 | package java 2 | 3 | const messageTpl = `{{ $f := .Field }}{{ $r := .Rules }} 4 | {{- if .MessageRules.GetSkip }} 5 | // skipping validation for {{ $f.Name }} 6 | {{- else -}} 7 | {{- template "required" . }} 8 | {{- if (isOfMessageType $f) }} 9 | // Validate {{ $f.Name }} 10 | if ({{ hasAccessor . }}) index.validatorFor({{ accessor . }}).assertValid({{ accessor . }}); 11 | {{- end -}} 12 | {{- end -}} 13 | ` 14 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/codec/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "codec", 8 | srcs = [ 9 | "codec.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/proto", 16 | ], 17 | ) 18 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/java/wrapper.go: -------------------------------------------------------------------------------- 1 | package java 2 | 3 | const wrapperConstTpl = `{{ $f := .Field }}{{ $r := .Rules }} 4 | {{- renderConstants (unwrap .) }}` 5 | 6 | const wrapperTpl = `{{ $f := .Field }}{{ $r := .Rules }} 7 | if ({{ hasAccessor . }}) { 8 | {{- render (unwrap .) }} 9 | } 10 | {{ if .MessageRules.GetRequired }} else { 11 | throw new io.envoyproxy.pgv.ValidationException("{{ $f }}", "null", "is required"); 12 | } {{ end }}` 13 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/packages/mapped/mapped.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package packages.mapped; 3 | option go_package="./;mapped"; 4 | 5 | import "targets/fully_qualified/fully_qualified.proto"; 6 | import "targets/unqualified/unqualified.proto"; 7 | import "targets/none/none.proto"; 8 | 9 | message Mapped { 10 | targets.fully_qualified.FullyQualified fully = 1; 11 | targets.unqualified.Unqualified unqualified = 2; 12 | targets.none.None none = 3; 13 | } 14 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/graph/messages/recursive.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package graph.messages; 3 | 4 | message Recursive { 5 | Recursive recurse = 1; 6 | } 7 | 8 | message Circular { 9 | message Rock { Scissors beats = 1; } 10 | message Paper { Rock beats = 1; } 11 | message Scissors { Paper beats = 1; } 12 | } 13 | 14 | message RepeatedRecursive { 15 | map map_val = 1; 16 | repeated RepeatedRecursive list_val = 2; 17 | } 18 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/logwriter/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "logwriter", 8 | srcs = [ 9 | "logwriter.go", 10 | ], 11 | visibility = [ 12 | "//go/src/atlas:__subpackages__", 13 | "//go/src/dropbox:__subpackages__", 14 | ], 15 | deps = [ 16 | ], 17 | ) 18 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/goshared/enum.go: -------------------------------------------------------------------------------- 1 | package goshared 2 | 3 | const enumTpl = ` 4 | {{ $f := .Field }}{{ $r := .Rules }} 5 | {{ template "const" . }} 6 | {{ template "in" . }} 7 | 8 | {{ if $r.GetDefinedOnly }} 9 | if _, ok := {{ (typ $f).Element.Value }}_name[int32({{ accessor . }})]; !ok { 10 | err := {{ err . "value must be one of the defined enum values" }} 11 | if !all { return err } 12 | errors = append(errors, err) 13 | } 14 | {{ end }} 15 | ` 16 | -------------------------------------------------------------------------------- /go/src/github.com/prometheus/client_model/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is deprecated. It is only used for specific purposes by the 4 | [Go instrumentation library](https://github.com/prometheus/client_golang). 5 | 6 | Therefore, contributions to this repository are only expected to happen as 7 | required by changes in the instrumentation library. 8 | Please see 9 | [CONTRIBUTING.md](https://github.com/prometheus/client_golang/blob/master/CONTRIBUTING.md) 10 | of the latter for details. 11 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/goshared/const.go: -------------------------------------------------------------------------------- 1 | package goshared 2 | 3 | const constTpl = `{{ $f := .Field }}{{ $r := .Rules }} 4 | {{ if $r.Const }} 5 | if {{ accessor . }} != {{ lit $r.GetConst }} { 6 | {{- if isEnum $f }} 7 | err := {{ err . "value must equal " (enumVal $f $r.GetConst) }} 8 | {{- else }} 9 | err := {{ err . "value must equal " $r.GetConst }} 10 | {{- end }} 11 | if !all { return err } 12 | errors = append(errors, err) 13 | } 14 | {{ end }} 15 | ` 16 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/proto/test_proto/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "test_proto", 8 | srcs = [ 9 | "test.pb.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/proto", 16 | ], 17 | ) 18 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/protoc-gen-combo/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "protoc-gen-combo", 8 | srcs = [ 9 | "combo.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/version", 16 | ], 17 | ) 18 | -------------------------------------------------------------------------------- /pip/importlib-metadata/BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 4 | 5 | dbx_py_pypi_piplib( 6 | name = "importlib-metadata", 7 | pip_version = "6.8.0", 8 | provides = ["importlib_metadata"], 9 | setup_requires = ["//pip/setuptools_scm"], 10 | use_pep517 = True, 11 | deps = [ 12 | "//pip/configparser", 13 | "//pip/contextlib2", 14 | "//pip/pathlib2", 15 | "//pip/zipp", 16 | ], 17 | ) 18 | -------------------------------------------------------------------------------- /go/src/dropbox/devtools/coverage/cobertura/coberturaxml/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "coberturaxml", 8 | srcs = [ 9 | "xml.go", 10 | ], 11 | visibility = [ 12 | "//go/src/atlas:__subpackages__", 13 | "//go/src/dropbox:__subpackages__", 14 | ], 15 | deps = [ 16 | ], 17 | ) 18 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/protoc-gen-gogo/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "protoc-gen-gogo", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/vanity/command", 16 | ], 17 | ) 18 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/dbx-patches/bazel.patch: -------------------------------------------------------------------------------- 1 | diff -ruN 1/BUILD.in 2/BUILD.in 2 | --- 1/BUILD.in 1970-01-01 00:00:00.000000000 +0000 3 | +++ 2/BUILD.in 2023-08-08 22:53:58.353944742 +0000 4 | @@ -0,0 +1,9 @@ 5 | +load("//build_tools/go:go.bzl", "dbx_go_library") 6 | + 7 | +dbx_go_library( 8 | + name = "v2", 9 | + visibility = [ 10 | + "//go/src/github.com/envoyproxy/protoc-gen-validate:__subpackages__", 11 | + "//go/src/github.com/lyft/protoc-gen-star:__subpackages__", 12 | + ], 13 | +) 14 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/protoc-min-version/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "protoc-min-version", 8 | srcs = [ 9 | "minversion.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/version", 16 | ], 17 | ) 18 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/cmd/protoc-gen-validate-cpp/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/envoyproxy/protoc-gen-validate/module" 5 | pgs "github.com/lyft/protoc-gen-star/v2" 6 | "google.golang.org/protobuf/types/pluginpb" 7 | ) 8 | 9 | func main() { 10 | optional := uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL) 11 | pgs. 12 | Init(pgs.DebugEnv("DEBUG_PGV"), pgs.SupportedFeatures(&optional)). 13 | RegisterModule(module.ValidatorForLanguage("cc")). 14 | Render() 15 | } 16 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "remap", 8 | srcs = [ 9 | "remap.go", 10 | ], 11 | visibility = [ 12 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator:__subpackages__", 13 | ], 14 | deps = [ 15 | ], 16 | ) 17 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/gocov2cobertura/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "gocov2cobertura", 8 | srcs = [ 9 | "gocov2cobertura.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/dropbox/devtools/coverage/cobertura/coberturaxml", 16 | ], 17 | ) 18 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/cmd/protoc-gen-validate-java/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/envoyproxy/protoc-gen-validate/module" 5 | pgs "github.com/lyft/protoc-gen-star/v2" 6 | "google.golang.org/protobuf/types/pluginpb" 7 | ) 8 | 9 | func main() { 10 | optional := uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL) 11 | pgs. 12 | Init(pgs.DebugEnv("DEBUG_PGV"), pgs.SupportedFeatures(&optional)). 13 | RegisterModule(module.ValidatorForLanguage("java")). 14 | Render() 15 | } 16 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/.golangci.yml: -------------------------------------------------------------------------------- 1 | linters: 2 | disable-all: true 3 | enable: 4 | - deadcode 5 | - goconst 6 | - gocyclo 7 | - gofmt 8 | - goimports 9 | - gosimple 10 | - govet 11 | - ineffassign 12 | - misspell 13 | - revive 14 | - structcheck 15 | - typecheck 16 | - unconvert 17 | - unparam 18 | - unused 19 | - varcheck 20 | issues: 21 | max-per-linter: 0 22 | max-same-issues: 0 23 | run: 24 | build-tags: 25 | - integration 26 | deadline: 5m 27 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/testdata/packages/no_options/no_options.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package packages.no_options; 3 | option go_package="example.com/packages/no_options"; 4 | 5 | import "targets/fully_qualified/fully_qualified.proto"; 6 | import "targets/unqualified/unqualified.proto"; 7 | import "targets/none/none.proto"; 8 | 9 | message NoOptions { 10 | targets.fully_qualified.FullyQualified fully = 1; 11 | targets.unqualified.Unqualified unqualified = 2; 12 | targets.none.None none = 3; 13 | } 14 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/post_process.go: -------------------------------------------------------------------------------- 1 | package pgs 2 | 3 | // A PostProcessor modifies the output of an Artifact before final rendering. 4 | type PostProcessor interface { 5 | // Match returns true if the PostProcess should be applied to the Artifact. 6 | // Process is called immediately after Match for the same Artifact. 7 | Match(a Artifact) bool 8 | 9 | // Process receives the rendered artifact and returns the processed bytes or 10 | // an error if something goes wrong. 11 | Process(in []byte) ([]byte, error) 12 | } 13 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/gojunit/gojunit/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "gojunit", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/dropbox/build_tools/gojunit", 16 | "//go/src/dropbox/build_tools/junit", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/codegen/line_writer_test.go: -------------------------------------------------------------------------------- 1 | package codegen 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestGen(t *testing.T) { 10 | lw := NewLineWriter(" ") 11 | lw.Line("Hello %d!", 55) 12 | lw.PushIndent() 13 | lw.Line("Indented!") 14 | lw.PushIndent() 15 | lw.Line("More!") 16 | lw.PopIndent() 17 | lw.PopIndent() 18 | lw.Line(".. and back.") 19 | expected := `Hello 55! 20 | Indented! 21 | More! 22 | .. and back. 23 | ` 24 | assert.Equal(t, lw.String(), expected) 25 | } 26 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/gojunit/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "gojunit", 8 | srcs = [ 9 | "gojunit.go", 10 | ], 11 | visibility = [ 12 | "//go/src/atlas:__subpackages__", 13 | "//go/src/dropbox:__subpackages__", 14 | ], 15 | deps = [ 16 | "//go/src/dropbox/build_tools/junit", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/update-gen-build-go-srcs/main_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | 7 | "github.com/stretchr/testify/require" 8 | 9 | "dropbox/runfiles" 10 | ) 11 | 12 | func TestSrcsAreUpToDate(t *testing.T) { 13 | srcsPath := runfiles.MustDataPath("@dbx_build_tools//build_tools/go/dbx_go_gen_build_srcs.bzl") 14 | actualContent, err := os.ReadFile(srcsPath) 15 | require.NoError(t, err) 16 | 17 | expectedContent := generateSrcs() 18 | require.Equal(t, string(expectedContent), string(actualContent)) 19 | } 20 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/jsonpb/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "jsonpb", 8 | srcs = [ 9 | "jsonpb.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/proto", 16 | "//go/src/github.com/gogo/protobuf/types", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/bazel/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("@bazel_skylib//rules:common_settings.bzl", "string_flag") 5 | 6 | config_setting( 7 | name = "windows_x86_64", 8 | values = {"cpu": "x64_windows"}, 9 | visibility = ["//visibility:public"], 10 | ) 11 | 12 | string_flag( 13 | name = "template-flavor", 14 | build_setting_default = "", 15 | visibility = ["//visibility:public"], 16 | ) 17 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/io/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "io", 8 | srcs = [ 9 | "full.go", 10 | "io.go", 11 | "uint32.go", 12 | "varint.go", 13 | ], 14 | visibility = [ 15 | "//visibility:public", 16 | ], 17 | deps = [ 18 | "//go/src/github.com/gogo/protobuf/proto", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /go/src/github.com/prometheus/client_model/go/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "go", 8 | srcs = [ 9 | "metrics.pb.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "@com_github_golang_protobuf//proto", 16 | "@com_github_golang_protobuf//ptypes/timestamp", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/graph/messages/scalars.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package graph.messages; 3 | 4 | message Scalars { 5 | double double = 1; 6 | float float = 2; 7 | int32 int32 = 3; 8 | int64 int64 = 4; 9 | uint32 uint32 = 5; 10 | uint64 uint64 = 6; 11 | sint32 sint32 = 7; 12 | sint64 sint64 = 8; 13 | fixed32 fixed32 = 9; 14 | fixed64 fixed64 = 10; 15 | sfixed32 sfixed32 = 11; 16 | sfixed64 sfixed64 = 12; 17 | bool bool = 13; 18 | string string = 14; 19 | bytes bytes = 15; 20 | } 21 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/cc/enum.go: -------------------------------------------------------------------------------- 1 | package cc 2 | 3 | const enumTpl = ` 4 | {{ $f := .Field }}{{ $r := .Rules }} 5 | {{ template "const" . }} 6 | {{ template "in" . }} 7 | 8 | {{ if $r.GetDefinedOnly }} 9 | {{ if or $f.Type.IsRepeated $f.Type.IsMap }} 10 | if (!{{ class $f.Type.Element.Enum }}_IsValid({{ accessor . }})) { 11 | {{ else }} 12 | if (!{{ class $f.Type.Enum }}_IsValid({{ accessor . }})) { 13 | {{ end }} 14 | {{ err . "value must be one of the defined enum values" }} 15 | } 16 | {{ end }} 17 | ` 18 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/java/oneof.go: -------------------------------------------------------------------------------- 1 | package java 2 | 3 | const oneOfConstTpl = ` 4 | {{ range .Fields }}{{ renderConstants (context .) }}{{ end }} 5 | ` 6 | 7 | const oneOfTpl = ` 8 | switch (proto.get{{camelCase .Name }}Case()) { 9 | {{ range .Fields -}} 10 | case {{ oneof . }}: 11 | {{ render (context .) }} 12 | break; 13 | {{ end -}} 14 | {{- if required . }} 15 | default: 16 | io.envoyproxy.pgv.RequiredValidation.required("{{ .FullyQualifiedName }}", null); 17 | {{- end }} 18 | } 19 | ` 20 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/ccnop/register.go: -------------------------------------------------------------------------------- 1 | package ccnop 2 | 3 | import ( 4 | "text/template" 5 | 6 | "github.com/envoyproxy/protoc-gen-validate/templates/cc" 7 | pgs "github.com/lyft/protoc-gen-star/v2" 8 | ) 9 | 10 | func RegisterModule(tpl *template.Template, params pgs.Parameters) { 11 | cc.RegisterModule(tpl, params) 12 | template.Must(tpl.Parse(moduleFileTpl)) 13 | } 14 | 15 | func RegisterHeader(tpl *template.Template, params pgs.Parameters) { 16 | cc.RegisterHeader(tpl, params) 17 | template.Must(tpl.Parse(headerFileTpl)) 18 | } 19 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/protoc-gen-gofast/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "protoc-gen-gofast", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/vanity", 16 | "//go/src/github.com/gogo/protobuf/vanity/command", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/protoc-gen-debug/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "protoc-gen-debug", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "@org_golang_google_protobuf//proto", 16 | "@org_golang_google_protobuf//types/pluginpb", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/svcctl/state_machine/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "state_machine", 8 | srcs = [ 9 | "state_machine.go", 10 | ], 11 | visibility = [ 12 | "//go/src/atlas:__subpackages__", 13 | "//go/src/dropbox:__subpackages__", 14 | ], 15 | deps = [ 16 | "//go/src/dropbox/proto/build_tools/svclib", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/protoc-gen-gogofast/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "protoc-gen-gogofast", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/vanity", 16 | "//go/src/github.com/gogo/protobuf/vanity/command", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/svcctl/cmd/svcctl/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "svcctl", 8 | testonly = True, 9 | srcs = [ 10 | "svcctl.go", 11 | ], 12 | visibility = [ 13 | "//visibility:public", 14 | ], 15 | deps = [ 16 | "//go/src/dropbox/build_tools/svcctl/svclib", 17 | "//go/src/dropbox/proto/build_tools/svclib", 18 | ], 19 | ) 20 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/envoyproxy/protoc-gen-validate/module" 5 | pgs "github.com/lyft/protoc-gen-star/v2" 6 | pgsgo "github.com/lyft/protoc-gen-star/v2/lang/go" 7 | "google.golang.org/protobuf/types/pluginpb" 8 | ) 9 | 10 | func main() { 11 | optional := uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL) 12 | pgs. 13 | Init(pgs.DebugEnv("DEBUG_PGV"), pgs.SupportedFeatures(&optional)). 14 | RegisterModule(module.Validator()). 15 | RegisterPostProcessor(pgsgo.GoFmt()). 16 | Render() 17 | } 18 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/plugin/testgen/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "testgen", 8 | srcs = [ 9 | "testgen.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/gogoproto", 16 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/protoc-gen-gogofaster/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "protoc-gen-gogofaster", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/vanity", 16 | "//go/src/github.com/gogo/protobuf/vanity/command", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/protoc-gen-gogoslick/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "protoc-gen-gogoslick", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/vanity", 16 | "//go/src/github.com/gogo/protobuf/vanity/command", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/protoc-gen-gogotypes/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "protoc-gen-gogotypes", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/vanity", 16 | "//go/src/github.com/gogo/protobuf/vanity/command", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/.mailmap: -------------------------------------------------------------------------------- 1 | Walter Schulze Walter Schulze 2 | Walter Schulze 3 | Walter Schulze awalterschulze 4 | Walter Schulze awalterschulze@gmail.com 5 | John Tuley 6 | Anton Povarov 7 | Denis Smirnov dennwc 8 | DongYun Kang -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/plugin/embedcheck/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "embedcheck", 8 | srcs = [ 9 | "embedcheck.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/gogoproto", 16 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/plugin/oneofcheck/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "oneofcheck", 8 | srcs = [ 9 | "oneofcheck.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/gogoproto", 16 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/protoc-gen-gogo/plugin/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "plugin", 8 | srcs = [ 9 | "plugin.pb.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/proto", 16 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/descriptor", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/protoc-gen-gostring/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "protoc-gen-gostring", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/plugin/gostring", 16 | "//go/src/github.com/gogo/protobuf/vanity/command", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/go/duration.go: -------------------------------------------------------------------------------- 1 | package golang 2 | 3 | const durationTpl = `{{ $f := .Field }}{{ $r := .Rules }} 4 | {{ template "required" . }} 5 | 6 | {{ if or $r.In $r.NotIn $r.Lt $r.Lte $r.Gt $r.Gte $r.Const }} 7 | if d := {{ accessor . }}; d != nil { 8 | dur, err := d.AsDuration(), d.CheckValid() 9 | if err != nil { 10 | err = {{ errCause . "err" "value is not a valid duration" }} 11 | if !all { return err } 12 | errors = append(errors, err) 13 | } else { 14 | {{ template "durationcmp" . }} 15 | } 16 | } 17 | {{ end }} 18 | ` 19 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/plugin/defaultcheck/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "defaultcheck", 8 | srcs = [ 9 | "defaultcheck.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/gogoproto", 16 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/plugin/enumstringer/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "enumstringer", 8 | srcs = [ 9 | "enumstringer.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/gogoproto", 16 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/protoc-gen-gogo/grpc/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "grpc", 8 | srcs = [ 9 | "grpc.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/descriptor", 16 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/build-merge/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "build-merge", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "@com_github_bazelbuild_buildtools//build", 16 | "@com_github_bazelbuild_buildtools//edit", 17 | "@com_github_bazelbuild_buildtools//warn", 18 | ], 19 | ) 20 | -------------------------------------------------------------------------------- /go/src/dropbox/cputime/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "cputime", 8 | srcs = [ 9 | ], 10 | cgo_srcs = [ 11 | "cputime.go", 12 | ], 13 | visibility = [ 14 | "//go/src/atlas:__subpackages__", 15 | "//go/src/dropbox:__subpackages__", 16 | ], 17 | deps = [ 18 | "//go/src/dropbox/procfs", 19 | "@com_github_c9s_goprocinfo//linux", 20 | ], 21 | ) 22 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/go/timestamp.go: -------------------------------------------------------------------------------- 1 | package golang 2 | 3 | const timestampTpl = `{{ $f := .Field }}{{ $r := .Rules }} 4 | {{ template "required" . }} 5 | 6 | {{ if or $r.Lt $r.Lte $r.Gt $r.Gte $r.LtNow $r.GtNow $r.Within $r.Const }} 7 | if t := {{ accessor . }}; t != nil { 8 | ts, err := t.AsTime(), t.CheckValid() 9 | if err != nil { 10 | err = {{ errCause . "err" "value is not a valid timestamp" }} 11 | if !all { return err } 12 | errors = append(errors, err) 13 | } else { 14 | {{ template "timestampcmp" . }} 15 | } 16 | } 17 | {{ end }} 18 | ` 19 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/gogoreplace/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | "io/ioutil" 7 | "os" 8 | ) 9 | 10 | func main() { 11 | args := os.Args 12 | if len(args) != 4 { 13 | fmt.Println("gogoreplace wants three arguments") 14 | fmt.Println(" gogoreplace oldsubstring newsubstring filename") 15 | os.Exit(1) 16 | } 17 | data, err := ioutil.ReadFile(args[3]) 18 | if err != nil { 19 | panic(err) 20 | } 21 | data = bytes.Replace(data, []byte(args[1]), []byte(args[2]), -1) 22 | if err := ioutil.WriteFile(args[3], data, 0666); err != nil { 23 | panic(err) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /go/src/dropbox/proto/mypy/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "mypy", 8 | srcs = [ 9 | "mypy.pb.go", 10 | ], 11 | visibility = [ 12 | "//go/src/atlas:__subpackages__", 13 | "//go/src/dropbox:__subpackages__", 14 | ], 15 | deps = [ 16 | "//go/src/github.com/gogo/protobuf/proto", 17 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/descriptor", 18 | ], 19 | ) 20 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/gen-build-go/go.mod: -------------------------------------------------------------------------------- 1 | module dropbox/build_tools/gen-build-go 2 | 3 | go 1.18 4 | 5 | exclude github.com/prometheus/prometheus v2.5.0+incompatible 6 | 7 | require ( 8 | github.com/bazelbuild/buildtools v0.0.0-20230317132445-9c3c1fc0106e 9 | github.com/stretchr/testify v1.8.4 10 | golang.org/x/mod v0.12.0 11 | ) 12 | 13 | require ( 14 | github.com/davecgh/go-spew v1.1.1 // indirect 15 | github.com/kr/pretty v0.3.1 // indirect 16 | github.com/pmezard/go-difflib v1.0.0 // indirect 17 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect 18 | gopkg.in/yaml.v3 v3.0.1 // indirect 19 | ) 20 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/graph/messages/embedded.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package graph.messages; 3 | 4 | import "messages/scalars.proto"; 5 | import "google/protobuf/duration.proto"; 6 | 7 | message Before {} 8 | 9 | message Embedded { 10 | message NestedBefore {} 11 | 12 | Before local_before = 1; 13 | After local_after = 2; 14 | 15 | NestedBefore nested_before = 3; 16 | NestedAfter nested_after = 4; 17 | 18 | Scalars external_in_package = 5; 19 | google.protobuf.Duration external_3rd_party = 6; 20 | 21 | message NestedAfter {} 22 | } 23 | 24 | message After {} 25 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/cmd/protoc-gen-validate-go/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/envoyproxy/protoc-gen-validate/module" 5 | pgs "github.com/lyft/protoc-gen-star/v2" 6 | pgsgo "github.com/lyft/protoc-gen-star/v2/lang/go" 7 | "google.golang.org/protobuf/types/pluginpb" 8 | ) 9 | 10 | func main() { 11 | optional := uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL) 12 | pgs. 13 | Init(pgs.DebugEnv("DEBUG_PGV"), pgs.SupportedFeatures(&optional)). 14 | RegisterModule(module.ValidatorForLanguage("go")). 15 | RegisterPostProcessor(pgsgo.GoFmt()). 16 | Render() 17 | } 18 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/gogoproto/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "gogoproto", 8 | srcs = [ 9 | "doc.go", 10 | "gogo.pb.go", 11 | "helper.go", 12 | ], 13 | visibility = [ 14 | "//visibility:public", 15 | ], 16 | deps = [ 17 | "//go/src/github.com/gogo/protobuf/proto", 18 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/descriptor", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "descriptor", 8 | srcs = [ 9 | "descriptor.go", 10 | "descriptor.pb.go", 11 | "descriptor_gostring.gen.go", 12 | "helper.go", 13 | ], 14 | visibility = [ 15 | "//visibility:public", 16 | ], 17 | deps = [ 18 | "//go/src/github.com/gogo/protobuf/proto", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/vanity/test/fast/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "fast", 8 | srcs = [ 9 | "gogovanity.pb.go", 10 | "proto3.pb.go", 11 | "vanity.pb.go", 12 | ], 13 | visibility = [ 14 | "//visibility:public", 15 | ], 16 | deps = [ 17 | "//go/src/github.com/gogo/protobuf/gogoproto", 18 | "//go/src/github.com/gogo/protobuf/proto", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/ccnop/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "ccnop", 8 | srcs = [ 9 | "file.go", 10 | "register.go", 11 | ], 12 | visibility = [ 13 | "//visibility:public", 14 | ], 15 | deps = [ 16 | "//go/src/github.com/envoyproxy/protoc-gen-validate/templates/cc", 17 | "//go/src/github.com/lyft/protoc-gen-star/v2", 18 | ], 19 | ) 20 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/go/register.go: -------------------------------------------------------------------------------- 1 | package golang 2 | 3 | import ( 4 | pgs "github.com/lyft/protoc-gen-star/v2" 5 | "text/template" 6 | 7 | "github.com/envoyproxy/protoc-gen-validate/templates/goshared" 8 | ) 9 | 10 | func Register(tpl *template.Template, params pgs.Parameters) { 11 | goshared.Register(tpl, params) 12 | template.Must(tpl.Parse(fileTpl)) 13 | template.Must(tpl.New("required").Parse(requiredTpl)) 14 | template.Must(tpl.New("timestamp").Parse(timestampTpl)) 15 | template.Must(tpl.New("duration").Parse(durationTpl)) 16 | template.Must(tpl.New("message").Parse(messageTpl)) 17 | } 18 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/vanity/test/faster/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "faster", 8 | srcs = [ 9 | "gogovanity.pb.go", 10 | "proto3.pb.go", 11 | "vanity.pb.go", 12 | ], 13 | visibility = [ 14 | "//visibility:public", 15 | ], 16 | deps = [ 17 | "//go/src/github.com/gogo/protobuf/gogoproto", 18 | "//go/src/github.com/gogo/protobuf/proto", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/vanity/test/slick/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "slick", 8 | srcs = [ 9 | "gogovanity.pb.go", 10 | "proto3.pb.go", 11 | "vanity.pb.go", 12 | ], 13 | visibility = [ 14 | "//visibility:public", 15 | ], 16 | deps = [ 17 | "//go/src/github.com/gogo/protobuf/gogoproto", 18 | "//go/src/github.com/gogo/protobuf/proto", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/.travis.yml: -------------------------------------------------------------------------------- 1 | apt: 2 | update: true 3 | 4 | env: 5 | - PROTOBUF_VERSION=2.6.1 6 | - PROTOBUF_VERSION=3.0.2 7 | - PROTOBUF_VERSION=3.14.0 8 | 9 | before_install: 10 | - HOME=/home/travis ./install-protobuf.sh 11 | - PATH=/home/travis/bin:$PATH protoc --version 12 | 13 | script: 14 | - PATH=/home/travis/bin:$PATH make buildserverall 15 | - echo $TRAVIS_GO_VERSION 16 | - if [[ "$PROTOBUF_VERSION" == "3.14.0" ]] && [[ "$TRAVIS_GO_VERSION" == "1.15.x" ]]; then ! git status --porcelain | read || (git status; git diff; exit 1); fi 17 | 18 | language: go 19 | 20 | go: 21 | - 1.12.x 22 | - 1.15.x 23 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/proto/proto3_proto/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "proto3_proto", 8 | srcs = [ 9 | "proto3.pb.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/proto", 16 | "//go/src/github.com/gogo/protobuf/proto/test_proto", 17 | "//go/src/github.com/gogo/protobuf/types", 18 | ], 19 | ) 20 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/shared/functions.go: -------------------------------------------------------------------------------- 1 | package shared 2 | 3 | import ( 4 | "text/template" 5 | 6 | pgs "github.com/lyft/protoc-gen-star/v2" 7 | ) 8 | 9 | func RegisterFunctions(tpl *template.Template, params pgs.Parameters) { 10 | tpl.Funcs(map[string]interface{}{ 11 | "disabled": Disabled, 12 | "ignored": Ignored, 13 | "required": RequiredOneOf, 14 | "context": rulesContext, 15 | "render": Render(tpl), 16 | "has": Has, 17 | "needs": Needs, 18 | "fileneeds": FileNeeds, 19 | "isEnum": isEnum, 20 | "enumList": enumList, 21 | "enumVal": enumVal, 22 | }) 23 | } 24 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/conformance/internal/conformance_proto/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "conformance_proto", 8 | srcs = [ 9 | "conformance.pb.go", 10 | ], 11 | visibility = [ 12 | "//go/src/github.com/gogo/protobuf/conformance:__subpackages__", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/proto", 16 | "//go/src/github.com/gogo/protobuf/types", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of GoGo authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS file, which 3 | # lists people. For example, employees are listed in CONTRIBUTORS, 4 | # but not in AUTHORS, because the employer holds the copyright. 5 | 6 | # Names should be added to this file as one of 7 | # Organization's name 8 | # Individual's name 9 | # Individual's name 10 | 11 | # Please keep the list sorted. 12 | 13 | Sendgrid, Inc 14 | Vastech SA (PTY) LTD 15 | Walter Schulze 16 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/envoyproxy/protoc-gen-validate 2 | 3 | go 1.19 4 | 5 | require ( 6 | github.com/iancoleman/strcase v0.2.0 7 | github.com/lyft/protoc-gen-star/v2 v2.0.3 8 | golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 9 | golang.org/x/net v0.11.0 10 | golang.org/x/tools v0.10.0 11 | google.golang.org/protobuf v1.30.0 12 | ) 13 | 14 | require ( 15 | github.com/spf13/afero v1.3.3 // indirect 16 | golang.org/x/mod v0.11.0 // indirect 17 | golang.org/x/sys v0.9.0 // indirect 18 | golang.org/x/text v0.10.0 // indirect 19 | ) 20 | 21 | retract [v0.6.9, v0.6.12] // Published accidentally 22 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/conformance/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "conformance", 8 | srcs = [ 9 | "conformance.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/conformance/internal/conformance_proto", 16 | "//go/src/github.com/gogo/protobuf/jsonpb", 17 | "//go/src/github.com/gogo/protobuf/proto", 18 | ], 19 | ) 20 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "jsonpb_test_proto", 8 | srcs = [ 9 | "bytes.go", 10 | "more_test_objects.pb.go", 11 | "test_objects.pb.go", 12 | ], 13 | visibility = [ 14 | "//visibility:public", 15 | ], 16 | deps = [ 17 | "//go/src/github.com/gogo/protobuf/proto", 18 | "//go/src/github.com/gogo/protobuf/types", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/lyft/protoc-gen-star/v2 2 | 3 | go 1.17 4 | 5 | require ( 6 | github.com/spf13/afero v1.3.3 7 | github.com/stretchr/testify v1.6.1 8 | golang.org/x/tools v0.1.12 9 | google.golang.org/protobuf v1.23.0 10 | ) 11 | 12 | require ( 13 | github.com/davecgh/go-spew v1.1.0 // indirect 14 | github.com/pmezard/go-difflib v1.0.0 // indirect 15 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect 16 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect 17 | golang.org/x/text v0.3.7 // indirect 18 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect 19 | ) 20 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/.github/buf-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/cc/any.go: -------------------------------------------------------------------------------- 1 | package cc 2 | 3 | const anyTpl = `{{ $f := .Field }}{{ $r := .Rules }} 4 | {{ template "required" . }} 5 | 6 | {{ if $r.In }} 7 | {{ $table := lookup $f "InLookup" }} 8 | if ({{ hasAccessor . }} && {{ $table }}.find({{ accessor . }}.type_url()) == {{ $table }}.end()) { 9 | {{ err . "type URL must be in list " $r.In }} 10 | } 11 | {{ else if $r.NotIn }} 12 | {{ $table := lookup $f "NotInLookup" }} 13 | if ({{ hasAccessor . }} && {{ $table }}.find({{ accessor . }}.type_url()) != {{ $table }}.end()) { 14 | {{ err . "type URL must not be in list " $r.NotIn }} 15 | } 16 | {{ end }} 17 | ` 18 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/plugin/face/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "face", 8 | srcs = [ 9 | "face.go", 10 | "facetest.go", 11 | ], 12 | visibility = [ 13 | "//visibility:public", 14 | ], 15 | deps = [ 16 | "//go/src/github.com/gogo/protobuf/gogoproto", 17 | "//go/src/github.com/gogo/protobuf/plugin/testgen", 18 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/shared/reflection.go: -------------------------------------------------------------------------------- 1 | package shared 2 | 3 | import ( 4 | "reflect" 5 | 6 | "google.golang.org/protobuf/proto" 7 | ) 8 | 9 | func extractVal(r proto.Message) reflect.Value { 10 | val := reflect.ValueOf(r) 11 | 12 | if val.Kind() == reflect.Interface { 13 | val = val.Elem() 14 | } 15 | 16 | if val.Kind() == reflect.Ptr { 17 | val = val.Elem() 18 | } 19 | 20 | return val 21 | } 22 | 23 | // Has returns true if the provided Message has the a field fld. 24 | func Has(msg proto.Message, fld string) bool { 25 | val := extractVal(msg) 26 | return val.IsValid() && 27 | val.FieldByName(fld).IsValid() 28 | } 29 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/plugin/union/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "union", 8 | srcs = [ 9 | "union.go", 10 | "uniontest.go", 11 | ], 12 | visibility = [ 13 | "//visibility:public", 14 | ], 15 | deps = [ 16 | "//go/src/github.com/gogo/protobuf/gogoproto", 17 | "//go/src/github.com/gogo/protobuf/plugin/testgen", 18 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testutils/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "testutils", 8 | srcs = [ 9 | "loader.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/lyft/protoc-gen-star/v2", 16 | "@com_github_spf13_afero", 17 | "@org_golang_google_protobuf//proto", 18 | "@org_golang_google_protobuf//types/descriptorpb", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /go/src/godropbox/errors/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library", "dbx_go_test") 5 | 6 | dbx_go_library( 7 | name = "errors", 8 | srcs = [ 9 | "errors.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | ], 16 | ) 17 | 18 | dbx_go_test( 19 | name = "errors_test", 20 | srcs = [ 21 | "errors.go", 22 | "errors_test.go", 23 | ], 24 | deps = [ 25 | "@com_github_stretchr_testify//require", 26 | ], 27 | ) 28 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/junit/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library", "dbx_go_test") 5 | 6 | dbx_go_library( 7 | name = "junit", 8 | srcs = [ 9 | "xml.go", 10 | ], 11 | visibility = [ 12 | "//go/src/atlas:__subpackages__", 13 | "//go/src/dropbox:__subpackages__", 14 | ], 15 | deps = [ 16 | ], 17 | ) 18 | 19 | dbx_go_test( 20 | name = "junit_test", 21 | srcs = [ 22 | "xml.go", 23 | "xml_test.go", 24 | ], 25 | deps = [ 26 | ], 27 | ) 28 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/graph/messages/enums.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package graph.messages; 3 | 4 | import "messages/enums_ext.proto"; 5 | import "google/protobuf/type.proto"; 6 | 7 | enum BeforeEnum { BEFORE_VALUE = 0; } 8 | 9 | message Enums { 10 | enum NestedBefore { BEFORE_VALUE = 0; } 11 | 12 | BeforeEnum before = 1; 13 | AfterEnum after = 2; 14 | 15 | NestedBefore nested_before = 3; 16 | NestedAfter nested_after = 4; 17 | 18 | External external_in_package = 5; 19 | google.protobuf.Syntax external_3rd_party = 6; 20 | 21 | enum NestedAfter { AFTER_VALUE = 0; } 22 | } 23 | 24 | enum AfterEnum { AFTER_VALUE = 0; } 25 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/logwriter/logwriter.go: -------------------------------------------------------------------------------- 1 | package logwriter 2 | 3 | import ( 4 | "bufio" 5 | "bytes" 6 | "io" 7 | "log" 8 | ) 9 | 10 | type logWriter struct { 11 | logger *log.Logger 12 | } 13 | 14 | func New(logger *log.Logger) io.Writer { 15 | return &logWriter{logger: logger} 16 | } 17 | 18 | // This is clearly approximate and assumes unfragmented writes. 19 | // This probably works in most cases, but may mangle output in others. 20 | func (lw *logWriter) Write(p []byte) (n int, err error) { 21 | scanner := bufio.NewScanner(bytes.NewReader(p)) 22 | for scanner.Scan() { 23 | lw.logger.Print(string(scanner.Text())) 24 | } 25 | return len(p), scanner.Err() 26 | } 27 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/svcctl/proc/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library", "dbx_go_test") 5 | 6 | dbx_go_library( 7 | name = "proc", 8 | srcs = [ 9 | "proc.go", 10 | ], 11 | visibility = [ 12 | "//go/src/atlas:__subpackages__", 13 | "//go/src/dropbox:__subpackages__", 14 | ], 15 | deps = [ 16 | ], 17 | ) 18 | 19 | dbx_go_test( 20 | name = "proc_test", 21 | srcs = [ 22 | "proc.go", 23 | "proc_test.go", 24 | ], 25 | deps = [ 26 | ], 27 | ) 28 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/cmd/protoc-gen-validate-cpp/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "protoc-gen-validate-cpp", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/envoyproxy/protoc-gen-validate/module", 16 | "//go/src/github.com/lyft/protoc-gen-star/v2", 17 | "@org_golang_google_protobuf//types/pluginpb", 18 | ], 19 | ) 20 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/cmd/protoc-gen-validate-java/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "protoc-gen-validate-java", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/envoyproxy/protoc-gen-validate/module", 16 | "//go/src/github.com/lyft/protoc-gen-star/v2", 17 | "@org_golang_google_protobuf//types/pluginpb", 18 | ], 19 | ) 20 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/plugin/gostring/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "gostring", 8 | srcs = [ 9 | "gostring.go", 10 | "gostringtest.go", 11 | ], 12 | visibility = [ 13 | "//visibility:public", 14 | ], 15 | deps = [ 16 | "//go/src/github.com/gogo/protobuf/gogoproto", 17 | "//go/src/github.com/gogo/protobuf/plugin/testgen", 18 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/plugin/stringer/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "stringer", 8 | srcs = [ 9 | "stringer.go", 10 | "stringertest.go", 11 | ], 12 | visibility = [ 13 | "//visibility:public", 14 | ], 15 | deps = [ 16 | "//go/src/github.com/gogo/protobuf/gogoproto", 17 | "//go/src/github.com/gogo/protobuf/plugin/testgen", 18 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/build-sqfs/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "build-sqfs", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | data = [ 12 | "//build_tools:chronic", 13 | "@com_github_plougher_squashfs_tools//:mksquashfs", 14 | ], 15 | generate_norace_binary = True, 16 | visibility = [ 17 | "//visibility:public", 18 | ], 19 | deps = [ 20 | "//go/src/dropbox/runfiles", 21 | "@org_golang_x_sys//unix", 22 | ], 23 | ) 24 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/svcctl/cmd/svcd/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "svcd", 8 | testonly = True, 9 | srcs = [ 10 | "svcd.go", 11 | ], 12 | generate_norace_binary = True, 13 | visibility = [ 14 | "//visibility:public", 15 | ], 16 | deps = [ 17 | "//go/src/dropbox/build_tools/svcctl", 18 | "//go/src/dropbox/build_tools/svcctl/svclib", 19 | "//go/src/dropbox/proto/build_tools/svclib", 20 | "@org_golang_google_grpc", 21 | ], 22 | ) 23 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/svcctl/topological/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library", "dbx_go_test") 5 | 6 | dbx_go_library( 7 | name = "topological", 8 | srcs = [ 9 | "runner.go", 10 | ], 11 | visibility = [ 12 | "//go/src/atlas:__subpackages__", 13 | "//go/src/dropbox:__subpackages__", 14 | ], 15 | deps = [ 16 | ], 17 | ) 18 | 19 | dbx_go_test( 20 | name = "topological_test", 21 | srcs = [ 22 | "runner.go", 23 | "runner_test.go", 24 | ], 25 | deps = [ 26 | ], 27 | ) 28 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/cc/message.go: -------------------------------------------------------------------------------- 1 | package cc 2 | 3 | const messageTpl = ` 4 | {{ $f := .Field }}{{ $r := .Rules }} 5 | {{ template "required" . }} 6 | {{ if .MessageRules.GetSkip }} 7 | // skipping validation for {{ $f.Name }} 8 | {{ else }} 9 | { 10 | pgv::ValidationMsg inner_err; 11 | if ({{ hasAccessor .}} && !pgv::BaseValidator::AbstractCheckMessage({{ accessor . }}, &inner_err)) { 12 | {{ errCause . "inner_err" "embedded message failed validation" }} 13 | } 14 | } 15 | {{ end }} 16 | ` 17 | 18 | const requiredTpl = ` 19 | {{ if .Rules.GetRequired }} 20 | if (!{{ hasAccessor . }}) { 21 | {{ err . "value is required" }} 22 | } 23 | {{ end }} 24 | ` 25 | -------------------------------------------------------------------------------- /thirdparty/bzip2/BUILD.bzip2: -------------------------------------------------------------------------------- 1 | cc_binary( 2 | name = "bzip2", 3 | srcs = ["bzip2.c"], 4 | copts = [ 5 | "-D_FILE_OFFSET_BITS=64", 6 | ], 7 | deps = [ 8 | ":bz2", 9 | ], 10 | ) 11 | 12 | cc_library( 13 | name = "bz2", 14 | srcs = [ 15 | "blocksort.c", 16 | "bzlib.c", 17 | "bzlib_private.h", 18 | "compress.c", 19 | "crctable.c", 20 | "decompress.c", 21 | "huffman.c", 22 | "randtable.c", 23 | ], 24 | hdrs = [ 25 | "bzlib.h", 26 | ], 27 | copts = [ 28 | "-D_FILE_OFFSET_BITS=64", 29 | ], 30 | strip_include_prefix = ".", 31 | visibility = ["//visibility:public"], 32 | ) 33 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "protoc-gen-validate", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/envoyproxy/protoc-gen-validate/module", 16 | "//go/src/github.com/lyft/protoc-gen-star/v2", 17 | "//go/src/github.com/lyft/protoc-gen-star/v2/lang/go", 18 | "@org_golang_google_protobuf//types/pluginpb", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/plugin/unmarshal/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "unmarshal", 8 | srcs = [ 9 | "unmarshal.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/gogoproto", 16 | "//go/src/github.com/gogo/protobuf/proto", 17 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/descriptor", 18 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/vanity/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "vanity", 8 | srcs = [ 9 | "enum.go", 10 | "field.go", 11 | "file.go", 12 | "foreach.go", 13 | "msg.go", 14 | ], 15 | visibility = [ 16 | "//visibility:public", 17 | ], 18 | deps = [ 19 | "//go/src/github.com/gogo/protobuf/gogoproto", 20 | "//go/src/github.com/gogo/protobuf/proto", 21 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/descriptor", 22 | ], 23 | ) 24 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/codegen/proto/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "proto", 8 | srcs = [ 9 | "descriptor.go", 10 | ], 11 | visibility = [ 12 | "//go/src/atlas:__subpackages__", 13 | "//go/src/dropbox:__subpackages__", 14 | ], 15 | deps = [ 16 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/descriptor", 17 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 18 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/plugin", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/goshared/any.go: -------------------------------------------------------------------------------- 1 | package goshared 2 | 3 | const anyTpl = `{{ $f := .Field }}{{ $r := .Rules }} 4 | {{ template "required" . }} 5 | 6 | if a := {{ accessor . }}; a != nil { 7 | {{ if $r.In }} 8 | if _, ok := {{ lookup $f "InLookup" }}[a.GetTypeUrl()]; !ok { 9 | err := {{ err . "type URL must be in list " $r.In }} 10 | if !all { return err } 11 | errors = append(errors, err) 12 | } 13 | {{ else if $r.NotIn }} 14 | if _, ok := {{ lookup $f "NotInLookup" }}[a.GetTypeUrl()]; ok { 15 | err := {{ err . "type URL must not be in list " $r.NotIn }} 16 | if !all { return err } 17 | errors = append(errors, err) 18 | } 19 | {{ end }} 20 | } 21 | ` 22 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/gen-build-go/lib/targetlist.go: -------------------------------------------------------------------------------- 1 | package lib 2 | 3 | import "strings" 4 | 5 | type TargetList []string 6 | 7 | func (s TargetList) Len() int { 8 | return len(s) 9 | } 10 | 11 | func (s TargetList) Swap(i int, j int) { 12 | s[i], s[j] = s[j], s[i] 13 | } 14 | 15 | func (s TargetList) Less(i int, j int) bool { 16 | p1 := s.priority(s[i]) 17 | p2 := s.priority(s[j]) 18 | 19 | if p1 < p2 { 20 | return true 21 | } 22 | if p2 < p1 { 23 | return false 24 | } 25 | 26 | return s[i] < s[j] 27 | } 28 | 29 | func (s TargetList) priority(target string) int { 30 | if strings.HasPrefix(target, "//") { 31 | return 3 32 | } 33 | if strings.HasPrefix(target, ":") { 34 | return 2 35 | } 36 | return 1 37 | } 38 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/gen-build-go/lib/genbuildgolib_test.go: -------------------------------------------------------------------------------- 1 | package lib 2 | 3 | import "testing" 4 | 5 | func TestPathToExtRepoName(t *testing.T) { 6 | type test struct { 7 | input string 8 | output string 9 | } 10 | 11 | testCases := []test{ 12 | {"golang.org/x/crypto", "org_golang_x_crypto"}, 13 | {"golang.org/x/crypto/ssh/terminal", "org_golang_x_crypto_ssh_terminal"}, 14 | {"github.com/mattn/go-runewidth", "com_github_mattn_go_runewidth"}, 15 | {"ht_sr_git_~sbinet_gg", "ht_sr_git__sbinet_gg"}, 16 | } 17 | 18 | for _, tc := range testCases { 19 | extRepoName := PathToExtRepoName(tc.input, "") 20 | if tc.output != extRepoName { 21 | t.Errorf("got %s, wanted %s", extRepoName, tc.output) 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/go/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "go", 8 | srcs = [ 9 | "duration.go", 10 | "file.go", 11 | "message.go", 12 | "register.go", 13 | "required.go", 14 | "timestamp.go", 15 | ], 16 | visibility = [ 17 | "//visibility:public", 18 | ], 19 | deps = [ 20 | "//go/src/github.com/envoyproxy/protoc-gen-validate/templates/goshared", 21 | "//go/src/github.com/lyft/protoc-gen-star/v2", 22 | ], 23 | ) 24 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/graph/nested/nested.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package graph.nested; 3 | 4 | message Foo { 5 | Bar x = 1; // usage before declaration 6 | 7 | // nested message 8 | message Bar { 9 | Baz a = 1; // usage before declaration 10 | 11 | // doubly nested enum 12 | enum Baz {VALUE = 0;} 13 | Baz b = 2; // usage after declaration 14 | 15 | // doubly nested message 16 | message Quux {} 17 | Quux c = 3; 18 | } 19 | 20 | Bar y = 2; // usage after declaration 21 | 22 | // same name, different scope 23 | enum Baz {VALUE = 0;} 24 | Baz shallow = 3; 25 | 26 | Bar.Baz deep = 4; // usage of deeply nested child enum 27 | } 28 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/.github/workflows/pr-title.yaml: -------------------------------------------------------------------------------- 1 | name: Lint PR Title 2 | # Prevent writing to the repository using the CI token. 3 | # Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions 4 | permissions: 5 | pull-requests: read 6 | on: 7 | pull_request: 8 | # By default, a workflow only runs when a pull_request's activity type is opened, 9 | # synchronize, or reopened. We explicity override here so that PR titles are 10 | # re-linted when the PR text content is edited. 11 | types: 12 | - opened 13 | - edited 14 | - reopened 15 | - synchronize 16 | jobs: 17 | lint: 18 | uses: bufbuild/base-workflows/.github/workflows/pr-title.yaml@main 19 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/cmd/protoc-gen-validate-go/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary") 5 | 6 | dbx_go_binary( 7 | name = "protoc-gen-validate-go", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/envoyproxy/protoc-gen-validate/module", 16 | "//go/src/github.com/lyft/protoc-gen-star/v2", 17 | "//go/src/github.com/lyft/protoc-gen-star/v2/lang/go", 18 | "@org_golang_google_protobuf//types/pluginpb", 19 | ], 20 | ) 21 | -------------------------------------------------------------------------------- /configs/proto/dropbox/proto/mypy/mypy.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto2"; 2 | 3 | package mypy; 4 | 5 | import "google/protobuf/descriptor.proto"; 6 | 7 | option go_package = "dropbox/proto/mypy"; 8 | option java_package = 'com.dropbox.proto.mypy'; 9 | option java_multiple_files = true; 10 | 11 | extend google.protobuf.FieldOptions { 12 | // Tells mypy to use a specific newtype rather than the normal type for this field. 13 | optional string casttype = 60000; 14 | 15 | // 60001 is taken 16 | 17 | // Tells mypy to use a specific type for keys; only makes sense on map fields 18 | optional string keytype = 60002; 19 | // Tells mypy to use a specific type for values; only makes sense on map fields 20 | optional string valuetype = 60003; 21 | } 22 | -------------------------------------------------------------------------------- /go/src/dropbox/procfs/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library", "dbx_go_test") 5 | 6 | dbx_go_library( 7 | name = "procfs", 8 | srcs = [ 9 | "procfs.go", 10 | "stat.go", 11 | ], 12 | visibility = [ 13 | "//go/src/atlas:__subpackages__", 14 | "//go/src/dropbox:__subpackages__", 15 | ], 16 | deps = [ 17 | ], 18 | ) 19 | 20 | dbx_go_test( 21 | name = "procfs_test", 22 | srcs = [ 23 | "procfs.go", 24 | "stat.go", 25 | "stat_test.go", 26 | ], 27 | deps = [ 28 | "@in_gopkg_check_v1", 29 | ], 30 | ) 31 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "go", 8 | srcs = [ 9 | "camel.go", 10 | "context.go", 11 | "docs.go", 12 | "gofmt.go", 13 | "goimports.go", 14 | "name.go", 15 | "package.go", 16 | "parameters.go", 17 | "type_name.go", 18 | ], 19 | visibility = [ 20 | "//visibility:public", 21 | ], 22 | deps = [ 23 | "//go/src/github.com/lyft/protoc-gen-star/v2", 24 | "@org_golang_x_tools//imports", 25 | ], 26 | ) 27 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/plugin/populate/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "populate", 8 | srcs = [ 9 | "populate.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/gogoproto", 16 | "//go/src/github.com/gogo/protobuf/proto", 17 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/descriptor", 18 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 19 | "//go/src/github.com/gogo/protobuf/vanity", 20 | ], 21 | ) 22 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/graph/extensions/ext/data.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package extensions.ext; 3 | option go_package = "ext"; 4 | 5 | import "google/protobuf/descriptor.proto"; 6 | 7 | extend google.protobuf.MessageOptions { 8 | bool annotated = 123123; 9 | } 10 | 11 | extend google.protobuf.FieldOptions { 12 | string name = 456789; 13 | } 14 | 15 | message EnumExtension {} 16 | 17 | extend google.protobuf.EnumOptions { 18 | EnumExtension ext = 101112; 19 | } 20 | 21 | extend google.protobuf.EnumValueOptions { 22 | repeated int32 numbers = 131415; 23 | } 24 | 25 | extend google.protobuf.OneofOptions { 26 | double float = 161718; 27 | } 28 | 29 | extend google.protobuf.FileOptions { 30 | string owner = 192021; 31 | } 32 | -------------------------------------------------------------------------------- /dropbox/build_tools/echo_server/echo_client.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | import argparse 4 | import socket 5 | 6 | 7 | def main() -> None: 8 | ap = argparse.ArgumentParser("echo_server") 9 | ap.add_argument("--port", required=True, type=int, help="Port to listen on") 10 | ap.add_argument("msg", help="Mesage to send to the echo server") 11 | args = ap.parse_args() 12 | 13 | s = socket.create_connection(("localhost", args.port)) 14 | s.sendall(args.msg.encode("utf-8")) 15 | s.shutdown(socket.SHUT_WR) 16 | 17 | echo_msg = b"" 18 | while True: 19 | buf = s.recv(1024) 20 | if not buf: 21 | break 22 | echo_msg += buf 23 | s.close() 24 | print(echo_msg.decode("utf-8")) 25 | 26 | 27 | main() 28 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/plugin/marshalto/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "marshalto", 8 | srcs = [ 9 | "marshalto.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/gogo/protobuf/gogoproto", 16 | "//go/src/github.com/gogo/protobuf/proto", 17 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/descriptor", 18 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 19 | "//go/src/github.com/gogo/protobuf/vanity", 20 | ], 21 | ) 22 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/shared/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "shared", 8 | srcs = [ 9 | "context.go", 10 | "disabled.go", 11 | "enums.go", 12 | "functions.go", 13 | "reflection.go", 14 | "well_known.go", 15 | ], 16 | visibility = [ 17 | "//visibility:public", 18 | ], 19 | deps = [ 20 | "//go/src/github.com/envoyproxy/protoc-gen-validate/validate", 21 | "//go/src/github.com/lyft/protoc-gen-star/v2", 22 | "@org_golang_google_protobuf//proto", 23 | ], 24 | ) 25 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/install-protobuf.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | 5 | die() { 6 | echo "$@" >&2 7 | exit 1 8 | } 9 | 10 | cd ${HOME} 11 | 12 | case "$PROTOBUF_VERSION" in 13 | 2*) 14 | basename=protobuf-$PROTOBUF_VERSION 15 | wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/$basename.tar.gz 16 | tar xzf $basename.tar.gz 17 | cd protobuf-$PROTOBUF_VERSION 18 | ./configure --prefix=${HOME} && make -j2 && make install 19 | ;; 20 | 3*) 21 | basename=protoc-$PROTOBUF_VERSION-linux-x86_64 22 | wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/$basename.zip 23 | unzip $basename.zip 24 | ;; 25 | *) 26 | die "unknown protobuf version: $PROTOBUF_VERSION" 27 | ;; 28 | esac 29 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/conformance/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PROTOBUF_ROOT=$1 4 | CONFORMANCE_ROOT=$1/conformance 5 | CONFORMANCE_TEST_RUNNER=$CONFORMANCE_ROOT/conformance-test-runner 6 | 7 | cd $(dirname $0) 8 | 9 | if [[ $PROTOBUF_ROOT == "" ]]; then 10 | echo "usage: test.sh " >/dev/stderr 11 | exit 1 12 | fi 13 | 14 | if [[ ! -x $CONFORMANCE_TEST_RUNNER ]]; then 15 | echo "SKIP: conformance test runner not installed" >/dev/stderr 16 | exit 0 17 | fi 18 | 19 | a=$CONFORMANCE_ROOT/conformance.proto 20 | b=internal/conformance_proto/conformance.proto 21 | if [[ $(diff $a $b) != "" ]]; then 22 | cp $a $b 23 | echo "WARNING: conformance.proto is out of date" >/dev/stderr 24 | fi 25 | 26 | $CONFORMANCE_TEST_RUNNER --failure_list failure_list_go.txt ./conformance.sh 27 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/gen-build-go/BUILD.in: -------------------------------------------------------------------------------- 1 | load("//build_tools/go:go.bzl", "dbx_go_binary") 2 | load("@rules_pkg//:pkg.bzl", "pkg_tar") 3 | 4 | pkg_tar( 5 | name = "gen-build-go-pkg", 6 | srcs = [ 7 | ":gen-build-go", 8 | ], 9 | extension = "tar.gz", 10 | include_runfiles = True, 11 | strip_prefix = ".", 12 | ) 13 | 14 | exports_files( 15 | ["config.json"], 16 | visibility = ["//visibility:public"], 17 | ) 18 | 19 | filegroup( 20 | name = "srcs", 21 | data = glob( 22 | ["*.go"], 23 | exclude = ["*_test.go"], 24 | ) + [ 25 | "go.mod", 26 | "go.sum", 27 | "//go/src/dropbox/build_tools/gen-build-go/lib:srcs", 28 | ], 29 | visibility = ["//go/src/dropbox/build_tools/update-gen-build-go-srcs:__pkg__"], 30 | ) 31 | -------------------------------------------------------------------------------- /go/src/dropbox/runfiles/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library", "dbx_go_test") 5 | 6 | dbx_go_library( 7 | name = "runfiles", 8 | srcs = [ 9 | "runfiles.go", 10 | ], 11 | visibility = [ 12 | "//go/src/atlas:__subpackages__", 13 | "//go/src/dropbox:__subpackages__", 14 | "//go/src/github.com/dropbox:__subpackages__", 15 | ], 16 | deps = [ 17 | ], 18 | ) 19 | 20 | dbx_go_test( 21 | name = "runfiles_test", 22 | srcs = [ 23 | "runfiles.go", 24 | "runfiles_test.go", 25 | ], 26 | data = ["test_data.empty"] + glob(["data/**"]), 27 | deps = [ 28 | ], 29 | ) 30 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/gen-build-go/lib/embed_test.go: -------------------------------------------------------------------------------- 1 | package lib 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/require" 7 | ) 8 | 9 | func TestMarshalJSON_EmbedConfig(t *testing.T) { 10 | // Create an EmbedConfig struct with some test data 11 | ec := EmbedConfig{ 12 | Patterns: map[string][]string{ 13 | "foo": {"a", "b"}, 14 | "bar": {"c"}, 15 | }, 16 | Files: map[string]string{ 17 | "a": "full_path_a", 18 | "c": "full_path_c", 19 | "b": "full_path_b", 20 | }, 21 | } 22 | 23 | b, err := ec.MarshalJSON() 24 | require.NoError(t, err) 25 | // Check that the JSON content AND ordering is correct 26 | expected := `{"Patterns":{"bar":["c"],"foo":["a","b"]},"Files":{"a":"full_path_a","b":"full_path_b","c":"full_path_c"}}` 27 | require.Exactly(t, expected, string(b)) 28 | } 29 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/graph/services/services.proto: -------------------------------------------------------------------------------- 1 | syntax="proto3"; 2 | package graph.services; 3 | 4 | message BeforeRequest {} 5 | message BeforeResponse { 6 | int32 foo = 99; // comment 7 | } 8 | 9 | service Empty {} 10 | 11 | // unary only methods 12 | service Unary { 13 | // message come before 14 | rpc UnaryBefore(BeforeRequest) returns (BeforeResponse); 15 | 16 | // messages come after 17 | rpc UnaryAfter(AfterRequest) returns (AfterResponse); 18 | } 19 | 20 | service Streaming { 21 | rpc ClientStream(stream BeforeRequest) returns (BeforeResponse); 22 | rpc ServerStream(AfterRequest) returns (stream AfterResponse); 23 | rpc BiDiStream(stream BeforeRequest) returns (stream AfterResponse); 24 | } 25 | 26 | message AfterRequest {} 27 | message AfterResponse {} 28 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/plugin/description/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "description", 8 | srcs = [ 9 | "description.go", 10 | "descriptiontest.go", 11 | ], 12 | visibility = [ 13 | "//visibility:public", 14 | ], 15 | deps = [ 16 | "//go/src/github.com/gogo/protobuf/gogoproto", 17 | "//go/src/github.com/gogo/protobuf/plugin/testgen", 18 | "//go/src/github.com/gogo/protobuf/proto", 19 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/descriptor", 20 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 21 | ], 22 | ) 23 | -------------------------------------------------------------------------------- /dropbox/build_tools/echo_server/BUILD.in: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | load("//build_tools/services:svc.bzl", "dbx_service_daemon") 4 | 5 | dbx_py_binary( 6 | name = "echo_server", 7 | main = "echo_server.py", 8 | ) 9 | 10 | # this is used by a `bzl itest` tutorial 11 | dbx_py_binary( 12 | name = "echo_client", 13 | srcs = ["echo_client.py"], 14 | main = "echo_client.py", 15 | ) 16 | 17 | # this is used by a `bzl itest` tutorial 18 | dbx_service_daemon( 19 | name = "echo_service_1234", 20 | args = [ 21 | "--port", 22 | "1234", 23 | ], 24 | data = [ 25 | ":echo_client", 26 | ], 27 | exe = ":echo_server", 28 | owner = "devbox-team", 29 | verify_cmds = ["$RUNFILES/dropbox/build_tools/echo_server/echo_client --port 1234 'test'"], 30 | ) 31 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/source_code_info_test.go: -------------------------------------------------------------------------------- 1 | package pgs 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | "google.golang.org/protobuf/proto" 8 | descriptor "google.golang.org/protobuf/types/descriptorpb" 9 | ) 10 | 11 | func TestSourceCodeInfo(t *testing.T) { 12 | t.Parallel() 13 | 14 | desc := &descriptor.SourceCodeInfo_Location{ 15 | LeadingComments: proto.String("leading"), 16 | TrailingComments: proto.String("trailing"), 17 | LeadingDetachedComments: []string{"detached"}, 18 | } 19 | 20 | info := sci{desc} 21 | 22 | assert.Equal(t, desc, info.Location()) 23 | assert.Equal(t, "leading", info.LeadingComments()) 24 | assert.Equal(t, "trailing", info.TrailingComments()) 25 | assert.Equal(t, []string{"detached"}, info.LeadingDetachedComments()) 26 | } 27 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "generator", 8 | srcs = [ 9 | "generator.go", 10 | "helper.go", 11 | ], 12 | visibility = [ 13 | "//visibility:public", 14 | ], 15 | deps = [ 16 | "//go/src/github.com/gogo/protobuf/gogoproto", 17 | "//go/src/github.com/gogo/protobuf/proto", 18 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/descriptor", 19 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap", 20 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/plugin", 21 | ], 22 | ) 23 | -------------------------------------------------------------------------------- /go/src/dropbox/proto/build_tools/svclib/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "svclib", 8 | srcs = [ 9 | "service.pb.go", 10 | "service_grpc.pb.go", 11 | ], 12 | visibility = [ 13 | "//go/src/atlas:__subpackages__", 14 | "//go/src/dropbox:__subpackages__", 15 | ], 16 | deps = [ 17 | "@com_github_golang_protobuf//proto", 18 | "@org_golang_google_grpc", 19 | "@org_golang_google_grpc//codes", 20 | "@org_golang_google_grpc//status", 21 | "@org_golang_google_protobuf//reflect/protoreflect", 22 | "@org_golang_google_protobuf//runtime/protoimpl", 23 | ], 24 | ) 25 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/plugin/size/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "size", 8 | srcs = [ 9 | "size.go", 10 | "sizetest.go", 11 | ], 12 | visibility = [ 13 | "//visibility:public", 14 | ], 15 | deps = [ 16 | "//go/src/github.com/gogo/protobuf/gogoproto", 17 | "//go/src/github.com/gogo/protobuf/plugin/testgen", 18 | "//go/src/github.com/gogo/protobuf/proto", 19 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/descriptor", 20 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 21 | "//go/src/github.com/gogo/protobuf/vanity", 22 | ], 23 | ) 24 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/plugin/equal/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "equal", 8 | srcs = [ 9 | "equal.go", 10 | "equaltest.go", 11 | ], 12 | visibility = [ 13 | "//visibility:public", 14 | ], 15 | deps = [ 16 | "//go/src/github.com/gogo/protobuf/gogoproto", 17 | "//go/src/github.com/gogo/protobuf/plugin/testgen", 18 | "//go/src/github.com/gogo/protobuf/proto", 19 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/descriptor", 20 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 21 | "//go/src/github.com/gogo/protobuf/vanity", 22 | ], 23 | ) 24 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/svcctl/svclib/healthchecks.go: -------------------------------------------------------------------------------- 1 | package svclib 2 | 3 | import ( 4 | "strconv" 5 | 6 | svclib_proto "dropbox/proto/build_tools/svclib" 7 | ) 8 | 9 | func CmdHealthCheck(cmd string) *svclib_proto.HealthCheck { 10 | checkType := svclib_proto.HealthCheck_COMMAND 11 | return &svclib_proto.HealthCheck{ 12 | Type: &checkType, 13 | Cmd: &svclib_proto.Command{ 14 | Cmd: &cmd, 15 | }, 16 | } 17 | } 18 | 19 | func HttpHealthCheck(addr string) *svclib_proto.HealthCheck { 20 | checkType := svclib_proto.HealthCheck_HTTP 21 | return &svclib_proto.HealthCheck{ 22 | Type: &checkType, 23 | HttpHealthCheck: &svclib_proto.HttpHealthCheck{ 24 | Url: &addr, 25 | }, 26 | } 27 | } 28 | 29 | func HttpPortHealthCheck(port int) *svclib_proto.HealthCheck { 30 | return HttpHealthCheck("http://localhost:" + strconv.Itoa(port) + "/dbz/health") 31 | } 32 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/plugin/compare/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "compare", 8 | srcs = [ 9 | "compare.go", 10 | "comparetest.go", 11 | ], 12 | visibility = [ 13 | "//visibility:public", 14 | ], 15 | deps = [ 16 | "//go/src/github.com/gogo/protobuf/gogoproto", 17 | "//go/src/github.com/gogo/protobuf/plugin/testgen", 18 | "//go/src/github.com/gogo/protobuf/proto", 19 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/descriptor", 20 | "//go/src/github.com/gogo/protobuf/protoc-gen-gogo/generator", 21 | "//go/src/github.com/gogo/protobuf/vanity", 22 | ], 23 | ) 24 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/codegen/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library", "dbx_go_test") 5 | 6 | dbx_go_library( 7 | name = "codegen", 8 | srcs = [ 9 | "go_writer.go", 10 | "line_writer.go", 11 | "py_writer.go", 12 | ], 13 | visibility = [ 14 | "//go/src/atlas:__subpackages__", 15 | "//go/src/dropbox:__subpackages__", 16 | ], 17 | deps = [ 18 | ], 19 | ) 20 | 21 | dbx_go_test( 22 | name = "codegen_test", 23 | srcs = [ 24 | "go_writer.go", 25 | "line_writer.go", 26 | "line_writer_test.go", 27 | "py_writer.go", 28 | ], 29 | deps = [ 30 | "@com_github_stretchr_testify//assert", 31 | ], 32 | ) 33 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/.github/workflows/maven-build.yaml: -------------------------------------------------------------------------------- 1 | # This workflow will build a package using Maven and then publish it to GitHub packages when a release is created 2 | ## For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path 3 | 4 | name: Maven Verify 5 | 6 | on: 7 | pull_request: 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | permissions: 13 | contents: read 14 | 15 | steps: 16 | - uses: actions/checkout@v3 17 | - name: Set up JDK 17 18 | uses: actions/setup-java@v3 19 | with: 20 | java-version: "17" 21 | distribution: "temurin" 22 | cache: "maven" 23 | - name: Verify with Maven 24 | working-directory: ${{ github.workspace }}/java 25 | run: mvn -B verify 26 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/shared/disabled.go: -------------------------------------------------------------------------------- 1 | package shared 2 | 3 | import ( 4 | "github.com/envoyproxy/protoc-gen-validate/validate" 5 | pgs "github.com/lyft/protoc-gen-star/v2" 6 | ) 7 | 8 | // Disabled returns true if validations are disabled for msg 9 | func Disabled(msg pgs.Message) (disabled bool, err error) { 10 | _, err = msg.Extension(validate.E_Disabled, &disabled) 11 | return 12 | } 13 | 14 | // Ignore returns true if validations aren't to be generated for msg 15 | func Ignored(msg pgs.Message) (ignored bool, err error) { 16 | _, err = msg.Extension(validate.E_Ignored, &ignored) 17 | return 18 | } 19 | 20 | // RequiredOneOf returns true if the oneof field requires a field to be set 21 | func RequiredOneOf(oo pgs.OneOf) (required bool, err error) { 22 | _, err = oo.Extension(validate.E_Required, &required) 23 | return 24 | } 25 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 30 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - Bug 8 | - Bazel 9 | - Documentation 10 | - Enhancement 11 | - Help Wanted 12 | - Language Support 13 | # Label to use when marking an issue as stale 14 | staleLabel: Stale 15 | # Comment to post when marking an issue as stale. Set to `false` to disable 16 | markComment: > 17 | This issue has been automatically marked as stale because it has not had 18 | recent activity. It will be closed if no further activity occurs. Thank you 19 | for your contributions. 20 | # Comment to post when closing a stale issue. Set to `false` to disable 21 | closeComment: false -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/gofmt.go: -------------------------------------------------------------------------------- 1 | package pgsgo 2 | 3 | import ( 4 | "go/format" 5 | "strings" 6 | 7 | pgs "github.com/lyft/protoc-gen-star/v2" 8 | ) 9 | 10 | type goFmt struct{} 11 | 12 | // GoFmt returns a PostProcessor that runs gofmt on any files ending in ".go" 13 | func GoFmt() pgs.PostProcessor { return goFmt{} } 14 | 15 | func (p goFmt) Match(a pgs.Artifact) bool { 16 | var n string 17 | 18 | switch a := a.(type) { 19 | case pgs.GeneratorFile: 20 | n = a.Name 21 | case pgs.GeneratorTemplateFile: 22 | n = a.Name 23 | case pgs.CustomFile: 24 | n = a.Name 25 | case pgs.CustomTemplateFile: 26 | n = a.Name 27 | default: 28 | return false 29 | } 30 | 31 | return strings.HasSuffix(n, ".go") 32 | } 33 | 34 | func (p goFmt) Process(in []byte) ([]byte, error) { return format.Source(in) } 35 | 36 | var _ pgs.PostProcessor = goFmt{} 37 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/goshared/in.go: -------------------------------------------------------------------------------- 1 | package goshared 2 | 3 | const inTpl = `{{ $f := .Field }}{{ $r := .Rules }} 4 | {{ if $r.In }} 5 | if _, ok := {{ lookup $f "InLookup" }}[{{ accessor . }}]; !ok { 6 | {{- if isEnum $f }} 7 | err := {{ err . "value must be in list " (enumList $f $r.In) }} 8 | {{- else }} 9 | err := {{ err . "value must be in list " $r.In }} 10 | {{- end }} 11 | if !all { return err } 12 | errors = append(errors, err) 13 | } 14 | {{ else if $r.NotIn }} 15 | if _, ok := {{ lookup $f "NotInLookup" }}[{{ accessor . }}]; ok { 16 | {{- if isEnum $f }} 17 | err := {{ err . "value must not be in list " (enumList $f $r.NotIn) }} 18 | {{- else }} 19 | err := {{ err . "value must not be in list " $r.NotIn }} 20 | {{- end }} 21 | if !all { return err } 22 | errors = append(errors, err) 23 | } 24 | {{ end }} 25 | ` 26 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/cc/in.go: -------------------------------------------------------------------------------- 1 | package cc 2 | 3 | const inTpl = `{{ $f := .Field -}}{{ $r := .Rules -}} 4 | {{- if $r.In }} 5 | if ({{ lookup $f "InLookup" }}.find(static_cast({{ accessor . }})) == {{ lookup $f "InLookup" }}.end()) { 6 | {{- if isEnum $f }} 7 | {{ err . "value must be in list " (enumList $f $r.In) }} 8 | {{- else }} 9 | {{ err . "value must be in list " $r.In }} 10 | {{- end }} 11 | } 12 | {{- else if $r.NotIn }} 13 | if ({{ lookup $f "NotInLookup" }}.find(static_cast({{ accessor . }})) != {{ lookup $f "NotInLookup" }}.end()) { 14 | {{- if isEnum $f }} 15 | {{ err . "value must not be in list " (enumList $f $r.NotIn) }} 16 | {{- else }} 17 | {{ err . "value must not be in list " $r.NotIn }} 18 | {{- end }} 19 | } 20 | {{- end }} 21 | ` 22 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/svcctl/svclib/constants.go: -------------------------------------------------------------------------------- 1 | package svclib 2 | 3 | import ( 4 | "os" 5 | "path/filepath" 6 | ) 7 | 8 | func mustTmpdirPath(path string) string { 9 | tmp := os.Getenv("TEST_TMPDIR") 10 | if tmp == "" { 11 | panic("TEST_TMPDIR not set. Service tests must be run with |bazel test| or |bzl itest-run|. See https://dbx.link/bazel/bzl_itest_manual for more information on running service tests.") 12 | } 13 | return filepath.Join(tmp, path) 14 | } 15 | 16 | var SvcdPortLocation = mustTmpdirPath("svcd-port") 17 | 18 | // These next two variables are used to keep track of stale service definitions 19 | 20 | // path to the current version file of the service definitions 21 | var CurrentServiceDefsVersionFile = mustTmpdirPath("current-svc-defs-version") 22 | 23 | // path to a version file frozen at the time of service startup 24 | var FrozenServiceDefsVersionFile = mustTmpdirPath("frozen-svc-defs-version") 25 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/validate/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "validate", 8 | srcs = [ 9 | "validate.pb.go", 10 | ], 11 | cgo_srcs = [ 12 | "validate.h", 13 | ], 14 | visibility = [ 15 | "//visibility:public", 16 | ], 17 | deps = [ 18 | "@org_golang_google_protobuf//reflect/protoreflect", 19 | "@org_golang_google_protobuf//runtime/protoimpl", 20 | "@org_golang_google_protobuf//types/descriptorpb", 21 | "@org_golang_google_protobuf//types/known/durationpb", 22 | "@org_golang_google_protobuf//types/known/timestamppb", 23 | ], 24 | ) 25 | 26 | exports_files([ 27 | "validate.h", 28 | "validate.proto", 29 | ]) 30 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/svcctl/cmd/svcinit/failing_junit_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io/ioutil" 5 | "testing" 6 | 7 | "github.com/stretchr/testify/require" 8 | ) 9 | 10 | func TestIsFailingJunit(t *testing.T) { 11 | runTest := func(t *testing.T, xml string, expectHasFail bool) { 12 | tempf, err := ioutil.TempFile("", "*.xml") 13 | require.NoError(t, err) 14 | tempf.WriteString(xml) 15 | tempf.Close() 16 | 17 | res, err := isFailingJUnit(tempf.Name()) 18 | require.NoError(t, err) 19 | require.Equal(t, res, expectHasFail) 20 | } 21 | 22 | runTest(t, "", true) 23 | runTest(t, "", false) 24 | 25 | runTest(t, "", true) 26 | runTest(t, "", false) 27 | } 28 | -------------------------------------------------------------------------------- /go/src/github.com/prometheus/client_model/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Prometheus Team 2 | # Licensed under the Apache License, Version 2.0 (the "License"); 3 | # you may not use this file except in compliance with the License. 4 | # You may obtain a copy of the License at 5 | 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, 10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | # See the License for the specific language governing permissions and 12 | # limitations under the License. 13 | 14 | KEY_ID ?= _DEFINE_ME_ 15 | 16 | all: go 17 | 18 | SUFFIXES: 19 | 20 | go: go/metrics.pb.go 21 | 22 | go/metrics.pb.go: metrics.proto 23 | protoc $< --go_out=import_path=github.com/prometheus/client_model/,paths=source_relative:go/ 24 | 25 | clean: 26 | -rm -rf go/* 27 | 28 | .PHONY: all clean go 29 | -------------------------------------------------------------------------------- /WORKSPACE: -------------------------------------------------------------------------------- 1 | workspace(name="dbx_build_tools") 2 | 3 | # Add external dependencies in //build_tools/bazel:external_workspace.bzl. 4 | load("//build_tools/bazel:external_workspace.bzl", "drte_deps") 5 | 6 | drte_deps() 7 | 8 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 9 | 10 | http_archive( 11 | name = "io_bazel_rules_go", 12 | sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3", 13 | urls = [ 14 | "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", 15 | "https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", 16 | ], 17 | ) 18 | 19 | load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") 20 | 21 | go_rules_dependencies() 22 | 23 | go_register_toolchains(version = "1.20.7") 24 | 25 | register_toolchains( 26 | "//thirdparty/cpython:drte-off-39-toolchain", 27 | ) 28 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Anton Povarov 2 | Brian Goff 3 | Clayton Coleman 4 | Denis Smirnov 5 | DongYun Kang 6 | Dwayne Schultz 7 | Georg Apitz 8 | Gustav Paul 9 | Johan Brandhorst 10 | John Shahid 11 | John Tuley 12 | Laurent 13 | Patrick Lee 14 | Peter Edge 15 | Roger Johansson 16 | Sam Nguyen 17 | Sergio Arbeo 18 | Stephen J Day 19 | Tamir Duberstein 20 | Todd Eisenberger 21 | Tormod Erevik Lea 22 | Vyacheslav Kim 23 | Walter Schulze 24 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "templates", 8 | srcs = [ 9 | "pkg.go", 10 | ], 11 | visibility = [ 12 | "//visibility:public", 13 | ], 14 | deps = [ 15 | "//go/src/github.com/envoyproxy/protoc-gen-validate/templates/cc", 16 | "//go/src/github.com/envoyproxy/protoc-gen-validate/templates/ccnop", 17 | "//go/src/github.com/envoyproxy/protoc-gen-validate/templates/go", 18 | "//go/src/github.com/envoyproxy/protoc-gen-validate/templates/java", 19 | "//go/src/github.com/envoyproxy/protoc-gen-validate/templates/shared", 20 | "//go/src/github.com/lyft/protoc-gen-star/v2", 21 | "//go/src/github.com/lyft/protoc-gen-star/v2/lang/go", 22 | ], 23 | ) 24 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/java/repeated.go: -------------------------------------------------------------------------------- 1 | package java 2 | 3 | const repeatedConstTpl = `{{ renderConstants (.Elem "" "") }}` 4 | 5 | const repeatedTpl = `{{ $f := .Field }}{{ $r := .Rules -}} 6 | {{- if $r.GetIgnoreEmpty }} 7 | if ( !{{ accessor . }}.isEmpty() ) { 8 | {{- end -}} 9 | {{- if $r.GetMinItems }} 10 | io.envoyproxy.pgv.RepeatedValidation.minItems("{{ $f.FullyQualifiedName }}", {{ accessor . }}, {{ $r.GetMinItems }}); 11 | {{- end -}} 12 | {{- if $r.GetMaxItems }} 13 | io.envoyproxy.pgv.RepeatedValidation.maxItems("{{ $f.FullyQualifiedName }}", {{ accessor . }}, {{ $r.GetMaxItems }}); 14 | {{- end -}} 15 | {{- if $r.GetUnique }} 16 | io.envoyproxy.pgv.RepeatedValidation.unique("{{ $f.FullyQualifiedName }}", {{ accessor . }}); 17 | {{- end }} 18 | io.envoyproxy.pgv.RepeatedValidation.forEach({{ accessor . }}, item -> { 19 | {{ render (.Elem "item" "") }} 20 | }); 21 | {{- if $r.GetIgnoreEmpty }} 22 | } 23 | {{- end -}} 24 | ` 25 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/lang/go/goimports.go: -------------------------------------------------------------------------------- 1 | package pgsgo 2 | 3 | import ( 4 | "strings" 5 | 6 | "golang.org/x/tools/imports" 7 | 8 | pgs "github.com/lyft/protoc-gen-star/v2" 9 | ) 10 | 11 | type goImports struct{} 12 | 13 | // GoImports returns a PostProcessor that run goimports on any files ending . ".go" 14 | func GoImports() pgs.PostProcessor { return goImports{} } 15 | 16 | func (g goImports) Match(a pgs.Artifact) bool { 17 | var n string 18 | 19 | switch a := a.(type) { 20 | case pgs.GeneratorFile: 21 | n = a.Name 22 | case pgs.GeneratorTemplateFile: 23 | n = a.Name 24 | case pgs.CustomFile: 25 | n = a.Name 26 | case pgs.CustomTemplateFile: 27 | n = a.Name 28 | default: 29 | return false 30 | } 31 | 32 | return strings.HasSuffix(n, ".go") 33 | } 34 | 35 | func (g goImports) Process(in []byte) ([]byte, error) { 36 | // We do not want to give a filename here, ever. 37 | return imports.Process("", in, nil) 38 | } 39 | 40 | var _ pgs.PostProcessor = goImports{} 41 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/module/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "module", 8 | srcs = [ 9 | "checker.go", 10 | "validate.go", 11 | ], 12 | visibility = [ 13 | "//visibility:public", 14 | ], 15 | deps = [ 16 | "//go/src/github.com/envoyproxy/protoc-gen-validate/templates", 17 | "//go/src/github.com/envoyproxy/protoc-gen-validate/templates/java", 18 | "//go/src/github.com/envoyproxy/protoc-gen-validate/validate", 19 | "//go/src/github.com/lyft/protoc-gen-star/v2", 20 | "//go/src/github.com/lyft/protoc-gen-star/v2/lang/go", 21 | "@org_golang_google_protobuf//proto", 22 | "@org_golang_google_protobuf//types/known/durationpb", 23 | "@org_golang_google_protobuf//types/known/timestamppb", 24 | ], 25 | ) 26 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/java/any.go: -------------------------------------------------------------------------------- 1 | package java 2 | 3 | const anyConstTpl = `{{ $f := .Field }}{{ $r := .Rules }} 4 | {{- if $r.In }} 5 | private final String[] {{ constantName . "In" }} = new String[]{ 6 | {{- range $r.In }} 7 | "{{ . }}", 8 | {{- end }} 9 | }; 10 | {{- end -}} 11 | {{- if $r.NotIn }} 12 | private final String[] {{ constantName . "NotIn" }} = new String[]{ 13 | {{- range $r.NotIn }} 14 | "{{ . }}", 15 | {{- end }} 16 | }; 17 | {{- end -}}` 18 | 19 | const anyTpl = `{{ $f := .Field }}{{ $r := .Rules }} 20 | {{- template "required" . -}} 21 | 22 | {{- if $r.In }} 23 | if ({{ hasAccessor . }}) io.envoyproxy.pgv.CollectiveValidation.in("{{ $f.FullyQualifiedName }}", {{ accessor . }}.getTypeUrl(), {{ constantName . "In" }}); 24 | {{- end -}} 25 | {{- if $r.NotIn }} 26 | if ({{ hasAccessor . }}) io.envoyproxy.pgv.CollectiveValidation.notIn("{{ $f.FullyQualifiedName }}", {{ accessor . }}.getTypeUrl(), {{ constantName . "NotIn" }}); 27 | {{- end -}} 28 | ` 29 | -------------------------------------------------------------------------------- /go/src/dropbox/devtools/gomodlib/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library", "dbx_go_test") 5 | 6 | dbx_go_library( 7 | name = "gomodlib", 8 | srcs = [ 9 | "module.go", 10 | ], 11 | visibility = [ 12 | "//go/src/atlas:__subpackages__", 13 | "//go/src/dropbox:__subpackages__", 14 | ], 15 | deps = [ 16 | "@org_golang_x_mod//modfile", 17 | "@org_golang_x_mod//module", 18 | ], 19 | ) 20 | 21 | dbx_go_test( 22 | name = "gomodlib_test", 23 | srcs = [ 24 | "module.go", 25 | "module_test.go", 26 | ], 27 | data = [ 28 | "//go/src/dropbox/devtools/gomodlib/fixtures:go.mod", 29 | ], 30 | deps = [ 31 | "//go/src/dropbox/runfiles", 32 | "@com_github_stretchr_testify//require", 33 | "@org_golang_x_mod//modfile", 34 | "@org_golang_x_mod//module", 35 | ], 36 | ) 37 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_test.go: -------------------------------------------------------------------------------- 1 | package descriptor_test 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | 7 | tpb "github.com/gogo/protobuf/proto/test_proto" 8 | "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" 9 | ) 10 | 11 | func TestMessage(t *testing.T) { 12 | var msg *descriptor.DescriptorProto 13 | fd, md := descriptor.ForMessage(msg) 14 | if pkg, want := fd.GetPackage(), "google.protobuf"; pkg != want { 15 | t.Errorf("descriptor.ForMessage(%T).GetPackage() = %q; want %q", msg, pkg, want) 16 | } 17 | if name, want := md.GetName(), "DescriptorProto"; name != want { 18 | t.Fatalf("descriptor.ForMessage(%T).GetName() = %q; want %q", msg, name, want) 19 | } 20 | } 21 | 22 | func Example_options() { 23 | var msg *tpb.MyMessageSet 24 | _, md := descriptor.ForMessage(msg) 25 | if md.GetOptions().GetMessageSetWireFormat() { 26 | fmt.Printf("%v uses option message_set_wire_format.\n", md.GetName()) 27 | } 28 | 29 | // Output: 30 | // MyMessageSet uses option message_set_wire_format. 31 | } 32 | -------------------------------------------------------------------------------- /go/src/github.com/gogo/protobuf/types/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "types", 8 | srcs = [ 9 | "any.go", 10 | "any.pb.go", 11 | "api.pb.go", 12 | "doc.go", 13 | "duration.go", 14 | "duration.pb.go", 15 | "duration_gogo.go", 16 | "empty.pb.go", 17 | "field_mask.pb.go", 18 | "protosize.go", 19 | "source_context.pb.go", 20 | "struct.pb.go", 21 | "timestamp.go", 22 | "timestamp.pb.go", 23 | "timestamp_gogo.go", 24 | "type.pb.go", 25 | "wrappers.pb.go", 26 | "wrappers_gogo.go", 27 | ], 28 | visibility = [ 29 | "//visibility:public", 30 | ], 31 | deps = [ 32 | "//go/src/github.com/gogo/protobuf/proto", 33 | "//go/src/github.com/gogo/protobuf/sortkeys", 34 | ], 35 | ) 36 | -------------------------------------------------------------------------------- /dropbox/build_tools/echo_server/echo_server.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | import argparse 4 | import socketserver 5 | import sys 6 | 7 | 8 | class EchoHandler(socketserver.StreamRequestHandler): 9 | def handle(self) -> None: 10 | ip, port = self.client_address 11 | data = self.request.makefile().read() 12 | print("Client {}:{} sent: {!r}".format(ip, port, data)) 13 | sys.stdout.flush() 14 | response = "You sent this from {}:{} - {!r}\n".format(ip, port, data) 15 | self.request.sendall(response.encode("utf-8")) 16 | 17 | 18 | def main() -> None: 19 | ap = argparse.ArgumentParser("echo_server") 20 | ap.add_argument("--port", required=True, type=int, help="Port to listen on") 21 | args = ap.parse_args() 22 | 23 | server = socketserver.TCPServer(("0.0.0.0", args.port), EchoHandler, False) 24 | server.allow_reuse_address = True 25 | server.server_bind() 26 | server.server_activate() 27 | server.serve_forever() 28 | 29 | 30 | if __name__ == "__main__": 31 | main() 32 | -------------------------------------------------------------------------------- /dropbox/build_tools/echo_server/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | package(default_visibility = ["//visibility:public"]) 5 | 6 | load("//build_tools/py:py.bzl", "dbx_py_binary") 7 | load("//build_tools/services:svc.bzl", "dbx_service_daemon") 8 | 9 | dbx_py_binary( 10 | name = "echo_server", 11 | srcs = ["echo_server.py"], 12 | main = "echo_server.py", 13 | ) 14 | 15 | # this is used by a `bzl itest` tutorial 16 | dbx_py_binary( 17 | name = "echo_client", 18 | srcs = ["echo_client.py"], 19 | main = "echo_client.py", 20 | ) 21 | 22 | # this is used by a `bzl itest` tutorial 23 | dbx_service_daemon( 24 | name = "echo_service_1234", 25 | args = [ 26 | "--port", 27 | "1234", 28 | ], 29 | data = [ 30 | ":echo_client", 31 | ], 32 | exe = ":echo_server", 33 | owner = "devbox-team", 34 | verify_cmds = ["$RUNFILES/dropbox/build_tools/echo_server/echo_client --port 1234 'test'"], 35 | ) 36 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/.github/workflows/goreleaser.yaml: -------------------------------------------------------------------------------- 1 | # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json 2 | name: goreleaser 3 | 4 | on: 5 | push: 6 | tags: 7 | - 'v[0-9]+.[0-9]+.[0-9]+' 8 | 9 | permissions: 10 | contents: write 11 | 12 | jobs: 13 | goreleaser: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v3 17 | with: 18 | fetch-depth: 0 19 | - run: git fetch --force --tags 20 | - uses: actions/setup-go@v3 21 | with: 22 | go-version: 1.19.x 23 | use-latest: true 24 | cache: true 25 | - uses: goreleaser/goreleaser-action@v2 26 | with: 27 | distribution: goreleaser 28 | version: latest 29 | args: release --rm-dist 30 | env: 31 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 32 | - name: Upload assets 33 | uses: actions/upload-artifact@v3 34 | with: 35 | name: protoc-gen-validate 36 | path: dist/* 37 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/ccnop/file.go: -------------------------------------------------------------------------------- 1 | package ccnop 2 | 3 | const headerFileTpl = `// Code generated by protoc-gen-validate 4 | // source: {{ .InputPath }} 5 | // DO NOT EDIT!!! 6 | 7 | #pragma once 8 | 9 | #include 10 | 11 | #include "validate/validate.h" 12 | #include "{{ output .File ".h" }}" 13 | 14 | {{ range .Package.ProtoName.Split }} 15 | namespace {{ . }} { 16 | {{- end }} 17 | 18 | using std::string; 19 | 20 | {{ range .AllMessages }} 21 | extern inline bool Validate(__attribute__((unused)) const {{ class . }}& m, __attribute__((unused)) pgv::ValidationMsg* err) { return true; } 22 | {{ end }} 23 | 24 | {{ range .Package.ProtoName.Split -}} 25 | } // namespace 26 | {{ end }} 27 | 28 | {{ range .AllMessages -}} 29 | {{- if not (ignored .) -}} 30 | {{ end -}} 31 | {{ end }} 32 | ` 33 | 34 | const moduleFileTpl = `// Code generated by protoc-gen-validate 35 | // source: {{ .InputPath }} 36 | // DO NOT EDIT!!! 37 | 38 | namespace pgv { 39 | namespace validate { 40 | 41 | } // namespace validate 42 | } // namespace pgv 43 | ` 44 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/.github/workflows/python-package.yaml: -------------------------------------------------------------------------------- 1 | name: Release Python Package 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'v[0-9]+.[0-9]+.[0-9]+' 7 | 8 | env: 9 | IMAGE_TAG: protoc-gen-validate:${{ github.sha }} 10 | REF_NAME: ${{ github.ref_name }} 11 | 12 | jobs: 13 | deploy: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v3 18 | - name: Set up QEMU 19 | uses: docker/setup-qemu-action@v2 20 | - name: Set up Docker Buildx 21 | uses: docker/setup-buildx-action@v2 22 | - name: Build and export to Docker 23 | uses: docker/build-push-action@v3 24 | with: 25 | context: . 26 | load: true 27 | push: false 28 | tags: ${{ env.IMAGE_TAG }} 29 | - run: | 30 | docker run --rm \ 31 | --env PYPI_REPO=pypi \ 32 | --env PGV_PYPI_TOKEN="${{ secrets.PGV_PYPI_TOKEN }}" \ 33 | ${{ env.IMAGE_TAG }} SETUPTOOLS_SCM_PRETEND_VERSION=${{ env.REF_NAME }} python-release 34 | -------------------------------------------------------------------------------- /go/src/github.com/stretchr/testify/dbx-patches/bazel.patch: -------------------------------------------------------------------------------- 1 | diff -ruN 1/assert/BUILD.in 2/assert/BUILD.in 2 | --- 1/assert/BUILD.in 1970-01-01 00:00:00.000000000 +0000 3 | +++ 2/assert/BUILD.in 2022-05-23 20:00:56.240625150 +0000 4 | @@ -0,0 +1,3 @@ 5 | +dbx_go_library( 6 | + name = "assert", 7 | +) 8 | diff -ruN 1/mock/BUILD.in 2/mock/BUILD.in 9 | --- 1/mock/BUILD.in 1970-01-01 00:00:00.000000000 +0000 10 | +++ 2/mock/BUILD.in 2022-05-23 20:00:56.312625824 +0000 11 | @@ -0,0 +1,4 @@ 12 | +dbx_go_library( 13 | + name = "mock", 14 | + testonly = True, 15 | +) 16 | diff -ruN 1/require/BUILD.in 2/require/BUILD.in 17 | --- 1/require/BUILD.in 1970-01-01 00:00:00.000000000 +0000 18 | +++ 2/require/BUILD.in 2022-05-23 20:00:56.328625973 +0000 19 | @@ -0,0 +1,3 @@ 20 | +dbx_go_library( 21 | + name = "require", 22 | +) 23 | diff -ruN 1/suite/BUILD.in 2/suite/BUILD.in 24 | --- 1/suite/BUILD.in 1970-01-01 00:00:00.000000000 +0000 25 | +++ 2/suite/BUILD.in 2022-05-23 20:00:56.364626310 +0000 26 | @@ -0,0 +1,4 @@ 27 | +dbx_go_library( 28 | + name = "suite", 29 | + testonly = True, 30 | +) 31 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/svcctl/topological_stopper.go: -------------------------------------------------------------------------------- 1 | package svcctl 2 | 3 | import ( 4 | "time" 5 | 6 | "dropbox/build_tools/svcctl/topological" 7 | ) 8 | 9 | type stopTask struct { 10 | svc *serviceDef 11 | } 12 | 13 | func (st *stopTask) Key() string { 14 | return st.svc.name 15 | } 16 | 17 | func (st *stopTask) Run() error { 18 | return st.svc.Stop() 19 | } 20 | 21 | func (st *stopTask) Dependents() []topological.Task { 22 | allTasks := make([]topological.Task, 0, len(st.svc.Dependents)) 23 | for _, svc := range st.svc.Dependents { 24 | allTasks = append(allTasks, &stopTask{svc: svc}) 25 | } 26 | return allTasks 27 | } 28 | 29 | func (st *stopTask) Duration() time.Duration { 30 | return st.svc.StopDuration() 31 | } 32 | 33 | func (st *stopTask) StartTime() time.Time { 34 | return st.svc.StopTime() 35 | } 36 | 37 | func newTopologicalStopper(svcs []*serviceDef) topological.Runner { 38 | allTasks := make([]topological.Task, 0, len(svcs)) 39 | for _, svc := range svcs { 40 | allTasks = append(allTasks, &stopTask{svc: svc}) 41 | } 42 | return topological.NewReversedRunner(allTasks) 43 | } 44 | -------------------------------------------------------------------------------- /thirdparty/zlib/BUILD.zlib: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "z", 3 | srcs = [ 4 | "adler32.c", 5 | "compress.c", 6 | "crc32.c", 7 | "crc32.h", 8 | "deflate.c", 9 | "deflate.h", 10 | "gzclose.c", 11 | "gzguts.h", 12 | "gzlib.c", 13 | "gzread.c", 14 | "gzwrite.c", 15 | "infback.c", 16 | "inffast.c", 17 | "inffast.h", 18 | "inffixed.h", 19 | "inflate.c", 20 | "inflate.h", 21 | "inftrees.c", 22 | "inftrees.h", 23 | "trees.c", 24 | "trees.h", 25 | "uncompr.c", 26 | "zutil.c", 27 | "zutil.h", 28 | ], 29 | hdrs = [ 30 | "zconf.h", 31 | "zlib.h", 32 | ], 33 | copts = [ 34 | "-DZ_HAVE_UNISTD_H", 35 | "-DZ_HAVE_STDARG_H", 36 | ], 37 | includes = ["."], 38 | visibility = ["//visibility:private"], 39 | ) 40 | 41 | alias( 42 | name = "zlib", 43 | actual = ":z", 44 | visibility = ["//visibility:public"], 45 | ) 46 | 47 | # Required by tensorflow. 48 | exports_files(["zlib.h"]) 49 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/gen-build-go/lib/godep.go: -------------------------------------------------------------------------------- 1 | package lib 2 | 3 | import ( 4 | "encoding/json" 5 | "io" 6 | "os" 7 | ) 8 | 9 | const ( 10 | GoDepDefJsonPath = "build_tools/go/dbx/dbx_go_dependencies.json" 11 | ) 12 | 13 | type DbxGoDependency struct { 14 | Importpath string `json:"importpath"` 15 | Name string `json:"name"` 16 | Version string `json:"version"` 17 | Sum string `json:"sum"` 18 | Commit string `json:"commit"` 19 | Url string `json:"url"` 20 | Sha256 string `json:"sha256"` 21 | Patches []string `json:"patches,omitempty"` 22 | PackageSource string `json:"packagesource,omitempty"` 23 | } 24 | 25 | func LoadGoDepDefJson(depDefPath string) ([]DbxGoDependency, error) { 26 | jsonFile, err := os.Open(depDefPath) 27 | if err != nil { 28 | return nil, err 29 | } 30 | depDefJsonByteValue, _ := io.ReadAll(jsonFile) 31 | 32 | var dbxGoDependencies []DbxGoDependency 33 | err = json.Unmarshal(depDefJsonByteValue, &dbxGoDependencies) 34 | if err != nil { 35 | return nil, err 36 | } 37 | return dbxGoDependencies, nil 38 | } 39 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/testdata/graph/info/info.proto: -------------------------------------------------------------------------------- 1 | // syntax 2 | syntax="proto3"; 3 | 4 | // package 5 | package graph.info; 6 | 7 | // root message 8 | message Info { 9 | // before message 10 | message Before {} 11 | 12 | // before enum 13 | enum BeforeEnum { 14 | // before enum value 15 | BEFORE = 0; 16 | } 17 | 18 | // field 19 | map field = 1; 20 | 21 | // middle message 22 | message Middle { 23 | // inner field 24 | bool inner = 1; 25 | } 26 | 27 | // other field 28 | repeated int32 other_field = 2; 29 | 30 | // after message 31 | message After {} 32 | 33 | // after enum 34 | enum AfterEnum { 35 | // after enum value 36 | AFTER = 0; 37 | } 38 | 39 | // oneof 40 | oneof OneOf { 41 | // oneof field 42 | After oneof_field = 3; 43 | } 44 | } 45 | 46 | // root enum comment 47 | enum Enum { 48 | // root enum value 49 | ROOT = 0; 50 | } 51 | 52 | // service 53 | service Service { 54 | // method 55 | rpc Method(Info) returns (Info); 56 | } 57 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/update-gen-build-go-srcs/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary", "dbx_go_test") 5 | 6 | dbx_go_binary( 7 | name = "update-gen-build-go-srcs", 8 | srcs = [ 9 | "main.go", 10 | ], 11 | data = [ 12 | "//go/src/dropbox/build_tools/gen-build-go:srcs", 13 | ], 14 | visibility = [ 15 | "//visibility:public", 16 | ], 17 | deps = [ 18 | "//go/src/dropbox/runfiles", 19 | "@com_github_bazelbuild_buildtools//wspace", 20 | ], 21 | ) 22 | 23 | dbx_go_test( 24 | name = "update-gen-build-go-srcs_test", 25 | srcs = [ 26 | "main.go", 27 | "main_test.go", 28 | ], 29 | data = [ 30 | "//build_tools/go:dbx_go_gen_build_srcs.bzl", 31 | "//go/src/dropbox/build_tools/gen-build-go:srcs", 32 | ], 33 | deps = [ 34 | "//go/src/dropbox/runfiles", 35 | "@com_github_bazelbuild_buildtools//wspace", 36 | "@com_github_stretchr_testify//require", 37 | ], 38 | ) 39 | -------------------------------------------------------------------------------- /go/src/dropbox/procfs/stat_test.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | // Only build on Linux, since the use of procfs is platform specific. 4 | package procfs 5 | 6 | import ( 7 | "os" 8 | "os/exec" 9 | "testing" 10 | 11 | . "gopkg.in/check.v1" 12 | ) 13 | 14 | func Test(t *testing.T) { TestingT(t) } 15 | 16 | type ProcfsTestSuite struct{} 17 | 18 | var _ = Suite(&ProcfsTestSuite{}) 19 | 20 | func (p *ProcfsTestSuite) TestChildPids(c *C) { 21 | // get the current pid 22 | pid := os.Getpid() 23 | // spin up a child process 24 | cmd := exec.Command("sleep", "infinity") 25 | err := cmd.Start() 26 | if err != nil { 27 | c.Fatal(err) 28 | } 29 | 30 | cpids, cpidErr := ChildPids(pid) 31 | if cpidErr != nil { 32 | c.Fatal(cpidErr) 33 | } 34 | 35 | // make sure that our child pid list is not empty 36 | c.Assert(cpids, Not(DeepEquals), []int{}) 37 | 38 | // check if we did get the child pid during lookup 39 | var foundPid bool 40 | for _, pid := range cpids { 41 | if pid == cmd.Process.Pid { 42 | foundPid = true 43 | } 44 | } 45 | c.Assert(foundPid, Equals, true) 46 | 47 | // tear down the child process 48 | cmd.Process.Kill() 49 | cmd.Wait() 50 | } 51 | -------------------------------------------------------------------------------- /pip/pytest/BUILD.in: -------------------------------------------------------------------------------- 1 | load("//build_tools/py:py.bzl", "dbx_py_pypi_piplib") 2 | 3 | package(default_visibility = ["//visibility:public"]) 4 | 5 | exports_files(["main.py"]) 6 | 7 | dbx_py_pypi_piplib( 8 | name = "pytest", 9 | testonly = True, 10 | pip_main = "py.test", 11 | pip_version = "7.1.1", 12 | provides = [ 13 | "pytest", 14 | "_pytest", 15 | ], 16 | setup_requires = ["//pip/setuptools_scm"], 17 | use_pep517 = True, 18 | deps = [ 19 | "//pip/atomicwrites", 20 | "//pip/attrs", 21 | "//pip/funcsigs", 22 | "//pip/importlib-metadata", 23 | "//pip/iniconfig", 24 | "//pip/more_itertools", 25 | "//pip/packaging", 26 | "//pip/pathlib2", 27 | "//pip/pluggy", 28 | "//pip/py", 29 | "//pip/six", 30 | "//pip/wcwidth", 31 | ], 32 | ) 33 | 34 | # Library used in dbx_py_pytest_test to prevent duplicate deps and make 35 | # pytest.ini visible to pytest. 36 | dbx_py_library( 37 | name = "pytest_lib", 38 | testonly = True, 39 | srcs = [], 40 | autogen_deps = False, 41 | data = ["//:pytest.ini"], 42 | deps = [":pytest"], 43 | ) 44 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/go/message.go: -------------------------------------------------------------------------------- 1 | package golang 2 | 3 | // Embedded message validation. 4 | const messageTpl = ` 5 | {{ $f := .Field }}{{ $r := .Rules }} 6 | {{ template "required" . }} 7 | 8 | {{ if .MessageRules.GetSkip }} 9 | // skipping validation for {{ $f.Name }} 10 | {{ else }} 11 | if all { 12 | switch v := interface{}({{ accessor . }}).(type) { 13 | case interface{ ValidateAll() error }: 14 | if err := v.ValidateAll(); err != nil { 15 | errors = append(errors, {{ errCause . "err" "embedded message failed validation" }}) 16 | } 17 | case interface{ Validate() error }: 18 | {{- /* Support legacy validation for messages that were generated with a plugin version prior to existence of ValidateAll() */ -}} 19 | if err := v.Validate(); err != nil { 20 | errors = append(errors, {{ errCause . "err" "embedded message failed validation" }}) 21 | } 22 | } 23 | } else if v, ok := interface{}({{ accessor . }}).(interface{ Validate() error }); ok { 24 | if err := v.Validate(); err != nil { 25 | return {{ errCause . "err" "embedded message failed validation" }} 26 | } 27 | } 28 | {{ end }} 29 | ` 30 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/tools/build/Installer.mk: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License") 2 | 3 | # Catch all rules for Go-based tools. 4 | $(go_tools_dir)/bin/%: 5 | @GOBIN=$(go_tools_dir)/bin $(go) install $($(notdir $@)@v) 6 | 7 | # Install protoc from github.com/protocolbuffers/protobuf. 8 | protoc-os := $(if $(findstring $(goos),darwin),osx,$(goos)) 9 | protoc-arch := $(if $(findstring $(goarch),arm64),aarch_64,x86_64) 10 | protoc-version = $(subst github.com/protocolbuffers/protobuf@v,$(empty),$($(notdir $1)@v)) 11 | protoc-archive = protoc-$(call protoc-version,$1)-$(protoc-os)-$(protoc-arch).zip 12 | protoc-url = https://$(subst @,/releases/download/,$($(notdir $1)@v))/$(call protoc-archive,$1) 13 | protoc-zip = $(prepackaged_tools_dir)/$(call protoc-archive,$1) 14 | $(protoc): 15 | @mkdir -p $(prepackaged_tools_dir) 16 | ifeq ($(goos),linux) 17 | @curl -sSL $(call protoc-url,$@) -o $(call protoc-zip,$@) 18 | @unzip -oqq $(call protoc-zip,$@) -d $(prepackaged_tools_dir) 19 | @rm -f $(call protoc-zip,$@) 20 | else 21 | @curl -sSL $(call protoc-url,$@) | tar xf - -C $(prepackaged_tools_dir) 22 | @chmod +x $@ 23 | endif 24 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/svcctl/cmd/svcd/svcd.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "io/ioutil" 6 | "log" 7 | "net" 8 | "strconv" 9 | 10 | "google.golang.org/grpc" 11 | 12 | "dropbox/build_tools/svcctl" 13 | "dropbox/build_tools/svcctl/svclib" 14 | svclib_proto "dropbox/proto/build_tools/svclib" 15 | ) 16 | 17 | func main() { 18 | var listenAddress string 19 | var verbose bool 20 | flag.StringVar(&listenAddress, "listen-address", "localhost:0", "Address to listen on") 21 | flag.BoolVar(&verbose, "verbose", false, "Verbose output for services") 22 | 23 | flag.Parse() 24 | 25 | lis, err := net.Listen("tcp", ":0") 26 | if err != nil { 27 | log.Fatal("Failed to listen", err) 28 | } 29 | port := lis.Addr().(*net.TCPAddr).Port 30 | 31 | log.Printf("Listening on port %d\n", port) 32 | if writeErr := ioutil.WriteFile(svclib.SvcdPortLocation, strconv.AppendInt(nil, int64(port), 10), 0644); writeErr != nil { 33 | log.Fatal(writeErr) 34 | } 35 | 36 | grpcServer := grpc.NewServer() 37 | svclib_proto.RegisterSvcCtlServer(grpcServer, svcctl.NewSvcCtlProcessor(verbose)) 38 | 39 | if serveErr := grpcServer.Serve(lis); serveErr != nil { 40 | log.Fatal("Serve error:", serveErr) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/svcctl/topological_starter.go: -------------------------------------------------------------------------------- 1 | package svcctl 2 | 3 | import ( 4 | "time" 5 | 6 | "dropbox/build_tools/svcctl/topological" 7 | ) 8 | 9 | type startTask struct { 10 | svc *serviceDef 11 | } 12 | 13 | func (st *startTask) Key() string { 14 | return st.svc.name 15 | } 16 | 17 | func (st *startTask) Run() error { 18 | startErr := st.svc.Start() 19 | if startErr != nil { 20 | return startErr 21 | } 22 | return st.svc.waitTillHealthy() 23 | } 24 | 25 | func (st *startTask) Dependents() []topological.Task { 26 | allTasks := make([]topological.Task, 0, len(st.svc.Dependents)) 27 | for _, svc := range st.svc.Dependents { 28 | allTasks = append(allTasks, &startTask{svc: svc}) 29 | } 30 | return allTasks 31 | } 32 | 33 | func (st *startTask) Duration() time.Duration { 34 | return st.svc.StartDuration() 35 | } 36 | 37 | func (st *startTask) StartTime() time.Time { 38 | return st.svc.StartTime() 39 | } 40 | 41 | func newTopologicalStarter(svcs []*serviceDef) topological.Runner { 42 | allTasks := make([]topological.Task, 0, len(svcs)) 43 | for _, svc := range svcs { 44 | allTasks = append(allTasks, &startTask{svc: svc}) 45 | } 46 | return topological.NewRunner(allTasks) 47 | } 48 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/comment_test.go: -------------------------------------------------------------------------------- 1 | package pgs 2 | 3 | import ( 4 | "strconv" 5 | "strings" 6 | "testing" 7 | 8 | "github.com/stretchr/testify/assert" 9 | ) 10 | 11 | func TestC(t *testing.T) { 12 | t.Parallel() 13 | 14 | tests := []struct { 15 | in []interface{} 16 | ex string 17 | }{ 18 | { 19 | []interface{}{"foo", " bar", " baz"}, 20 | "// foo bar baz\n", 21 | }, 22 | { 23 | in: []interface{}{"the quick brown fox jumps over the lazy dog"}, 24 | ex: "// the quick brown\n// fox jumps over\n// the lazy dog\n", 25 | }, 26 | { 27 | in: []interface{}{"supercalifragilisticexpialidocious"}, 28 | ex: "// supercalifragilisticexpialidocious\n", 29 | }, 30 | { 31 | in: []interface{}{"1234567890123456789012345 foo"}, 32 | ex: "// 1234567890123456789012345\n// foo\n", 33 | }, 34 | } 35 | 36 | for i, test := range tests { 37 | tc := test 38 | t.Run(strconv.Itoa(i), func(t *testing.T) { 39 | assert.Equal(t, tc.ex, C(20, tc.in...)) 40 | }) 41 | } 42 | } 43 | 44 | func TestC80(t *testing.T) { 45 | t.Parallel() 46 | ex := "// foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo\n// foo\n" 47 | assert.Equal(t, ex, C80(strings.Repeat("foo ", 20))) 48 | } 49 | -------------------------------------------------------------------------------- /thirdparty/ncurses/convert_modules.py: -------------------------------------------------------------------------------- 1 | # Given the ncurses source directory as its only argument, this script 2 | # extracts buildable files from ncurses "modules" and prints some 3 | # lines for the BUILD.ncurses file. 4 | 5 | import os 6 | import sys 7 | 8 | def convert_modules(base_dir): 9 | mod_file = os.path.join(srcdir, base_dir, "modules") 10 | for l in open(mod_file): 11 | l = l.strip() 12 | if not l or l.startswith("#"): 13 | continue 14 | if l.startswith("@"): 15 | component = l.split()[-1] 16 | continue 17 | if component.startswith("port_"): 18 | continue 19 | parts = l.split() 20 | f = parts[0] 21 | if f == "link_test": 22 | continue 23 | d = parts[2].strip("()$") 24 | if d == "." or d == "srcdir": 25 | d = "" 26 | elif d == "wide": 27 | d = "widechar" 28 | elif d == "serial": 29 | d = "tty" 30 | print(" '%s.c'," % (os.path.join(base_dir, d, f),)) 31 | 32 | srcdir = sys.argv[1] 33 | print("NCURSES_SRCS = [") 34 | convert_modules("ncurses") 35 | print("]") 36 | print() 37 | print("PANEL_SRCS = [") 38 | convert_modules("panel") 39 | print("]") 40 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/gen-build-go/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_binary", "dbx_go_test") 5 | load("@rules_pkg//:pkg.bzl", "pkg_tar") 6 | 7 | dbx_go_binary( 8 | name = "gen-build-go", 9 | srcs = [ 10 | "gen-build-go.go", 11 | ], 12 | visibility = [ 13 | "//visibility:public", 14 | ], 15 | deps = [ 16 | "//go/src/dropbox/build_tools/gen-build-go/lib", 17 | ], 18 | ) 19 | 20 | pkg_tar( 21 | name = "gen-build-go-pkg", 22 | srcs = [ 23 | ":gen-build-go", 24 | ], 25 | extension = "tar.gz", 26 | include_runfiles = True, 27 | strip_prefix = ".", 28 | ) 29 | 30 | exports_files( 31 | ["config.json"], 32 | visibility = ["//visibility:public"], 33 | ) 34 | 35 | filegroup( 36 | name = "srcs", 37 | data = glob( 38 | ["*.go"], 39 | exclude = ["*_test.go"], 40 | ) + [ 41 | "go.mod", 42 | "go.sum", 43 | "//go/src/dropbox/build_tools/gen-build-go/lib:srcs", 44 | ], 45 | visibility = ["//go/src/dropbox/build_tools/update-gen-build-go-srcs:__pkg__"], 46 | ) 47 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/goshared/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "goshared", 8 | srcs = [ 9 | "any.go", 10 | "bytes.go", 11 | "const.go", 12 | "duration.go", 13 | "enum.go", 14 | "in.go", 15 | "known.go", 16 | "ltgt.go", 17 | "map.go", 18 | "msg.go", 19 | "none.go", 20 | "num.go", 21 | "register.go", 22 | "repeated.go", 23 | "string.go", 24 | "timestamp.go", 25 | "wrapper.go", 26 | ], 27 | visibility = [ 28 | "//visibility:public", 29 | ], 30 | deps = [ 31 | "//go/src/github.com/envoyproxy/protoc-gen-validate/templates/shared", 32 | "//go/src/github.com/lyft/protoc-gen-star/v2", 33 | "//go/src/github.com/lyft/protoc-gen-star/v2/lang/go", 34 | "@com_github_iancoleman_strcase", 35 | "@org_golang_google_protobuf//types/known/durationpb", 36 | "@org_golang_google_protobuf//types/known/timestamppb", 37 | ], 38 | ) 39 | -------------------------------------------------------------------------------- /go/src/github.com/lyft/protoc-gen-star/v2/.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | branches: 4 | - master 5 | pull_request: 6 | branches: 7 | - master 8 | jobs: 9 | test: 10 | runs-on: ubuntu-latest 11 | env: 12 | GOPATH: ${{ github.workspace }} 13 | GOBIN: ${{ github.workspace }}/bin 14 | defaults: 15 | run: 16 | working-directory: ${{ env.GOPATH }}/src/github.com/lyft/protoc-gen-star 17 | name: protoc version 3.17.0 18 | steps: 19 | - uses: actions/checkout@v2 20 | with: 21 | fetch-depth: 1 22 | path: ${{ env.GOPATH }}/src/github.com/lyft/protoc-gen-star 23 | - name: Set Up Go 24 | uses: actions/setup-go@v2 25 | with: 26 | go-version: '1.17' 27 | - run: mkdir -p $GOPATH/bin 28 | - run: wget "https://github.com/protocolbuffers/protobuf/releases/download/v3.17.0/protoc-3.17.0-linux-x86_64.zip" -O /tmp/protoc.zip 29 | - run: unzip /tmp/protoc.zip -d /tmp 30 | - run: sudo mv /tmp/bin/protoc /usr/local/bin/protoc 31 | - run: sudo mv /tmp/include/google /usr/local/include/google 32 | - name: Generate Testdata 33 | run: make testdata 34 | - name: Run Tests 35 | run: make tests 36 | 37 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/java/msg.go: -------------------------------------------------------------------------------- 1 | package java 2 | 3 | const msgTpl = ` 4 | {{ if not (ignored .) -}} 5 | /** 6 | * Validates {@code {{ simpleName . }}} protobuf objects. 7 | */ 8 | public static class {{ simpleName . }}Validator implements io.envoyproxy.pgv.ValidatorImpl<{{ qualifiedName . }}> { 9 | {{- template "msgInner" . -}} 10 | } 11 | {{- end -}} 12 | ` 13 | 14 | const msgInnerTpl = ` 15 | {{- range .NonOneOfFields }} 16 | {{ renderConstants (context .) }} 17 | {{ end }} 18 | {{ range .SyntheticOneOfFields }} 19 | {{ renderConstants (context .) }} 20 | {{ end }} 21 | {{ range .RealOneOfs }} 22 | {{ template "oneOfConst" . }} 23 | {{ end }} 24 | 25 | public void assertValid({{ qualifiedName . }} proto, io.envoyproxy.pgv.ValidatorIndex index) throws io.envoyproxy.pgv.ValidationException { 26 | {{ if disabled . }} 27 | // Validate is disabled for {{ simpleName . }} 28 | return; 29 | {{- else -}} 30 | {{ range .NonOneOfFields -}} 31 | {{ render (context .) }} 32 | {{ end -}} 33 | {{ range .SyntheticOneOfFields }} 34 | if ({{ hasAccessor (context .) }}) { 35 | {{ render (context .) }} 36 | } 37 | {{ end }} 38 | {{ range .RealOneOfs }} 39 | {{ template "oneOf" . }} 40 | {{- end -}} 41 | {{- end }} 42 | } 43 | ` 44 | -------------------------------------------------------------------------------- /go/src/dropbox/build_tools/gojunit/gojunit/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bufio" 5 | "dropbox/build_tools/gojunit" 6 | "dropbox/build_tools/junit" 7 | "encoding/json" 8 | "flag" 9 | "log" 10 | "os" 11 | "time" 12 | ) 13 | 14 | func main() { 15 | log.SetFlags(log.Ldate | log.Ltime | log.Lshortfile) 16 | target := flag.String("target", "", "bazel target") 17 | flag.Parse() 18 | 19 | events := make([]gojunit.Event, 0) 20 | 21 | scanner := bufio.NewScanner(os.Stdin) 22 | for scanner.Scan() { 23 | var event gojunit.Event 24 | bytes := scanner.Bytes() 25 | if eventErr := json.Unmarshal(scanner.Bytes(), &event); eventErr != nil { 26 | log.Printf("%s", bytes) 27 | log.Fatal(eventErr) 28 | } 29 | events = append(events, event) 30 | } 31 | if scanner.Err() != nil { 32 | log.Fatal(scanner.Err().Error()) 33 | } 34 | 35 | junitTestCases, durationFl := gojunit.ParseEvents(*target+"/", events) 36 | duration := time.Duration(int(durationFl)) * time.Second 37 | 38 | xmlFile, xmlFileErr := os.OpenFile(os.Getenv("XML_OUTPUT_FILE"), os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) 39 | defer xmlFile.Close() 40 | if xmlFileErr != nil { 41 | log.Fatal(xmlFileErr.Error()) 42 | } 43 | 44 | junit.OverwriteXMLDuration(nil, duration, *target, junitTestCases, xmlFile) 45 | } 46 | -------------------------------------------------------------------------------- /go/src/github.com/envoyproxy/protoc-gen-validate/templates/cc/BUILD: -------------------------------------------------------------------------------- 1 | # @generated: This file was generated by bzl. Do not modify! 2 | # Argument overrides and custom targets should be specified in BUILD.in. 3 | 4 | load("//build_tools/go:go.bzl", "dbx_go_library") 5 | 6 | dbx_go_library( 7 | name = "cc", 8 | srcs = [ 9 | "any.go", 10 | "bytes.go", 11 | "const.go", 12 | "duration.go", 13 | "enum.go", 14 | "file.go", 15 | "in.go", 16 | "known.go", 17 | "ltgt.go", 18 | "map.go", 19 | "message.go", 20 | "msg.go", 21 | "none.go", 22 | "num.go", 23 | "register.go", 24 | "repeated.go", 25 | "string.go", 26 | "timestamp.go", 27 | "wrapper.go", 28 | ], 29 | visibility = [ 30 | "//visibility:public", 31 | ], 32 | deps = [ 33 | "//go/src/github.com/envoyproxy/protoc-gen-validate/templates/shared", 34 | "//go/src/github.com/lyft/protoc-gen-star/v2", 35 | "//go/src/github.com/lyft/protoc-gen-star/v2/lang/go", 36 | "@com_github_iancoleman_strcase", 37 | "@org_golang_google_protobuf//types/known/durationpb", 38 | "@org_golang_google_protobuf//types/known/timestamppb", 39 | ], 40 | ) 41 | --------------------------------------------------------------------------------