Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .aspect/bazelrc/bazel6.bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Not using common here because https://github.com/bazelbuild/bazel/pull/18609 was added in Bazel 6.3.0

# Speed up all builds by not checking if external repository files have been modified.
# Docs: https://github.com/bazelbuild/bazel/blob/1af61b21df99edc2fc66939cdf14449c2661f873/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java#L244
build --noexperimental_check_external_repository_files
Expand Down Expand Up @@ -52,3 +54,10 @@ query --experimental_allow_tags_propagation
# author.
# Docs: https://bazel.build/reference/command-line-reference#flag--legacy_external_runfiles
build --nolegacy_external_runfiles

# The maximum number of attempts to retry a download error.
# Using the default value from Bazel 8.
# Docs: https://bazel.build/reference/command-line-reference#common_options-flag--experimental_repository_downloader_retries
build --experimental_repository_downloader_retries=5
fetch --experimental_repository_downloader_retries=5
query --experimental_repository_downloader_retries=5
14 changes: 12 additions & 2 deletions .aspect/bazelrc/bazel7.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,22 @@ common --check_direct_dependencies=off
# Save time on Sandbox creation and deletion when many of the same kind of action run during the
# build.
# Docs: https://bazel.build/reference/command-line-reference#flag--reuse_sandbox_directories
build --reuse_sandbox_directories
common --reuse_sandbox_directories

# Do not build runfiles symlink forests for external repositories under
# `.runfiles/wsname/external/repo` (in addition to `.runfiles/repo`). This reduces runfiles &
# sandbox creation times & prevents accidentally depending on this feature which may flip to off by
# default in the future. Note, some rules may fail under this flag, please file issues with the rule
# author.
# Docs: https://bazel.build/reference/command-line-reference#flag--legacy_external_runfiles
build --nolegacy_external_runfiles
common --nolegacy_external_runfiles

# The maximum number of attempts to retry if the build encountered a transient remote cache error that would otherwise fail the build.
# Using the same value here than what is the default in Bazel 8 to help with https://github.com/bazelbuild/bazel/issues/22387
# Docs: https://bazel.build/reference/command-line-reference#build-flag--experimental_remote_cache_eviction_retries
common --experimental_remote_cache_eviction_retries=5

# The maximum number of attempts to retry a download error.
# Using the default value from Bazel 8.
# Docs: https://bazel.build/reference/command-line-reference#common_options-flag--experimental_repository_downloader_retries
common --experimental_repository_downloader_retries=5
22 changes: 11 additions & 11 deletions .aspect/bazelrc/ci.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,52 +15,52 @@ test --flaky_test_attempts=2
# beginning of each Bazel invocation. This is very useful on CI to be able to inspect what Bazel rc
# settings are being applied on each run.
# Docs: https://bazel.build/docs/user-manual#announce-rc
build --announce_rc
common --announce_rc

# Add a timestamp to each message generated by Bazel specifying the time at which the message was
# displayed.
# Docs: https://bazel.build/docs/user-manual#show-timestamps
build --show_timestamps
common --show_timestamps

# Only show progress every 60 seconds on CI.
# We want to find a compromise between printing often enough to show that the build isn't stuck,
# but not so often that we produce a long log file that requires a lot of scrolling.
# https://bazel.build/reference/command-line-reference#flag--show_progress_rate_limit
build --show_progress_rate_limit=60
common --show_progress_rate_limit=60

# Use cursor controls in screen output.
# Docs: https://bazel.build/docs/user-manual#curses
build --curses=yes
common --curses=yes

# Use colors to highlight output on the screen. Set to `no` if your CI does not display colors.
# Docs: https://bazel.build/docs/user-manual#color
build --color=yes
common --color=yes

# The terminal width in columns. Configure this to override the default value based on what your CI system renders.
# Docs: https://github.com/bazelbuild/bazel/blob/1af61b21df99edc2fc66939cdf14449c2661f873/src/main/java/com/google/devtools/build/lib/runtime/UiOptions.java#L151
build --terminal_columns=143
common --terminal_columns=143

######################################
# Generic remote cache configuration #
######################################

# Only download remote outputs of top level targets to the local machine.
# Docs: https://bazel.build/reference/command-line-reference#flag--remote_download_toplevel
build --remote_download_toplevel
common --remote_download_toplevel

# The maximum amount of time to wait for remote execution and cache calls.
# https://bazel.build/reference/command-line-reference#flag--remote_timeout
build --remote_timeout=3600
common --remote_timeout=3600

# Upload locally executed action results to the remote cache.
# Docs: https://bazel.build/reference/command-line-reference#flag--remote_upload_local_results
build --remote_upload_local_results
common --remote_upload_local_results

# Fall back to standalone local execution strategy if remote execution fails. If the grpc remote
# cache connection fails, it will fail the build, add this so it falls back to the local cache.
# Docs: https://bazel.build/reference/command-line-reference#flag--remote_local_fallback
build --remote_local_fallback
common --remote_local_fallback

# Fixes builds hanging on CI that get the TCP connection closed without sending RST packets.
# Docs: https://bazel.build/reference/command-line-reference#flag--grpc_keepalive_time
build --grpc_keepalive_time=30s
common --grpc_keepalive_time=30s
6 changes: 3 additions & 3 deletions .aspect/bazelrc/convenience.bazelrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Attempt to build & test every target whose prerequisites were successfully built.
# Docs: https://bazel.build/docs/user-manual#keep-going
build --keep_going
common --keep_going

# Output test errors to stderr so users don't have to `cat` or open test failure log files when test
# fail. This makes the log noisier in exchange for reducing the time-to-feedback on test failures for
# users.
# Docs: https://bazel.build/docs/user-manual#test-output
test --test_output=errors
common --test_output=errors

# Show the output files created by builds that requested more than one target. This helps users
# locate the build outputs in more cases
# Docs: https://bazel.build/docs/user-manual#show-result
build --show_result=20
common --show_result=20

# Bazel picks up host-OS-specific config lines from bazelrc files. For example, if the host OS is
# Linux and you run bazel build, Bazel picks up lines starting with build:linux. Supported OS
Expand Down
16 changes: 8 additions & 8 deletions .aspect/bazelrc/correctness.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
# It should be flipped to `--remote_upload_local_results` on CI
# by using `--bazelrc=.aspect/bazelrc/ci.bazelrc`.
# Docs: https://bazel.build/reference/command-line-reference#flag--remote_upload_local_results
build --noremote_upload_local_results
common --noremote_upload_local_results

# Don't allow network access for build actions in the sandbox.
# Ensures that you don't accidentally make non-hermetic actions/tests which depend on remote
# services.
# Developers should tag targets with `tags=["requires-network"]` to opt-out of the enforcement.
# Docs: https://bazel.build/reference/command-line-reference#flag--sandbox_default_allow_network
build --sandbox_default_allow_network=false
common --sandbox_default_allow_network=false

# Warn if a test's timeout is significantly longer than the test's actual execution time.
# Bazel's default for test_timeout is medium (5 min), but most tests should instead be short (1 min).
Expand All @@ -19,7 +19,7 @@ build --sandbox_default_allow_network=false
# For instance, a test that normally executes in a minute or two should not have a timeout of
# ETERNAL or LONG as these are much, much too generous.
# Docs: https://bazel.build/docs/user-manual#test-verbose-timeout-warnings
test --test_verbose_timeout_warnings
common --test_verbose_timeout_warnings

# Allow the Bazel server to check directory sources for changes. Ensures that the Bazel server
# notices when a directory changes, if you have a directory listed in the srcs of some target.
Expand All @@ -33,22 +33,22 @@ startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1
# Allow exclusive tests to run in the sandbox. Fixes a bug where Bazel doesn't enable sandboxing for
# tests with `tags=["exclusive"]`.
# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_exclusive_test_sandboxed
test --incompatible_exclusive_test_sandboxed
common --incompatible_exclusive_test_sandboxed

# Use a static value for `PATH` and does not inherit `LD_LIBRARY_PATH`. Doesn't let environment
# variables like `PATH` sneak into the build, which can cause massive cache misses when they change.
# Use `--action_env=ENV_VARIABLE` if you want to inherit specific environment variables from the
# client, but note that doing so can prevent cross-user caching if a shared cache is used.
# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_strict_action_env
build --incompatible_strict_action_env
common --incompatible_strict_action_env

# Do not automatically create `__init__.py` files in the runfiles of Python targets. Fixes the wrong
# default that comes from Google's internal monorepo by using `__init__.py` to delimit a Python
# package. Precisely, when a `py_binary` or `py_test` target has `legacy_create_init` set to `auto (the
# default), it is treated as false if and only if this flag is set. See
# https://github.com/bazelbuild/bazel/issues/10076.
# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_default_to_explicit_init_py
build --incompatible_default_to_explicit_init_py
common --incompatible_default_to_explicit_init_py

# Set default value of `allow_empty` to `False` in `glob()`. This prevents a common mistake when
# attempting to use `glob()` to match files in a subdirectory that is opaque to the current package
Expand All @@ -60,5 +60,5 @@ common --incompatible_disallow_empty_glob
# downloaded on test result cache hits when --remote_download_minimal is enabled, making it impossible
# to generate a full coverage report.
# Docs: https://bazel.build/reference/command-line-reference#flag--experimental_fetch_all_coverage_outputs
# detching remote cache results
test --experimental_fetch_all_coverage_outputs
# ditching remote cache results
common --experimental_fetch_all_coverage_outputs
8 changes: 4 additions & 4 deletions .aspect/bazelrc/debug.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

# Stream stdout/stderr output from each test in real-time.
# Docs: https://bazel.build/docs/user-manual#test-output
test:debug --test_output=streamed
common:debug --test_output=streamed

# Run one test at a time.
# Docs: https://bazel.build/reference/command-line-reference#flag--test_strategy
test:debug --test_strategy=exclusive
common:debug --test_strategy=exclusive

# Prevent long running tests from timing out.
# Docs: https://bazel.build/docs/user-manual#test-timeout
test:debug --test_timeout=9999
common:debug --test_timeout=9999

# Always run tests even if they have cached results.
# Docs: https://bazel.build/docs/user-manual#cache-test-results
test:debug --nocache_test_results
common:debug --nocache_test_results
2 changes: 1 addition & 1 deletion .aspect/bazelrc/javascript.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
# details.
# Docs: https://nodejs.org/en/docs/guides/debugging-getting-started/#command-line-options
run:debug -- --node_options=--inspect-brk
test:debug --test_env=NODE_OPTIONS=--inspect-brk
common:debug --test_env=NODE_OPTIONS=--inspect-brk
4 changes: 2 additions & 2 deletions .aspect/bazelrc/performance.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# build.
# No longer experimental in Bazel 6: https://github.com/bazelbuild/bazel/commit/c1a95501a5611878e5cc43a3cc531f2b9e47835b
# Docs: https://bazel.build/reference/command-line-reference#flag--reuse_sandbox_directories
build --experimental_reuse_sandbox_directories
common --experimental_reuse_sandbox_directories

# Avoid creating a runfiles tree for binaries or tests until it is needed.
# Docs: https://bazel.build/reference/command-line-reference#flag--build_runfile_links
Expand All @@ -12,7 +12,7 @@ build --experimental_reuse_sandbox_directories
# This may break local workflows that `build` a binary target, then run the resulting program
# outside of `bazel run`. In those cases, the script will need to call
# `bazel build --build_runfile_links //my/binary:target` and then execute the resulting program.
build --nobuild_runfile_links
common --nobuild_runfile_links

# Needed prior to Bazel 8; see
# https://github.com/bazelbuild/bazel/issues/20577
Expand Down
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Import Aspect bazelrc presets
import %workspace%/.aspect/bazelrc/bazel6.bazelrc
import %workspace%/.aspect/bazelrc/convenience.bazelrc
import %workspace%/.aspect/bazelrc/correctness.bazelrc
import %workspace%/.aspect/bazelrc/debug.bazelrc
import %workspace%/.aspect/bazelrc/performance.bazelrc

common --enable_bzlmod
common --noenable_workspace

build --cxxopt=-std=c++17
build -c opt
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
9.0.0rc3
10 changes: 5 additions & 5 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module(name = "dbscan")

bazel_dep(name = "aspect_bazel_lib", version = "2.13.0")
bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "pybind11_bazel", version = "2.13.6")
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "rules_python", version = "1.2.0-rc0")
bazel_dep(name = "aspect_bazel_lib", version = "2.22.2")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "pybind11_bazel", version = "3.0.0")
bazel_dep(name = "rules_cc", version = "0.2.14")
bazel_dep(name = "rules_python", version = "1.7.0")

http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

Expand Down
Loading