Skip to content

Commit f2a64ae

Browse files
emidootsvarungandhi-srcolafurpgelliotttburmudar
authored
update to latest Sorbet (change 1 of 3): replay all scip-ruby commits on top of latest upstream (#261)
Replay all scip-ruby commits on top of latest upstream Sorbet commit 7459ce5 See PR description for details: #261 scip-ruby history prior to this is maintained in a 'legacy' branch, see #267 --------- Signed-off-by: Emi <emi@sourcegraph.com> Co-authored-by: Varun Gandhi <varun.gandhi@sourcegraph.com> Co-authored-by: Ólafur Páll Geirsson <olafurpg@gmail.com> Co-authored-by: Trevor Elliott <awesomelyawesome@gmail.com> Co-authored-by: William Bezuidenhout <william.bezuidenhout@sourcegraph.com> Co-authored-by: Michał Kiełbowicz <michal.kielbowicz@sourcegraph.com> Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Adam Chrapkowski <adam.chrapkowski@sourcegraph.com> Co-authored-by: Jason Hawk Harris <jason.harris@sourcegraph.com> Co-authored-by: jjuliamolin <44101701+jjuliamolin@users.noreply.github.com> Co-authored-by: juliamolin <juliamolin@fb.com> Co-authored-by: Christoph Hegemann <christoph.hegemann@sourcegraph.com>
1 parent 7459ce5 commit f2a64ae

339 files changed

Lines changed: 20041 additions & 1839 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.bazelrc‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ build --cxxopt=-Wno-unqualified-std-cast-call --host_cxxopt=-Wno-unqualified-std
6868
##
6969
## debug configuration
7070
##
71+
build:dev --config=dbg --copt=-O1
72+
7173
build:dbg --copt=-O0
7274
build:dbg --compilation_mode=dbg
7375
build:dbg --config=debugsymbols
@@ -76,6 +78,7 @@ build:dbg --config=debugsymbols
7678
# TODO(jez) Do newer compile commands generators suffer from this problem? The one we use is archived
7779
build:dbg --remote_download_outputs=all
7880

81+
7982
build:rubydbg --copt=-DRUBY_DEBUG --copt=-DVM_CHECK_MODE=1 --copt=-DTRANSIENT_HEAP_CHECK_MODE --copt=-DRGENGC_CHECK_MODE --copt=-DENC_DEBUG
8083

8184
build:coverage --config=forcedebug
@@ -145,11 +148,11 @@ build:release-sanitized-linux-aarch64 --copt=-march=armv8.1a
145148
build:release-mac --config=release-common --config=shared-libs
146149

147150
build:cross-to-darwin-x86_64 --platforms=@//tools/platforms:darwin_x86_64
148-
build:cross-to-darwin-x86_64 --extra_toolchains=@llvm_toolchain_15_0_7//:cc-toolchain-x86_64-darwin
151+
build:cross-to-darwin-x86_64 --extra_toolchains=@llvm_toolchain_15_0_6//:cc-toolchain-x86_64-darwin
149152
build:cross-to-darwin-x86_64 --copt=-stdlib=libc++ --linkopt=-lc++
150153

151154
build:cross-to-darwin-arm64 --platforms=@//tools/platforms:darwin_arm64
152-
build:cross-to-darwin-arm64 --extra_toolchains=@llvm_toolchain_15_0_7//:cc-toolchain-aarch64-darwin
155+
build:cross-to-darwin-arm64 --extra_toolchains=@llvm_toolchain_15_0_6//:cc-toolchain-aarch64-darwin
153156
build:cross-to-darwin-arm64 --copt=-stdlib=libc++ --linkopt=-lc++
154157

155158
build:release-debug-linux --config=release-linux
@@ -264,14 +267,14 @@ build:ubsan --copt=-DHAS_SANITIZER
264267
# because we're using the toolchain's lld linker now.
265268
# We could consider replacing this with something more typical.
266269
# Original motivation: Bazel links C++ files with $CC, not $CXX, this breaks UBSan
267-
build:sanitize-linux --linkopt=../../external/llvm_toolchain_15_0_7_llvm/lib/clang/15.0.7/lib/x86_64-unknown-linux-gnu/libclang_rt.asan_cxx.a
268-
build:sanitize-linux --linkopt=../../external/llvm_toolchain_15_0_7_llvm/lib/clang/15.0.7/lib/x86_64-unknown-linux-gnu/libclang_rt.ubsan_standalone_cxx.a
269-
build:sanitize-linux --linkopt=../../external/llvm_toolchain_15_0_7_llvm/lib/clang/15.0.7/lib/x86_64-unknown-linux-gnu/libclang_rt.ubsan_standalone.a
270+
build:sanitize-linux --linkopt=../../external/llvm_toolchain_15_0_6_llvm/lib/clang/15.0.6/lib/x86_64-unknown-linux-gnu/libclang_rt.asan_cxx.a
271+
build:sanitize-linux --linkopt=../../external/llvm_toolchain_15_0_6_llvm/lib/clang/15.0.6/lib/x86_64-unknown-linux-gnu/libclang_rt.ubsan_standalone_cxx.a
272+
build:sanitize-linux --linkopt=../../external/llvm_toolchain_15_0_6_llvm/lib/clang/15.0.6/lib/x86_64-unknown-linux-gnu/libclang_rt.ubsan_standalone.a
270273
build:sanitize-linux --config=sanitize
271274

272-
build:sanitize-linux-aarch64 --linkopt=../../external/llvm_toolchain_15_0_7_llvm/lib/clang/15.0.7/lib/aarch64-unknown-linux-gnu/libclang_rt.asan_cxx.a
273-
build:sanitize-linux-aarch64 --linkopt=../../external/llvm_toolchain_15_0_7_llvm/lib/clang/15.0.7/lib/aarch64-unknown-linux-gnu/libclang_rt.ubsan_standalone_cxx.a
274-
build:sanitize-linux-aarch64 --linkopt=../../external/llvm_toolchain_15_0_7_llvm/lib/clang/15.0.7/lib/aarch64-unknown-linux-gnu/libclang_rt.ubsan_standalone.a
275+
build:sanitize-linux-aarch64 --linkopt=../../external/llvm_toolchain_15_0_6_llvm/lib/clang/15.0.6/lib/aarch64-unknown-linux-gnu/libclang_rt.asan_cxx.a
276+
build:sanitize-linux-aarch64 --linkopt=../../external/llvm_toolchain_15_0_6_llvm/lib/clang/15.0.6/lib/aarch64-unknown-linux-gnu/libclang_rt.ubsan_standalone_cxx.a
277+
build:sanitize-linux-aarch64 --linkopt=../../external/llvm_toolchain_15_0_6_llvm/lib/clang/15.0.6/lib/aarch64-unknown-linux-gnu/libclang_rt.ubsan_standalone.a
275278
build:sanitize-linux-aarch64 --config=sanitize
276279

277280
build:sanitize-mac --config=sanitize

‎.bazelversion‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.1.2
1+
7.7.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
753941fedae337ace93c3e03b1801bc7b301d3d53c00d7c5fb071d67059b1320
1+
8167011977bffd577cb4c8e9b2100f89134aa83c419a543914568f39a6b1c410
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
af5fe3b5eba0ecc50648dd833a392752b706d321832354d46e5e7806e49b2155
1+
6a0a89a1c0b75e6c1d02fd881adf30f52ea921ea00feaf77a4e14331c488b56e
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
50ce66b2b4065596347692e82209b29fa8cef7ab1ba1f45060294655c48677a8
1+
8d404f7a266ead50be0918f913df1449a4880f5c8ef36c88d09d6204e67f114d
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
de8a2ddb0d77293c97c4280ea60ce313487dfd1ba88cc7816d16ba640ac2fb3f
1+
7e749f59fa4c4430fbc49ea38b0bc0a41dd1f460e8671c90978d70c2166bf0c4

‎.buildkite/all-succeeded.sh‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎.buildkite/all-succeeded.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../.sorbet-buildkite/all-succeeded.sh

‎.buildkite/hooks/pre-command‎

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,32 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

3-
set -euo pipefail
4-
if [ "HEAD" == "${BUILDKITE_COMMIT}" ]; then
5-
echo "not using commit marks as this is HEAD build"
6-
else
7-
.buildkite/hooks/gh-status sorbet/sorbet "${BUILDKITE_COMMIT}" pending "${BUILDKITE_BUILD_URL}#${BUILDKITE_JOB_ID}" "${BUILDKITE_LABEL}"
3+
set -e
4+
5+
if echo "$BUILDKITE_PLUGINS" | grep "cache-buildkite-plugin"; then
6+
if ! which aws; then
7+
echo "pwd: $PWD"
8+
ls
9+
10+
AWS_TEMPDIR="$(mktemp -d -t "awscli-XXXXXXXX")"
11+
pushd "$AWS_TEMPDIR"
12+
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
13+
unzip awscliv2.zip
14+
sudo ./aws/install
15+
ls
16+
popd
17+
rm -rf "$AWS_TEMPDIR"
18+
19+
echo "pwd: $PWD"
20+
ls
21+
22+
# From https://sourcegraph.sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/enterprise/cmd/server/pre-build.sh?L40-47
23+
AWS_CONFIG_DIR_PATH="/buildkite/.aws"
24+
mkdir -p "$AWS_CONFIG_DIR_PATH"
25+
AWS_CONFIG_FILE="$AWS_CONFIG_DIR_PATH/config"
26+
export AWS_CONFIG_FILE
27+
AWS_SHARED_CREDENTIALS_FILE="/buildkite/.aws/credentials"
28+
export AWS_SHARED_CREDENTIALS_FILE
29+
aws configure set aws_access_key_id "$BUILDKITE_HMAC_KEY" --profile buildkite
30+
aws configure set aws_secret_access_key "$BUILDKITE_HMAC_SECRET" --profile buildkite
31+
fi
832
fi

‎.buildkite/linters.sh‎

Lines changed: 11 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,40 @@
33
set -euo pipefail
44
export JOB_NAME=linters
55

6-
# shellcheck source-path=SCRIPTDIR/..
6+
# shellcheck source=SCRIPTDIR/tools/setup-bazel.sh
77
source .buildkite/tools/setup-bazel.sh
88

99
set -x
1010
globalErr=0
1111

1212
echo "~~~ Checking build files"
13-
if ! ./tools/scripts/format_build_files.sh -t > buildifier; then
13+
if ! ./tools/scripts/format_build_files.sh -t &> buildifier; then
1414
globalErr=1
1515
echo "^^^ +++"
1616
buildkite-agent annotate --context tools/scripts/format_build_files.sh --style error --append < buildifier
1717
fi
1818

1919
echo "~~~ Checking c++ formatting"
20-
if ! ./tools/scripts/format_cxx.sh -td &> format_cxx; then
20+
if ! ./tools/scripts/format_cxx.sh -t &> format_cxx; then
2121
globalErr=1
2222
echo "^^^ +++"
2323
buildkite-agent annotate --context tools/scripts/format_cxx.sh --style error --append < format_cxx
2424
fi
2525

2626
echo "~~~ Checking that the compilation db builds"
27-
if ! ./tools/scripts/build_compilation_db.sh > compdb; then
27+
if ! ./tools/scripts/build_compilation_db.sh &> compdb; then
2828
globalErr=1
2929
echo "^^^ +++"
3030
buildkite-agent annotate --context tools/scripts/build_compilation_db.sh --style error --append < compdb
3131
fi
3232

33-
echo "~~~ Checking compilation db targets"
34-
if ! ./tools/scripts/generate_compdb_targets.sh -t &> compdb-targets; then
35-
globalErr=1
36-
echo "^^^ +++"
37-
buildkite-agent annotate --context tools/scripts/generate_compdb_targets.sh --style error --append < compdb-targets
38-
fi
33+
# Skip this because bazel query is failing due to third-party stuff
34+
# echo "~~~ Checking compilation db targets"
35+
# if ! ./tools/scripts/generate_compdb_targets.sh -t &> compdb-targets; then
36+
# globalErr=1
37+
# echo "^^^ +++"
38+
# buildkite-agent annotate --context tools/scripts/generate_compdb_targets.sh --style error --append < compdb-targets
39+
# fi
3940

4041
echo "~~~ Linting uses of \`using namespace std\`"
4142
if ! ./tools/scripts/check_using_namespace_std.sh &> std_check; then
@@ -58,59 +59,6 @@ if ! ./tools/scripts/lint_sh.sh -t &> lint_sh; then
5859
buildkite-agent annotate --context tools/scripts/lint_sh.sh --style error --append < lint_sh
5960
fi
6061

61-
echo "~~~ Checking markdown formatting"
62-
if ! ./tools/scripts/format_website.sh -t &> format_website; then
63-
globalErr=1
64-
echo "^^^ +++"
65-
buildkite-agent annotate --context tools/scripts/format_website.sh --style error --append < format_website
66-
fi
67-
68-
echo "~~~ Checking protoc dependency"
69-
./bazel query "somepath(//main:sorbet, @com_google_protobuf//:protoc)" 2> /dev/null > protoc_dependency
70-
if [ "$(wc -l protoc_dependency)" -ne 0 ]; then
71-
globalErr=1
72-
echo "^^^ +++"
73-
cat >> protoc_dependency <<EOF
74-
75-
There is a path to @com_google_protobuf//:protoc from //main:sorbet
76-
Please remove it, as this represents a substantial regression in compile times.
77-
EOF
78-
buildkite-agent annotate --context "path to @com_google_protobuf//:protoc" --style error --append < protoc_dependency
79-
fi
80-
81-
if grep -n -r '^ \w*\.md' website &> lint_docusaurus_md; then
82-
globalErr=1
83-
echo "^^^ +++"
84-
buildkite-agent annotate --context "Docusaurus Link Reference Definitions" --style error --append <<EOF
85-
These markdown files have link reference definitions which split onto multiple lines.
86-
87-
Prettier insists on splitting long link reference definitions onto multiple lines,
88-
but Docusaurus fails to linkify these definitions.
89-
90-
Rewrite these link reference definitions to be inline links to avoid broken links:
91-
92-
\`\`\`
93-
$(< lint_docusaurus_md)
94-
\`\`\`
95-
EOF
96-
fi
97-
98-
echo "~~~ Checking the vscode extension"
99-
pushd vscode_extension
100-
yarn install
101-
if ! yarn lint --output-file=yarn_lint; then
102-
globalErr=1
103-
echo "^^^ +++"
104-
buildkite-agent annotate --context 'yarn lint' --style error --append <<EOF
105-
There were eslint errors in vscode_extension/. Fix with:
106-
107-
cd vscode_extension && yarn lint --fix
108-
109-
$(< yarn_lint)
110-
EOF
111-
fi
112-
popd
113-
11462
echo "~~~"
11563
if [ "$globalErr" -ne 0 ]; then
11664
exit $globalErr

0 commit comments

Comments
 (0)